From unknown Sat Aug 16 21:12:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50502 <50502@debbugs.gnu.org> To: bug#50502 <50502@debbugs.gnu.org> Subject: Status: grep-command cannot be set as a cons of the command and the point position Reply-To: bug#50502 <50502@debbugs.gnu.org> Date: Sun, 17 Aug 2025 04:12:11 +0000 retitle 50502 grep-command cannot be set as a cons of the command and the p= oint position reassign 50502 emacs submitter 50502 Yuchen Pei severity 50502 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 06:30:15 2021 Received: (at submit) by debbugs.gnu.org; 10 Sep 2021 10:30:15 +0000 Received: from localhost ([127.0.0.1]:36943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOdnS-0008LI-R0 for submit@debbugs.gnu.org; Fri, 10 Sep 2021 06:30:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:58284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOdnR-0008Jm-KS for submit@debbugs.gnu.org; Fri, 10 Sep 2021 06:30:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOdnQ-00088B-Nh for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 06:30:13 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:60023) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOdnO-0003Ca-Dl for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 06:30:12 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 208B63200A15 for ; Fri, 10 Sep 2021 06:30:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 10 Sep 2021 06:30:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=from :to:subject:date:message-id:mime-version:content-type; s=fm2; bh=LEQWNgUdE4NRFnM4zjCiRvqYS/W+C7Vu7gGmQTks0+M=; b=Q8/TLT9B9b3M k1TyTXPRSOyEgtZR0wjG+X4QnYsEYo4T3QgmhgWUhSX1v4EdSEUnSWrpohB3/HAN foxHNOHNYFY5/aHt8pW/jALmUd9kdTfmKYr5YYRlQ/aK6El5clld6Vrrrfyx/D6q 0PJPD4s7kBWAdcZ6Pm2IEHgtdl0dqtUButscDoSpd7SksvEjxWEypUpZcE244Lol eoxN0gQbzy49Kjh0zCn7M2rofyT5LKsQ6En4vbV9J2jw+kAp+2B7qUbBPD0Bor/m YUY6ozrazFYAAof0NM0Y5lONunj2txYx9CHdOrJBPAr7d2pUCANFrXclc3IbnEAk K2nrfduC0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=LEQWNgUdE4NRFnM4zjCiRvqYS/W+C 7Vu7gGmQTks0+M=; b=iuwWitdoAzAtzECag7INwl2Yug6gs2Z/sFHa0Lgr1OUkM jyhoEGm6q8SHYL7xWGBbEHtkSN7YEzaFIBVR1X4QTi5cqeom0FdbEfIIEFjtK6/J 5oX3qdZ5JUm1tdhSyst2wWCHHjhPf38bBlNDBR4mJOMAdd0cx3l2J3GT7unWnhYi kRkE8s0miL3FUbkAIUoGVID9ayCdnszazdLdDzSV4p1w/HHOiHNkTR6LUTw/DexB ioQooyphwE0tc2ZtLMQ54UrB8JeXyOmqAJr64T3pSj0orsvPTSDtm1AzSx12VCBy ctYwerHoQ58rLRt5yAcLoPSC6AkKjmJxpxjKCFVTA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeguddgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegfhffvufffkfggtgesghdtreertd ertdenucfhrhhomhepjghutghhvghnucfrvghiuceohhhiseihphgvihdrmhgvqeenucgg tffrrghtthgvrhhnpefhvdduudfhhfdtudelffelieffgefgheffgefhffduvefhheekue dvtddvueeifeenucffohhmrghinhepghhnuhdrohhrghdphihpvghirdhmvgenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhiheshihpvghird hmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 10 Sep 2021 06:30:04 -0400 (EDT) User-agent: mu4e 1.4.13; emacs 27.2 From: Yuchen Pei To: bug-gnu-emacs Subject: grep-command cannot be set as a cons of the command and the point position Date: Fri, 10 Sep 2021 20:29:58 +1000 Message-ID: <87a6kkyb89.fsf@ypei.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=====-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=64.147.123.19; envelope-from=hi@ypei.me; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=====-=-= Content-Type: text/plain; format=flowed Hello, The following works: (setq grep-find-command '("find . -type f -exec grep -inRH --color -A1 -B1 -E \\{\\} +" . 52)) which places the point nicely after -E in the minibuffer when invoking grep-find. But not the following: (setq grep-command '("grep -inRH --color -A1 -B1 -E ." . 31)) as emacs would complain that grep-command is not a string, even though both use read-shell-command for the command reading. Two similarly named functions grep-default-command[1] and grep-compute-defaults[2] are used by grep and grep-find respectively at the beginning, with the grep-default-command requiring a regexp match on the grep-command (hence the error). [1] https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/grep.el#n821 [2] https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/grep.el#n615 The code is a bit involved and I haven't read it through yet, but I wonder if anyone has come across this problem? -- Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 --=====-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIEEARYIACkWIQRH+dBQHhGIeZBASUEhJn6T74bf0AUCYTszpwscaGlAeXBlaS5t ZQAKCRAhJn6T74bf0EiHAQCgquQgG3YbOc54cVS3vQGuxC5zZtuVe1SPVUTafQQk GgD+OMo/ymnwnomh9o4ox2siuZ2RYgkE5p4O6EMocue2ygw= =ZHE9 -----END PGP SIGNATURE----- --=====-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 11 09:38:18 2021 Received: (at 50502) by debbugs.gnu.org; 11 Sep 2021 13:38:19 +0000 Received: from localhost ([127.0.0.1]:39781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP3D0-00060B-My for submit@debbugs.gnu.org; Sat, 11 Sep 2021 09:38:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mP3Cx-0005zx-Nm for 50502@debbugs.gnu.org; Sat, 11 Sep 2021 09:38:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=M6ay7NzC+TTgOrKo7NVBqcPSR7B/X8fldRcbmv16R5Y=; b=De9LLAx+5pL8+8X8UuanLEFo2c 02CrFbbDQHkbMXO4Jra6nvxfHYOB4tUTB6Tf2t+LhuKNTkBDWpoJkKaG/lH4LZRYAJiWaZd0vRb55 xkVpsaPxjxeFb3UnULlVxsOdWlUAK0fYBppZA5e7WYWRidmJfklQN+pnujNEa8i28RhU=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mP3Co-0000b9-Qh; Sat, 11 Sep 2021 15:38:09 +0200 From: Lars Ingebrigtsen To: Yuchen Pei Subject: Re: bug#50502: grep-command cannot be set as a cons of the command and the point position References: <87a6kkyb89.fsf@ypei.me> Date: Sat, 11 Sep 2021 15:38:06 +0200 In-Reply-To: <87a6kkyb89.fsf@ypei.me> (Yuchen Pei's message of "Fri, 10 Sep 2021 20:29:58 +1000") Message-ID: <87a6kjkzb5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Yuchen Pei writes: > But not the following: > > (setq grep-command '("grep -inRH --color -A1 -B1 -E ." . 31)) > > as emacs would complain that grep-command is not a string, even though > both use read-shell-command for [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50502 Cc: 50502@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Yuchen Pei writes: > But not the following: > > (setq grep-command '("grep -inRH --color -A1 -B1 -E ." . 31)) > > as emacs would complain that grep-command is not a string, even though > both use read-shell-command for the command reading. Extending grep-command to allow it to specify where point should be sounds like a good idea, but `grep-command' is used extensively both in Emacs and (I'd guess) in external packages, so I think adding that functionality that way is probably a lot of work. (But I could be wrong.) Adding a new user option that says where point should be is probably a lot less work -- `grep-command-point' or something. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 11:03:08 2022 Received: (at 50502) by debbugs.gnu.org; 25 Aug 2022 15:03:08 +0000 Received: from localhost ([127.0.0.1]:51008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRENv-0004ke-JS for submit@debbugs.gnu.org; Thu, 25 Aug 2022 11:03:07 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRENo-0004jk-Jp for 50502@debbugs.gnu.org; Thu, 25 Aug 2022 11:03:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mhBIe/ddiwWprMIwYYYtH46fchpTQgJm1Lrc9SAA2pY=; b=TU9ulCXBTARqqSiQyUt7coBCpr MKA4SDJT6QoLcsTe5XhhZ5Cd/dDrpcyTaZoBTG+dxYM9ZvTrKlAha0oZMiwmwOAsBLQF1sQHWO+Ju rsrjL6P50md8L4Olhj5BCOYpDcb8ui3yMftLRVE+Z/EFUoz08F0mlUYE/emXna6mMaRw=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRENf-0000QU-KD; Thu, 25 Aug 2022 17:02:54 +0200 From: Lars Ingebrigtsen To: Yuchen Pei Subject: Re: bug#50502: grep-command cannot be set as a cons of the command and the point position In-Reply-To: <87a6kjkzb5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 11 Sep 2021 15:38:06 +0200") References: <87a6kkyb89.fsf@ypei.me> <87a6kjkzb5.fsf@gnus.org> X-Now-Playing: The Notwist's _Shrink_: "0-4" Date: Thu, 25 Aug 2022 17:02:51 +0200 Message-ID: <87y1vcgyck.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > Adding a new user option that says where point should be is probably a > lot less work -- `grep-command-point' or something. So I've now done this in Emacs 29. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50502 Cc: 50502@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > Adding a new user option that says where point should be is probably a > lot less work -- `grep-command-point' or something. So I've now done this in Emacs 29. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 11:03:11 2022 Received: (at control) by debbugs.gnu.org; 25 Aug 2022 15:03:11 +0000 Received: from localhost ([127.0.0.1]:51012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRENz-0004kv-0a for submit@debbugs.gnu.org; Thu, 25 Aug 2022 11:03:11 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRENw-0004kM-Tl for control@debbugs.gnu.org; Thu, 25 Aug 2022 11:03:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2uTCFNtR3phrwgDj3PRDaksEa1uLBjtJicdeAiUKDE0=; b=dIbNZTQjEfGbmhaqTcQZu6VP0X nFOx1J1qvHtF/cCsiBmBVQIbDBfn4F0nsTtN38Wyy6cnEr0xbXBjapJ7Aa+OoOal/0iZvkWv/NctU q2qMgAlxPCX2tmWrrBO0pAXJ2YUdynEUSs271jkZW+yDIwZhY7HHxSe+eVQPLMF4sDEk=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRENl-0000Qb-Ci for control@debbugs.gnu.org; Thu, 25 Aug 2022 17:03:03 +0200 Date: Thu, 25 Aug 2022 17:02:56 +0200 Message-Id: <87wnawgycf.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50502 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 50502 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 50502 29.1 quit From unknown Sat Aug 16 21:12:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 23 Sep 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator