From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuchen Pei Newsgroups: gmane.emacs.bugs Subject: bug#50502: 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" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5864"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.13; emacs 27.2 To: 50502@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 10 12:32:48 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mOdpw-0001MM-E2 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Sep 2021 12:32:48 +0200 Original-Received: from localhost ([::1]:58194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOdpv-00021A-28 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Sep 2021 06:32:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOdoG-0000qd-6W for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 06:31:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOdoE-00042N-NU for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 06:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mOdoE-0000dP-Kg for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 06:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuchen Pei Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Sep 2021 10:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50502 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.163126981532097 (code B ref -1); Fri, 10 Sep 2021 10:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Sep 2021 10:30:15 +0000 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 10 Sep 2021 06:30:04 -0400 (EDT) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:213979 Archived-At: --=====-=-= 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----- --=====-=-=--