From unknown Mon Jun 23 18:33:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27840: 26.0.50; vc-git-grep stopped working on git master Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jul 2017 17:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 27840@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150109190919116 (code B ref -1); Wed, 26 Jul 2017 17:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Jul 2017 17:58:29 +0000 Received: from localhost ([127.0.0.1]:57641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daQZo-0004yG-PP for submit@debbugs.gnu.org; Wed, 26 Jul 2017 13:58:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daQZm-0004y3-MY for submit@debbugs.gnu.org; Wed, 26 Jul 2017 13:58:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daQZg-0004oL-1W for submit@debbugs.gnu.org; Wed, 26 Jul 2017 13:58:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59781) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1daQZf-0004oF-Uw for submit@debbugs.gnu.org; Wed, 26 Jul 2017 13:58:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daQZe-0007Br-3Z for bug-gnu-emacs@gnu.org; Wed, 26 Jul 2017 13:58:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daQZa-0004lC-Sv for bug-gnu-emacs@gnu.org; Wed, 26 Jul 2017 13:58:18 -0400 Received: from gproxy6-pub.mail.unifiedlayer.com ([67.222.39.168]:38348) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1daQZa-0004eM-GE for bug-gnu-emacs@gnu.org; Wed, 26 Jul 2017 13:58:14 -0400 Received: from cmgw4 (unknown [10.0.90.85]) by gproxy6.mail.unifiedlayer.com (Postfix) with ESMTP id 656341E0633 for ; Wed, 26 Jul 2017 11:57:58 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id pVxt1v0052f2jeq01VxwSK; Wed, 26 Jul 2017 11:57:58 -0600 X-Authority-Analysis: v=2.2 cv=EI526xRC c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=G3gG6ho9WtcA:10 a=pGLkceISAAAA:8 a=x5PtszPMrEDwkMb7yNEA:9 a=7uZWHWO2zrz0ygfh:21 a=Bbh_bnKCt9_vG73I:21 a=6kGIvZw6iX1k4Y-7sg4_:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From: Sender:Reply-To:Cc: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=8qqRyWA4edlSJOpGTcZx3KpKfnbH+nhpebvZLnaFqMA=; b=L1mdLqKXjUdrCOBrzOjROjHcDL 6pHrWcYl0mzqPHcZWKipuFiGViD2h0z3LIBsA8ubPe8alRmKJ0w9CocjCLYR4oD23yRFahRDOs+yT TzW0GG90hloJF1g3xaSMGA3WG; Received: from 174-29-39-24.hlrn.qwest.net ([174.29.39.24]:56564 helo=pokyo) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1daQZF-001LRj-La; Wed, 26 Jul 2017 11:57:53 -0600 From: Tom Tromey X-Attribution: Tom Date: Wed, 26 Jul 2017 11:57:51 -0600 Message-ID: <87shhj3wtc.fsf@pokyo> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.29.39.24 X-Exim-ID: 1daQZF-001LRj-La X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-29-39-24.hlrn.qwest.net (pokyo) [174.29.39.24]:56564 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) 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: -5.0 (-----) I am running a build of git master from yesterday. I tried M-x vc-git-grep. This successfully runs the grep and puts the output into *grep*. However, the highlighting is incorrect and M-x next-error claims there are no grep hits. Using C-c (compile-goto-error) in *grep* also does not work. In GNU Emacs 26.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.22.17) of 2017-07-25 built on pokyo Repository revision: 60b74190286afdc85ccf4e5042a5b89732e2a320 Windowing system distributor 'Fedora Project', version 11.0.11903000 System Description: Fedora release 25 (Twenty Five) Recent messages: Wrote /home/tromey/.newsrc.eld Saving /home/tromey/.newsrc.eld...done nnimap read 0k from imap.gmail.com Expiring articles...done Saving Gnus registry (92421 entries) to ~/.gnus.registry.eieio... Saving Gnus registry (size 92421) to ~/.gnus.registry.eieio...done Saving /home/tromey/.newsrc.eld... Saving file /home/tromey/.newsrc.eld... Wrote /home/tromey/.newsrc.eld Saving /home/tromey/.newsrc.eld...done Configured using: 'configure --prefix=/home/tromey/Emacs/install --with-modules' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES LIBSYSTEMD Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Group Minor modes in effect: erc-spelling-mode: t erc-truncate-mode: t diff-auto-refine-mode: t gnus-topic-mode: t gnus-undo-mode: t which-function-mode: t projectile-global-mode: t projectile-mode: t erc-notify-mode: t erc-notifications-mode: t erc-services-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-netsplit-mode: t erc-hl-nicks-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t savehist-mode: t cl-old-struct-compat-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/26.0.50/lisp/play/bubbles Features: (shadow emacsbug dxr idutils gnus-html help-fns radix-tree url-cache erc-spelling erc-truncate cursor-sensor mhtml-mode css-mode smie eww mm-url url-queue bbdb-sc supercite regi mailalias mail-hist nnir git-rebase-mode git-commit-mode log-edit term/xterm xterm dabbrev copyright find-dired misearch multi-isearch smerge-mode js sgml-mode cc-mode cc-fonts cc-guess cc-menus cc-cmds bug-reference add-log log-view pcvs-util webjump flow-fill bbdb-gui bbdb-hooks bbdb-rmail rmailsum vc-mtn vc-hg vc-git diff-mode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs sort gnus-cite smiley shr-color url-http url url-proxy url-privacy url-history url-auth url-cookie url-domsuf url-gw url-expand url-methods url-util shr svg dom browse-url mm-archive gnus-bcklg gnus-async qp gnus-ml disp-table gnus-topic nndraft nnmh nnfolder utf-7 bbdb-gnus bbdb-snarf mail-extr bbdb-com network-stream nsm starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache gnus-registry registry eieio-base gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo smtpmail sendmail gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message puny rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr flyspell ispell diminish appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs which-func imenu edmacro kmacro projectile grep compile ibuf-ext ibuffer ibuffer-loaddefs autorevert filenotify desktop frameset cus-start cus-load erc-notify erc-desktop-notifications erc-services notifications dbus xml erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete pcomplete erc-track erc-match erc-netsplit erc-hl-nicks easy-mmode color erc-button erc-fill erc-stamp wid-edit erc-goodies erc erc-backend erc-compat format-spec thingatpt pp dired-aux dired-x dired dired-loaddefs warnings advice vc-dir ewoc vc vc-dispatcher flycheck cl-extra json map find-func help-mode rx subr-x dash cc-styles cc-align cc-engine cc-vars cc-defs bbdb cl timezone ange-ftp comint ansi-color ring server savehist finder-inf bbdb-autoloads dwarf-mode-autoloads lisppaste-autoloads pydoc-info-autoloads info-look weblogger-autoloads info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 3013500 1806998) (symbols 48 106763 55) (miscs 40 24752 5430) (strings 32 1386985 121382) (string-bytes 1 63141799) (vectors 16 114896) (vector-slots 8 3399404 294794) (floats 8 535 2243) (intervals 56 16523 3246) (buffers 992 126)) From unknown Mon Jun 23 18:33:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27840: 26.0.50; vc-git-grep stopped working on git master Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jul 2017 23:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tom Tromey , Dmitry Gutov Cc: 27840@debbugs.gnu.org Received: via spool by 27840-submit@debbugs.gnu.org id=B27840.150111184916138 (code B ref 27840); Wed, 26 Jul 2017 23:31:01 +0000 Received: (at 27840) by debbugs.gnu.org; 26 Jul 2017 23:30:49 +0000 Received: from localhost ([127.0.0.1]:57769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daVlR-0004CE-G1 for submit@debbugs.gnu.org; Wed, 26 Jul 2017 19:30:49 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:38073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daVlP-0004C1-U9 for 27840@debbugs.gnu.org; Wed, 26 Jul 2017 19:30:48 -0400 Received: by mail-io0-f196.google.com with SMTP id l7so12144325iof.5 for <27840@debbugs.gnu.org>; Wed, 26 Jul 2017 16:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=0vkrXAQLBJD4hrH+tG8oElCMKdsz10isMDJ7A/zU6Ik=; b=UNxxy5fx1DLbKrVufC+dr1lhPUucJ3wDYTDgXroP501fC1jspHkOgCO6opEPCV05R7 Rs/QRarZ6IUIddsz9AQbRkfusWUUt95IgNGe9GSWfd0lwtsxboBkHgdatMcr8eiLKX08 mbW88y1Z5gyRBVLs6yjbXbDly9vO+sKYEfkdWHrjKgC6cxi4JB7ZM9EpnGK8eAuWGGer YyGqfxO9YImfZJxIY+qcJttsxUsYAKF31uaDFnodBpbf1Hp/i0JZL2bvjPplMw9Wrlc4 sFlFCccRH5mLJqX3xKKbXec5Us7fg52XJINX4PaNQXvjKJIDERG+o5E0cw/gVUJUUSI4 0OVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=0vkrXAQLBJD4hrH+tG8oElCMKdsz10isMDJ7A/zU6Ik=; b=FCtUolcOMglwV0gqMTLlPNzUXm8l5P8vb8X7+gxPNVRNvwQxiiadBsTu9qBqEQy7sQ w7Dbfl/gykaYNVB53oNwgzKtwtF+G9Gs4k5iuifTc0RkGrxuTwLcZLDf/XgtvUhIvjQm Ak2fISw9SoKlBnnFlVj1Yvmwle9r5B2M69WrVvPC4XmakxQ7IJAcZugrYesBXoLC2TiF uEz2K4+hRdK4C7DZsko5larWKHS4TfnpaHAwW6UhNsGMqbsM7q/JvJ/UwvOEPgJddtsd Y6lpiufhmeJCOebzy6SJAAvgyR/cuZVSLSpuNmtR83r/q+dfHSQrGb94Ez3b1zlGe58Q ko1A== X-Gm-Message-State: AIVw113JvfbrJ/+TMPUtGU8ide6HWqRf42CgZt6yXxVksuPYUTjmM+Tm 3UHwdozOvG8zjy/R X-Received: by 10.107.134.87 with SMTP id i84mr2966404iod.255.1501111841950; Wed, 26 Jul 2017 16:30:41 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id g5sm7336406ioj.30.2017.07.26.16.30.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Jul 2017 16:30:41 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87shhj3wtc.fsf@pokyo> Date: Wed, 26 Jul 2017 19:32:18 -0400 In-Reply-To: <87shhj3wtc.fsf@pokyo> (Tom Tromey's message of "Wed, 26 Jul 2017 11:57:51 -0600") Message-ID: <87inie93lp.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.1 (--) 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.1 (--) --=-=-= Content-Type: text/plain Tom Tromey writes: > I am running a build of git master from yesterday. > I tried M-x vc-git-grep. > > This successfully runs the grep and puts the output into *grep*. > However, the highlighting is incorrect and M-x next-error claims there > are no grep hits. Using C-c (compile-goto-error) in *grep* also does > not work. This is due to [1: 644cdd1aa0]. 'git grep' also has a '--null' option, but the output is a bit different. Here is a patch to handle it, although it's not complete: it doesn't take the value of grep-use-null-filename-separator into account. Perhaps we should instead disable this option by default; when I introduced it, I didn't think about the fact that grep.el is used for not-quite-grep programs as well. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Use-null-for-git-grep-too-Bug-27840.patch Content-Description: patch >From 60acf5de6dacb5ea3430a1115ba8c1151a07d526 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 26 Jul 2017 19:21:55 -0400 Subject: [PATCH v1] Use '--null' for 'git grep' too (Bug#27840) * lisp/vc/vc-git.el (vc-git-grep): Pass '--null'. * lisp/progmodes/grep.el (grep--regexp-alist-bin-matcher): Handle the slightly different output from 'git grep's --null option. --- lisp/progmodes/grep.el | 5 +++-- lisp/vc/vc-git.el | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 2ddaf884bc..4723290fbe 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -387,8 +387,9 @@ (defconst grep--regexp-alist-column (defconst grep--regexp-alist-bin-matcher '("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) (defconst grep-with-null-regexp-alist - `(("^\\([^\0]+\\)\\(\0\\)\\([0-9]+\\):" 1 3 ,grep--regexp-alist-column nil nil - (2 '(face unspecified display ":"))) + `(("^\\([^\0]+\\)\\(\0\\)\\([0-9]+\\)\\([\0:]\\)" 1 3 ,grep--regexp-alist-column nil nil + (2 '(face unspecified display ":")) + (4 '(face unspecified display ":"))) ,grep--regexp-alist-bin-matcher) "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index cc3e295641..1cdcfb3a5c 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1433,8 +1433,8 @@ (defun vc-git-grep (regexp &optional files dir) (setq command nil)) (setq dir (file-name-as-directory (expand-file-name dir))) (setq command - (grep-expand-template "git --no-pager grep -n -e -- " - regexp files)) + (grep-expand-template + "git --no-pager grep -n --null -e -- " regexp files)) (when command (if (equal current-prefix-arg '(4)) (setq command -- 2.11.1 --=-=-= Content-Type: text/plain [1: 644cdd1aa0]: 2017-07-19 20:03:00 -0400 Use grep's --null option (Bug#6843) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=644cdd1aa0a10dbfffa3b9b4c7a97f8cddded0b8 --=-=-=-- From unknown Mon Jun 23 18:33:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27840: 26.0.50; vc-git-grep stopped working on git master Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jul 2017 13:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: npostavs@users.sourceforge.net, Tom Tromey Cc: 27840@debbugs.gnu.org Received: via spool by 27840-submit@debbugs.gnu.org id=B27840.150116179710458 (code B ref 27840); Thu, 27 Jul 2017 13:24:01 +0000 Received: (at 27840) by debbugs.gnu.org; 27 Jul 2017 13:23:17 +0000 Received: from localhost ([127.0.0.1]:58078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dail3-0002ic-M1 for submit@debbugs.gnu.org; Thu, 27 Jul 2017 09:23:17 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:35869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dail2-0002iO-ET for 27840@debbugs.gnu.org; Thu, 27 Jul 2017 09:23:16 -0400 Received: by mail-wr0-f181.google.com with SMTP id y43so143577974wrd.3 for <27840@debbugs.gnu.org>; Thu, 27 Jul 2017 06:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KNq5hK0jhIXBkjJQBE52uTqzvuIV0TTQfTposU/IbkU=; b=UVp/l1zU9lWMSBHBo/+/1dcV4HvNB77S6dxwjWKbbcrSQvWpLyTvSPT95c2BxcTCw2 BnALNEfFTKejru0M4Oq6srMIBMps3F6i5qyGP+UNd9Se5K5uw2O659gO5OKz76KNRLn4 FJtvMjCFaR/dSkSjc3XEBAaOH4dsfSJl1eykyCV9QRohcEFTkKwL16HIjq1wy1kjQR5C 9/KVtYFDlH+1rkA361GLjyyiTrrfP8VdyvA2zJQw+ovvzZffi9lPU+JiC+wDOB2XLila 4T8oOBVSOUBoMf6r2uA/jShxzwoF9oqABXPnbfyr5TprMMXI4I6QduCHocUBFZ+8SOJo BWSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KNq5hK0jhIXBkjJQBE52uTqzvuIV0TTQfTposU/IbkU=; b=oFc/WBUwAGkbnOxQ+cuPvTCvACPoYjIcJpU8XIUq/Y/2yV12phnooyVvfaPaVpl0wM EZx49mDo0DTcoemsaCu/GrdZHX7TChsznGKRGNq8xfvnu7X6x7nSGxXm73NdDNtRaNzq wkSB8sJHB5pumtKTDDJeUbaem11kPaDswmPcFOhT5KS0Q5eY7lVvAP1idOW9ut5A9yFI tT4qz8dIFRTPJCgxP3PkUccFUJLccvzhyZwRedNSmmtdZZVyWtZJNdGtjtLphlC/9tBH bvUnUv0yD76NI+aLwvWGDtR0N5n+ddzJBEffFVH9qbZfs4Sr0RJT8LiLO4zLN9hR1X39 afFA== X-Gm-Message-State: AIVw110MieXYnTzkmAHnv9DFbUmAxFw3WaXBWfZNuNvYRt7BADUuHZ+8 zichibGvOgvxsefFHgM= X-Received: by 10.223.165.153 with SMTP id g25mr4114255wrc.208.1501161789391; Thu, 27 Jul 2017 06:23:09 -0700 (PDT) Received: from [192.168.0.133] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by smtp.googlemail.com with ESMTPSA id n87sm15706967wmi.47.2017.07.27.06.23.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jul 2017 06:23:08 -0700 (PDT) References: <87shhj3wtc.fsf@pokyo> <87inie93lp.fsf@users.sourceforge.net> From: Dmitry Gutov Message-ID: <07272ad0-8cd0-f75e-1cf7-8f66e1d77466@yandex.ru> Date: Thu, 27 Jul 2017 16:23:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Thunderbird/55.0 MIME-Version: 1.0 In-Reply-To: <87inie93lp.fsf@users.sourceforge.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) 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 (--) On 7/27/17 2:32 AM, npostavs@users.sourceforge.net wrote: > Perhaps we should > instead disable this option by default; when I introduced it, I didn't > think about the fact that grep.el is used for not-quite-grep programs as > well. Or we can try to think of them as separate. I.e., the patch below also works. And if we want to use the --null option for vc-git-grep, we can construct a derivative alist in vc-git.el. Up to you, of course. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index cc3e295..f52dc6e 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1443,7 +1443,8 @@ vc-git-grep (add-to-history 'grep-history command)))) (when command (let ((default-directory dir) - (compilation-environment (cons "PAGER=" compilation-environment))) + (compilation-environment (cons "PAGER=" compilation-environment)) + grep-use-null-filename-separator) ;; Setting process-setup-function makes exit-message-function work ;; even when async processes aren't supported. (compilation-start command 'grep-mode)) From unknown Mon Jun 23 18:33:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27840: 26.0.50; vc-git-grep stopped working on git master Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jul 2017 18:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 27840@debbugs.gnu.org, Tom Tromey Received: via spool by 27840-submit@debbugs.gnu.org id=B27840.150143800911127 (code B ref 27840); Sun, 30 Jul 2017 18:07:01 +0000 Received: (at 27840) by debbugs.gnu.org; 30 Jul 2017 18:06:49 +0000 Received: from localhost ([127.0.0.1]:34507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbsc4-0002tP-Qw for submit@debbugs.gnu.org; Sun, 30 Jul 2017 14:06:49 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:36451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbsc2-0002tC-TC for 27840@debbugs.gnu.org; Sun, 30 Jul 2017 14:06:47 -0400 Received: by mail-io0-f195.google.com with SMTP id j32so12166221iod.3 for <27840@debbugs.gnu.org>; Sun, 30 Jul 2017 11:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=VDYwBqHd8OGE8GMx0ZsfrEGVpv66JLcPcJEBBe0SLsM=; b=F5O4kbbBpNSLi+OpOYS8mR+ucMR7HDJdrzliZUbJPuVlA/oQkqBfTZGT+N0MC2wx8K Mx0reU/ZsIzwzFWxRqwdRA/3I/8EzsAtYFAtcYFxgq50XZcXMzoS/9BlGGsVu5Luv0UQ K5gBTlQxfcYPjaSbWM9/BoV8E5hxI4DPY1ZP83jzhdXVfaF4Zyt51EiXw5w7V6BlJZvb 9ey8JCe30RNwso4fThWFuXYcA1uN/ONInll9dEP6TEnk6Y9usYJtCItT3tnQGWpsPzgt LBQTZ/UTm9TeQCDbJGSUeTJALS6cLNojaidnVz/UWMIRJmkdTUhsPEjOxCKhsO6EHs3u 2kHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=VDYwBqHd8OGE8GMx0ZsfrEGVpv66JLcPcJEBBe0SLsM=; b=Zn8AKqdJVp/uRA5RHPvubc/VfSP4HHJuRdikRz8+RGuJR5pN/5sYU5W5k/1LVzzd8r RI3615HDDf4541UO7YQRq7lwgNlBGQS8t4qx0M1pnCHUm1IrPwe7xNDqAlTToPVJ72bI jA87rTLUYZ2osAuMeyetfF+Xe1ZBjW/pc4mk8kneGOfiUYnPOARTe8ydbZfp+MKtp15o EbSb4KxXxZBCzr2biAvc4J9L3jymPtmuS18NcYY7kY3kwb+tGtWuvYkg1Xya/tpBhpcN lFgal2QLBGIHdEw2GuQdbsUXV4gakkP9rr+3pYSsDdNV/X0TfukVEoXi6SoWfCHtPAdX XyeA== X-Gm-Message-State: AIVw113nNeK7UZYFkEvszwvFIlO4uh5pPEo9TqH0XlD+bEG9gGyBhzJR sFPUwOgIp83Cqr81 X-Received: by 10.107.166.203 with SMTP id p194mr1905220ioe.48.1501438001267; Sun, 30 Jul 2017 11:06:41 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 63sm512530ith.4.2017.07.30.11.06.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Jul 2017 11:06:40 -0700 (PDT) From: npostavs@users.sourceforge.net In-Reply-To: <07272ad0-8cd0-f75e-1cf7-8f66e1d77466@yandex.ru> (Dmitry Gutov's message of "Thu, 27 Jul 2017 16:23:06 +0300") References: <87shhj3wtc.fsf@pokyo> <87inie93lp.fsf@users.sourceforge.net> <07272ad0-8cd0-f75e-1cf7-8f66e1d77466@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Date: Sun, 30 Jul 2017 14:08:20 -0400 Message-ID: <8760e994rv.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) 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.1 (--) Dmitry Gutov writes: > On 7/27/17 2:32 AM, npostavs@users.sourceforge.net wrote: > >> Perhaps we should >> instead disable this option by default; when I introduced it, I didn't >> think about the fact that grep.el is used for not-quite-grep programs as >> well. > > Or we can try to think of them as separate. I.e., the patch below also > works. Right, but the question is: are there n+1 other places where we will need to do this? > And if we want to use the --null option for vc-git-grep, we can > construct a derivative alist in vc-git.el. > > Up to you, of course. > > (let ((default-directory dir) > - (compilation-environment (cons "PAGER=" compilation-environment))) > + (compilation-environment (cons "PAGER=" compilation-environment)) > + grep-use-null-filename-separator) From unknown Mon Jun 23 18:33:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27840: 26.0.50; vc-git-grep stopped working on git master Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Aug 2017 13:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: npostavs@users.sourceforge.net Cc: 27840@debbugs.gnu.org, Tom Tromey Received: via spool by 27840-submit@debbugs.gnu.org id=B27840.150159458721845 (code B ref 27840); Tue, 01 Aug 2017 13:37:01 +0000 Received: (at 27840) by debbugs.gnu.org; 1 Aug 2017 13:36:27 +0000 Received: from localhost ([127.0.0.1]:36261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcXLW-0005gH-MW for submit@debbugs.gnu.org; Tue, 01 Aug 2017 09:36:26 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcXLU-0005g0-SL for 27840@debbugs.gnu.org; Tue, 01 Aug 2017 09:36:25 -0400 Received: by mail-wm0-f66.google.com with SMTP id x64so3104008wmg.1 for <27840@debbugs.gnu.org>; Tue, 01 Aug 2017 06:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dCUdrpL9RnMZON/MGvcU77WkLKc0EAeV7KKb2XZiyV8=; b=Jx4wLy70HWl86rtPlijU7vHeR1oo06j1js5soCEMh9TQBhy6NW3PK5GBnrdOXKsN75 NZO0Q5RB76550ybCoUhgjxyFWJaQurKE5IAiu5gTI/fnjPrGmqGa2xAWo+s/pggyzmZP ZPBCGUCJHYeDZM1SDxXLdBzqWcGuaUO5Fx3l//PgpXEQsDY+YlexmJYeu4Yk+I3Kqgb/ nvU4E+m8Eluk9BqeqiC1SZZc8naXyx3tcxNW982rX4rMWuSRkFumk+A2k7f4QtW0XUa0 0wZylkhN61LrOMt5TJEiKpaZ6oUK9VueL011hwCW1LRHEYNXegejqf5S4USNNOFnlpYe QHeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dCUdrpL9RnMZON/MGvcU77WkLKc0EAeV7KKb2XZiyV8=; b=uRNwbN2mwlmp7VDrvxVvBrFXRtpLzF7/AZ/bLjY+j5dkgpHOuwYGWG7fPmNiS5VexO MjC36viJKkNe7ECCYTB9B2JRZRB71LGxEbKsJJY0SnOU6SwxHcAn0S8hEy0geVoBgIiP IZhf2vIEn4ZIk6DWYoKhjLo+ZxyF3lDsyp7vtybrp396bPlFdCFq5qDI+0bflOEvqEyG VUhXF7kcYPP/1tLARFJjlkj3ykK9StkgWOjMqP7Phs+goJ1EQAUwwq4voa9T/JmdCzcG GGivvkqbrHZemMmSwkcMWQyqVoQztswmDgvwZW6i2GNVarPa5M08wEXVkCTzA0I2T6JX uzsg== X-Gm-Message-State: AIVw113pmic9fHRAsjVT1RsyU4ht8upFriCwQrmVFvZ67RFscxW2qOTZ BcuxMdKPulERcQ== X-Received: by 10.80.168.34 with SMTP id j31mr17771707edc.87.1501594579270; Tue, 01 Aug 2017 06:36:19 -0700 (PDT) Received: from [192.168.0.133] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by smtp.googlemail.com with ESMTPSA id f11sm4424709ede.57.2017.08.01.06.36.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2017 06:36:18 -0700 (PDT) References: <87shhj3wtc.fsf@pokyo> <87inie93lp.fsf@users.sourceforge.net> <07272ad0-8cd0-f75e-1cf7-8f66e1d77466@yandex.ru> <8760e994rv.fsf@users.sourceforge.net> From: Dmitry Gutov Message-ID: <17696669-9155-d7d2-ffe3-97bb62ceb733@yandex.ru> Date: Tue, 1 Aug 2017 16:36:17 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Thunderbird/55.0 MIME-Version: 1.0 In-Reply-To: <8760e994rv.fsf@users.sourceforge.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) 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: 0.7 (/) On 7/30/17 9:08 PM, npostavs@users.sourceforge.net wrote: > Right, but the question is: are there n+1 other places where we will > need to do this? I don't know. If we really want the default settings of grep-mode to fit all grep-like programs, then the task is suddenly harder, and we do want to default to the non-null. Although, honestly, in that case, I would consider reverting the patch, because it increases complexity, yet is unlikely (as non-default) to be used by the majority of the users. Alternatively, one regexp would have to handle both versions, with and without null (merging grep-with-null-regexp-alist and grep-fallback-regexp-alist together, if it's at all possible). From unknown Mon Jun 23 18:33:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27840: 26.0.50; vc-git-grep stopped working on git master Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Aug 2017 03:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 27840@debbugs.gnu.org, Tom Tromey Received: via spool by 27840-submit@debbugs.gnu.org id=B27840.150172970525555 (code B ref 27840); Thu, 03 Aug 2017 03:09:01 +0000 Received: (at 27840) by debbugs.gnu.org; 3 Aug 2017 03:08:25 +0000 Received: from localhost ([127.0.0.1]:39180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dd6Ur-0006e7-6D for submit@debbugs.gnu.org; Wed, 02 Aug 2017 23:08:25 -0400 Received: from mail-io0-f171.google.com ([209.85.223.171]:38540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dd6Up-0006dv-TZ for 27840@debbugs.gnu.org; Wed, 02 Aug 2017 23:08:24 -0400 Received: by mail-io0-f171.google.com with SMTP id g71so2029524ioe.5 for <27840@debbugs.gnu.org>; Wed, 02 Aug 2017 20:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=6K2hHmEc8Wh6Gob96SpiDyHkdvWtS1sgf2YNEkGnek0=; b=W6slUOQKsh7/4/0a8MilXUMApnDjQylOkTaiNZBU/prpC12xdN+BUB0CaTnKpo2dKH l+DR18tCaSDf9eKLaFJw57YM44c3c+DBkk0Z1MGqLj3Iu3pM5nKqvynkQ/OvxduWXgrr 9WYUPXA1pQEn12qL5jD2EhOIwTXqC+PGBsH6ExOHsURwqMDTYbnPpCbYHMfwva15l74t mBWeDh73EgZzJQvaF4M3iGPr2ljZfSy8D6kp+X4n6PTqlbSdZc/23Z4Cgdclgi0X/9AQ tJR5LK6W3fKG6kZ0qIpZozNXKb5B7Jv0+XKdanBVUh/VnXPmzQ1xEdz+htTaZRC2HMU7 bIAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=6K2hHmEc8Wh6Gob96SpiDyHkdvWtS1sgf2YNEkGnek0=; b=OrQFRmJ7+qgj/M77DQIQKu41/B2lUUNygyrQ43M2YAKcxQHh6hhsrs9BnVg94Pm2Ci iK27tnFiVcsRHgx4AeVoce3l95wTMeyj00G/kohIFuJ/0WrAj8Elb8wEl/xg64dL912o YfsjYkDyYU7NYCtKO90zgI5HwNxYW+VOWfgsVw/9kDOYsUu/qzRG2YzUAc6hBgEE1OZA rrpA7HF8JWxs7DVt95cnKQBXhsrNkkeSwxqQTvOf3Nk67DHPA5XjjC9+LNyUG8pVmYaR fMZSoNCqMdWjNbhGGYt0S7bHq5z5i4sxHaGxMw/82pgptJluurn977+dnIbYTdlmTHcA rcJA== X-Gm-Message-State: AHYfb5iGGBAQrW+OSc1zEoRMPhfllBiQfSY4Jml3Nb8clac77jgzkgZq LTKLxCe1H2fP1A== X-Received: by 10.107.147.66 with SMTP id v63mr222632iod.126.1501729698443; Wed, 02 Aug 2017 20:08:18 -0700 (PDT) Received: from zony ([45.2.119.48]) by smtp.googlemail.com with ESMTPSA id c2sm2758565itd.43.2017.08.02.20.08.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Aug 2017 20:08:17 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87shhj3wtc.fsf@pokyo> <87inie93lp.fsf@users.sourceforge.net> <07272ad0-8cd0-f75e-1cf7-8f66e1d77466@yandex.ru> <8760e994rv.fsf@users.sourceforge.net> <17696669-9155-d7d2-ffe3-97bb62ceb733@yandex.ru> Date: Wed, 02 Aug 2017 23:09:57 -0400 In-Reply-To: <17696669-9155-d7d2-ffe3-97bb62ceb733@yandex.ru> (Dmitry Gutov's message of "Tue, 1 Aug 2017 16:36:17 +0300") Message-ID: <87wp6l73ei.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.1 (--) 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.1 (--) --=-=-= Content-Type: text/plain Dmitry Gutov writes: > Alternatively, one regexp would have to handle both versions, with and > without null (merging grep-with-null-regexp-alist and > grep-fallback-regexp-alist together, if it's at all possible). It is possible, the regexp gets a bit more complicated and the without-null case can now become confused by files containing NUL bytes, but that's probably fairly rare and things do get simpler again for callers. Seems like the best solution overall. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v2-0001-Merge-null-and-without-null-regexp-alists-Bug-278.patch Content-Description: patch >From a556574087226edd1f2aa9f3834a5dfb7968080c Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 30 Jul 2017 11:07:01 -0400 Subject: [PATCH v2] Merge null and without-null regexp alists (Bug#27840, Bug#27873) * lisp/progmodes/grep.el (grep--regexp-alist-column) (grep--regexp-alist-bin-matcher, grep-with-null-regexp-alist) (grep-fallback-regexp-alist): Remove. (grep-regexp-alist): Recombine their contents here. (grep-mode): * lisp/progmodes/xref.el (xref-collect-matches): Use the variable `grep-regexp-alist' rather than the function. --- lisp/progmodes/grep.el | 86 ++++++++++++++++++++++---------------------------- lisp/progmodes/xref.el | 2 +- 2 files changed, 39 insertions(+), 49 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 61b82df46a..466b524c79 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -31,7 +31,6 @@ (require 'compile) - (defgroup grep nil "Run `grep' and display the results." :group 'tools @@ -366,53 +365,44 @@ (defvar grep-last-buffer nil Notice that using \\[next-error] or \\[compile-goto-error] modifies `compilation-last-buffer' rather than `grep-last-buffer'.") -(defconst grep--regexp-alist-column - ;; Calculate column positions (col . end-col) of first grep match on a line - (cons - (lambda () - (when grep-highlight-matches - (let* ((beg (match-end 0)) - (end (save-excursion (goto-char beg) (line-end-position))) - (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))) - (when mbeg - (- mbeg beg))))) - (lambda () - (when grep-highlight-matches - (let* ((beg (match-end 0)) - (end (save-excursion (goto-char beg) (line-end-position))) - (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)) - (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) - (when mend - (- mend beg))))))) -(defconst grep--regexp-alist-bin-matcher - '("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) -(defconst grep-with-null-regexp-alist - `(("^\\([^\0]+\\)\\(\0\\)\\([0-9]+\\):" 1 3 ,grep--regexp-alist-column nil nil - (2 '(face unspecified display ":"))) - ,grep--regexp-alist-bin-matcher) - "Regexp used to match grep hits. -See `compilation-error-regexp-alist'.") -(defconst grep-fallback-regexp-alist - `(;; Use a tight regexp to handle weird file names (with colons - ;; in them) as well as possible. E.g., use [1-9][0-9]* rather - ;; than [0-9]+ so as to accept ":034:" in file names. - ("^\\(.*?[^/\n]\\):[ \t]*\\([1-9][0-9]*\\)[ \t]*:" - 1 2 ,grep--regexp-alist-column) - ,grep--regexp-alist-bin-matcher) - "Regexp used to match grep hits when `--null' is not supported. -See `compilation-error-regexp-alist'.") - -(defvaralias 'grep-regex-alist 'grep-with-null-regexp-alist) -(make-obsolete-variable - 'grep-regex-alist "Call `grep-regexp-alist' instead." "26.1") - ;;;###autoload -(defun grep-regexp-alist () - "Return a regexp alist to match grep hits. -The regexp used depends on `grep-use-null-filename-separator'. -See `compilation-error-regexp-alist' for format details." - (if grep-use-null-filename-separator - grep-with-null-regexp-alist grep-fallback-regexp-alist)) +(defconst grep-regexp-alist + `((,(concat "^\\(?:" + ;; Parse using NUL characters when `--null' is used. + ;; Note that we must still assume no newlines in + ;; filenames due to "foo: Is a directory." type + ;; messages. + "\\(?1:[^\0\n]+\\)\\(?3:\0\\)\\(?2:[0-9]+\\):" + "\\|" + ;; Fallback if `--null' is not used, use a tight regexp + ;; to handle weird file names (with colons in them) as + ;; well as possible. E.g., use [1-9][0-9]* rather than + ;; [0-9]+ so as to accept ":034:" in file names. + "\\(?1:[^\n:]+?[^\n/:]\\):[\t ]*\\(?2:[1-9][0-9]*\\)[\t ]*:" + "\\)") + 1 2 + ;; Calculate column positions (col . end-col) of first grep match on a line + (,(lambda () + (when grep-highlight-matches + (let* ((beg (match-end 0)) + (end (save-excursion (goto-char beg) (line-end-position))) + (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))) + (when mbeg + (- mbeg beg))))) + . + ,(lambda () + (when grep-highlight-matches + (let* ((beg (match-end 0)) + (end (save-excursion (goto-char beg) (line-end-position))) + (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)) + (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) + (when mend + (- mend beg)))))) + nil nil + (3 '(face nil display ":"))) + ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) + "Regexp used to match grep hits. +See `compilation-error-regexp-alist' for format details.") (defvar grep-first-column 0 ; bug#10594 "Value to use for `compilation-first-column' in grep buffers.") @@ -783,7 +773,7 @@ (define-compilation-mode grep-mode "Grep" (set (make-local-variable 'compilation-error-face) grep-hit-face) (set (make-local-variable 'compilation-error-regexp-alist) - (grep-regexp-alist)) + grep-regexp-alist) ;; compilation-directory-matcher can't be nil, so we set it to a regexp that ;; can never match. (set (make-local-variable 'compilation-directory-matcher) '("\\`a\\`")) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index cc9b794c5a..35a5c8862f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -929,7 +929,7 @@ (defun xref-collect-matches (regexp files dir ignores) (expand-file-name dir) ignores)) (buf (get-buffer-create " *xref-grep*")) - (`(,grep-re ,file-group ,line-group . ,_) (car (grep-regexp-alist))) + (`(,grep-re ,file-group ,line-group . ,_) (car grep-regexp-alist)) (status nil) (hits nil)) (with-current-buffer buf -- 2.11.1 --=-=-=-- From unknown Mon Jun 23 18:33:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27840: 26.0.50; vc-git-grep stopped working on git master Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 01:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: npostavs@users.sourceforge.net Cc: 27840@debbugs.gnu.org, Tom Tromey Received: via spool by 27840-submit@debbugs.gnu.org id=B27840.150180838225326 (code B ref 27840); Fri, 04 Aug 2017 01:00:02 +0000 Received: (at 27840) by debbugs.gnu.org; 4 Aug 2017 00:59:42 +0000 Received: from localhost ([127.0.0.1]:40570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddQxq-0006aQ-1E for submit@debbugs.gnu.org; Thu, 03 Aug 2017 20:59:42 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddQxo-0006aE-Pe for 27840@debbugs.gnu.org; Thu, 03 Aug 2017 20:59:41 -0400 Received: by mail-wr0-f195.google.com with SMTP id y43so2018157wrd.0 for <27840@debbugs.gnu.org>; Thu, 03 Aug 2017 17:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kY9si8cGoWnKNl0LNiD1+22X5f9VCZ88GjJd1afDopA=; b=nOQB475QuZ4IeMHUlYppehv19yyCFoFsxEjSaGfQb3ZjaDmXRUlFmf+GliqdYhwFnf 7PvFGuEFBryxdPX22DTcichNoROk6Mxa+3tDpwdLRkFH6kdIcO+gZOHFMKMpmSUcIVjU ytGRQK9bkY9IuAT/vPrSMXUhKAseTX64u5C4QHJNFgefYGKo/w8BizQaSCPbH8IXlBKN ipWrAnIpbL+2GVBRcwXTd4zXv1gzrnMgCjcMCD0d+b/tOJYzhfnAvLie/OJtXhVoGij0 aomnigvhaUvN1HaYFMBf2AzJyLbY26kTbIPH6Sg/M2DtjA7il6kaSR4gygFYsrwQC3tb NnkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kY9si8cGoWnKNl0LNiD1+22X5f9VCZ88GjJd1afDopA=; b=fMViwZULgQbB3aTjXvpxnrxiItY7K/Qv7XgIUI54W6UCuuenEMdR2A6YAUy2ISe0wv dAR4E7UYGTib6r7/wqotzijqP6qQkoEhhdbmW2v2AnGlYLEZvBelJkrCCFSIppj+4Og4 2lwxjoKgQfEJ0Mg60wxJBrZ5Q1OZwwBuUr44XaTaPDl0IQ3DOAboDH8PBhsZwaqiDSGE JJTe0VaWNZxDJcUwrMt3urLP3aLh00WKZPqZW+EF7zjBzdFZ9rOslBVLiSunuuYtg6VY yL6agZXF5l7isVKpucucElRjvW9zguvkt6JnqJTfygJCguIKswssZDcBSfs97de/+msQ vCrw== X-Gm-Message-State: AIVw112alwqJH4XQC3Luj1CrjAvCZ/pJbqz6jqZtWHZ5JhNO3NhpVJRU nTT0SsRRUq8V0g== X-Received: by 10.223.183.15 with SMTP id l15mr488246wre.260.1501808374671; Thu, 03 Aug 2017 17:59:34 -0700 (PDT) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id 141sm2570043wmh.45.2017.08.03.17.59.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 17:59:33 -0700 (PDT) References: <87shhj3wtc.fsf@pokyo> <87inie93lp.fsf@users.sourceforge.net> <07272ad0-8cd0-f75e-1cf7-8f66e1d77466@yandex.ru> <8760e994rv.fsf@users.sourceforge.net> <17696669-9155-d7d2-ffe3-97bb62ceb733@yandex.ru> <87wp6l73ei.fsf@users.sourceforge.net> From: Dmitry Gutov Message-ID: Date: Fri, 4 Aug 2017 03:59:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Thunderbird/55.0 MIME-Version: 1.0 In-Reply-To: <87wp6l73ei.fsf@users.sourceforge.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.1 (--) 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.1 (--) On 8/3/17 6:09 AM, npostavs@users.sourceforge.net wrote: > * lisp/progmodes/grep.el (grep--regexp-alist-column) > (grep--regexp-alist-bin-matcher, grep-with-null-regexp-alist) > (grep-fallback-regexp-alist): Remove. > (grep-regexp-alist): Recombine their contents here. > (grep-mode): > * lisp/progmodes/xref.el (xref-collect-matches): Use the variable > `grep-regexp-alist' rather than the function. Also semantic/symref/grep.el. I fixed it before in a separate patch, but let's keep this update all together. From unknown Mon Jun 23 18:33:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27840: 26.0.50; vc-git-grep stopped working on git master Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2017 22:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 27840@debbugs.gnu.org, Tom Tromey Received: via spool by 27840-submit@debbugs.gnu.org id=B27840.150188581425030 (code B ref 27840); Fri, 04 Aug 2017 22:31:01 +0000 Received: (at 27840) by debbugs.gnu.org; 4 Aug 2017 22:30:14 +0000 Received: from localhost ([127.0.0.1]:42104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddl6j-0006Ve-F8 for submit@debbugs.gnu.org; Fri, 04 Aug 2017 18:30:13 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:34228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddl6h-0006VR-VH for 27840@debbugs.gnu.org; Fri, 04 Aug 2017 18:30:12 -0400 Received: by mail-io0-f196.google.com with SMTP id m88so1927408iod.1 for <27840@debbugs.gnu.org>; Fri, 04 Aug 2017 15:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=aPtTIRU2HyZboaMcFlBcrAlVGic87H+iA5G/zsZjXp8=; b=meAuC0mVKw4LrynMFqn356MFki1fa+/GfDHxWEw59FGgzvX72yZb3lOg/PuGXAoMgu TEYQS5s8KWu5qlTGHRPgn3R41TmHv4RRSaylHs+0uIUwT/dg2Kmi2/jDXgwd0fjAcGoL e7+bfTB2WnSbhhCn0Vp6DKn+ZQJev7Da7qf8Ujx1Si20tGMVf/+ZUoVbIEBM+TcUaKM5 22tD8VIu2+Tv+fr2cQpqm9fLZPESjZa1yCTXxN31gjjRX55k0oo3/LVRRXJCEX8+3ycE TF+mSLcsAXHMJK2tT7bFBL+eQ+mS1R+8I3HqPDkUydUeazllJ6VAhqhT1hp9vOdbBj8Q SM1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=aPtTIRU2HyZboaMcFlBcrAlVGic87H+iA5G/zsZjXp8=; b=DCRpvm4yuB9RmqH6K+KEStz9xoxm4Ori5MwWkCftcenHby1OzFfEU+/pBl0xS/JP/y OqXgq/dzZQVkzwyinA8af54LqR1dMbmA5juIpNEiyFI2P3Kufm9GgS56j0koT9Atbho/ 3XQj8A8ZFxj75TkzPEcYX0SUGboGymjyRzSiLIizBvMfCXSXqu9XPUwa9UsYZwI1PZ71 ZrKyR0BafCQLnJDwxVAYGPWAJKJ1TloGV+Wwz9Xw2huGEnoUf2fDaMgC3hDoxYbMc5nn 6ET0kSy66iVjoz1Hp7/akjqR9QlwGVs8eorw/JmGxjCOD6f5WujAKB2NktHQowCiQ3hG ytVQ== X-Gm-Message-State: AIVw110zSO73uPqriTxU4IaRr8GpaA+K5xP5ZIC5QmhUZj8ABIy3u+o3 g/t6zkcoYzA0fA== X-Received: by 10.107.157.144 with SMTP id g138mr4452557ioe.200.1501885806264; Fri, 04 Aug 2017 15:30:06 -0700 (PDT) Received: from zony ([45.2.119.48]) by smtp.googlemail.com with ESMTPSA id e12sm1211379itd.37.2017.08.04.15.30.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Aug 2017 15:30:04 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87shhj3wtc.fsf@pokyo> <87inie93lp.fsf@users.sourceforge.net> <07272ad0-8cd0-f75e-1cf7-8f66e1d77466@yandex.ru> <8760e994rv.fsf@users.sourceforge.net> <17696669-9155-d7d2-ffe3-97bb62ceb733@yandex.ru> <87wp6l73ei.fsf@users.sourceforge.net> Date: Fri, 04 Aug 2017 18:31:45 -0400 In-Reply-To: (Dmitry Gutov's message of "Fri, 4 Aug 2017 03:59:31 +0300") Message-ID: <87tw1n6k32.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.1 (--) 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.1 (--) --=-=-= Content-Type: text/plain Dmitry Gutov writes: > Also semantic/symref/grep.el. I fixed it before in a separate patch, > but let's keep this update all together. Oops! Thanks for reminding me. I also noticed that I had missed handling 'grep --null --after/before-context=N ...' output correctly. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v3-0001-Merge-null-and-without-null-regexp-alists-Bug-278.patch Content-Description: patch >From a13241d8c0c126c7690166b51cb507ea11f746d6 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 30 Jul 2017 14:47:05 -0400 Subject: [PATCH v3] Merge null and without-null regexp alists (Bug#27840, Bug#27873) * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Allow for NUL characters following filename in grep context lines. (grep--regexp-alist-column, grep--regexp-alist-bin-matcher) (grep-with-null-regexp-alist, grep-fallback-regexp-alist): Remove. (grep-regexp-alist): Recombine their contents here. (grep-mode): * lisp/cedet/semantic/symref/grep.el (semantic-symref-parse-tool-output-one-line): * lisp/progmodes/xref.el (xref-collect-matches): Use the variable `grep-regexp-alist' rather than the function. --- lisp/cedet/semantic/symref/grep.el | 2 +- lisp/progmodes/grep.el | 90 +++++++++++++++++--------------------- lisp/progmodes/xref.el | 2 +- 3 files changed, 43 insertions(+), 51 deletions(-) diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index df71508da7..f7c72bfb0b 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el @@ -193,7 +193,7 @@ (cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref- "Parse one line of grep output, and return it as a match list. Moves cursor to end of the match." (pcase-let - ((`(,grep-re ,file-group ,line-group . ,_) (car (grep-regexp-alist)))) + ((`(,grep-re ,file-group ,line-group . ,_) (car grep-regexp-alist))) (cond ((eq (oref tool :resulttype) 'file) ;; Search for files (when (re-search-forward "^\\([^\n]+\\)$" nil t) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 2ddaf884bc..466b524c79 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -31,7 +31,6 @@ (require 'compile) - (defgroup grep nil "Run `grep' and display the results." :group 'tools @@ -366,53 +365,44 @@ (defvar grep-last-buffer nil Notice that using \\[next-error] or \\[compile-goto-error] modifies `compilation-last-buffer' rather than `grep-last-buffer'.") -(defconst grep--regexp-alist-column - ;; Calculate column positions (col . end-col) of first grep match on a line - (cons - (lambda () - (when grep-highlight-matches - (let* ((beg (match-end 0)) - (end (save-excursion (goto-char beg) (line-end-position))) - (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))) - (when mbeg - (- mbeg beg))))) - (lambda () - (when grep-highlight-matches - (let* ((beg (match-end 0)) - (end (save-excursion (goto-char beg) (line-end-position))) - (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)) - (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) - (when mend - (- mend beg))))))) -(defconst grep--regexp-alist-bin-matcher - '("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) -(defconst grep-with-null-regexp-alist - `(("^\\([^\0]+\\)\\(\0\\)\\([0-9]+\\):" 1 3 ,grep--regexp-alist-column nil nil - (2 '(face unspecified display ":"))) - ,grep--regexp-alist-bin-matcher) - "Regexp used to match grep hits. -See `compilation-error-regexp-alist'.") -(defconst grep-fallback-regexp-alist - `(;; Use a tight regexp to handle weird file names (with colons - ;; in them) as well as possible. E.g., use [1-9][0-9]* rather - ;; than [0-9]+ so as to accept ":034:" in file names. - ("^\\(.*?[^/\n]\\):[ \t]*\\([1-9][0-9]*\\)[ \t]*:" - 1 2 ,grep--regexp-alist-column) - ,grep--regexp-alist-bin-matcher) - "Regexp used to match grep hits when `--null' is not supported. -See `compilation-error-regexp-alist'.") - -(defvaralias 'grep-regex-alist 'grep-with-null-regexp-alist) -(make-obsolete-variable - 'grep-regex-alist "Call `grep-regexp-alist' instead." "26.1") - ;;;###autoload -(defun grep-regexp-alist () - "Return a regexp alist to match grep hits. -The regexp used depends on `grep-use-null-filename-separator'. -See `compilation-error-regexp-alist' for format details." - (if grep-use-null-filename-separator - grep-with-null-regexp-alist grep-fallback-regexp-alist)) +(defconst grep-regexp-alist + `((,(concat "^\\(?:" + ;; Parse using NUL characters when `--null' is used. + ;; Note that we must still assume no newlines in + ;; filenames due to "foo: Is a directory." type + ;; messages. + "\\(?1:[^\0\n]+\\)\\(?3:\0\\)\\(?2:[0-9]+\\):" + "\\|" + ;; Fallback if `--null' is not used, use a tight regexp + ;; to handle weird file names (with colons in them) as + ;; well as possible. E.g., use [1-9][0-9]* rather than + ;; [0-9]+ so as to accept ":034:" in file names. + "\\(?1:[^\n:]+?[^\n/:]\\):[\t ]*\\(?2:[1-9][0-9]*\\)[\t ]*:" + "\\)") + 1 2 + ;; Calculate column positions (col . end-col) of first grep match on a line + (,(lambda () + (when grep-highlight-matches + (let* ((beg (match-end 0)) + (end (save-excursion (goto-char beg) (line-end-position))) + (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))) + (when mbeg + (- mbeg beg))))) + . + ,(lambda () + (when grep-highlight-matches + (let* ((beg (match-end 0)) + (end (save-excursion (goto-char beg) (line-end-position))) + (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)) + (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) + (when mend + (- mend beg)))))) + nil nil + (3 '(face nil display ":"))) + ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) + "Regexp used to match grep hits. +See `compilation-error-regexp-alist' for format details.") (defvar grep-first-column 0 ; bug#10594 "Value to use for `compilation-first-column' in grep buffers.") @@ -451,7 +441,9 @@ (defvar grep-mode-font-lock-keywords (2 grep-error-face nil t)) ;; "filename-linenumber-" format is used for context lines in GNU grep, ;; "filename=linenumber=" for lines with function names in "git grep -p". - ("^.+?[-=][0-9]+[-=].*\n" (0 grep-context-face))) + ("^.+?\\([-=\0]\\)[0-9]+\\([-=]\\).*\n" (0 grep-context-face) + (1 (if (eq (char-after (match-beginning 1)) ?\0) + `(face nil display ,(match-string 2)))))) "Additional things to highlight in grep output. This gets tacked on the end of the generated expressions.") @@ -781,7 +773,7 @@ (define-compilation-mode grep-mode "Grep" (set (make-local-variable 'compilation-error-face) grep-hit-face) (set (make-local-variable 'compilation-error-regexp-alist) - (grep-regexp-alist)) + grep-regexp-alist) ;; compilation-directory-matcher can't be nil, so we set it to a regexp that ;; can never match. (set (make-local-variable 'compilation-directory-matcher) '("\\`a\\`")) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index cc9b794c5a..35a5c8862f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -929,7 +929,7 @@ (defun xref-collect-matches (regexp files dir ignores) (expand-file-name dir) ignores)) (buf (get-buffer-create " *xref-grep*")) - (`(,grep-re ,file-group ,line-group . ,_) (car (grep-regexp-alist))) + (`(,grep-re ,file-group ,line-group . ,_) (car grep-regexp-alist)) (status nil) (hits nil)) (with-current-buffer buf -- 2.11.1 --=-=-=-- From unknown Mon Jun 23 18:33:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27840: 26.0.50; vc-git-grep stopped working on git master Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Aug 2017 00:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 27840@debbugs.gnu.org, Tom Tromey Received: via spool by 27840-submit@debbugs.gnu.org id=B27840.150206628419429 (code B ref 27840); Mon, 07 Aug 2017 00:39:02 +0000 Received: (at 27840) by debbugs.gnu.org; 7 Aug 2017 00:38:04 +0000 Received: from localhost ([127.0.0.1]:45076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deW3Y-00053F-EP for submit@debbugs.gnu.org; Sun, 06 Aug 2017 20:38:04 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:37389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deW3W-00052g-I4; Sun, 06 Aug 2017 20:38:03 -0400 Received: by mail-it0-f67.google.com with SMTP id 77so4561499itj.4; Sun, 06 Aug 2017 17:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=GxgLQu4yg8QtrYaYAy8hiQxFIyea3ZnUAPbnUAiz7/Y=; b=iXdx9e8laMFu7fCgExPAuwU0x3utCa8wWYNHFCLKVs/B8VYG3p5/rMWURBi8kIynSv Z2lmgePejAS8ot48zLKLvDm69JA+UwQR1ZecnHomGtU+o3jMsDGs4K70pwn+owQcPAr+ oDwbZkzsHt6bsjs9+ST0gVJFNKIvncNs2HwN13jCHb+HrcfQqThFzBOO9v1mwAxjNMko 2GnXcqrMK1QwHJm+w9pA/d/qeUJep5PkRW41IR1HCjhfoLoSV8sP79VNbpVI4uCoArwV V4ZJ8xdPEqcR+F1JcvrVRooN6Rc7yGnZk5176gsUqAkSeKe0ec7YiYuVc6ad2nQ/aptL BOaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=GxgLQu4yg8QtrYaYAy8hiQxFIyea3ZnUAPbnUAiz7/Y=; b=j+eaXE7m2Qt+EWphhuP4VCNgme4oQ5e63DljY4oEttmgxDD028VEs7jQrXFdjYxSOq dLVkHTJoBT8DnZRXUV7Yu05AmgYlnWW1XQzDwDrxlumJlI757gqwCD90iPFCy7btjIKp MWJwQ48yR5GUmvqk5Y66nT19KJdNZmSqVepeH2q+l/Pbjrk7I/Fy708fUSIZaaEmGKgM Ixup3advTWTCo8oJm8svFShKCo66dKfJnVqUFHffcuuytKkuhnje1LnFcFOPTxqH4e0Z pQQG+lhczNtrMlwkTJYSWBlLKZko7CuKFPIXr2jxQvL4bUjWA/HXow2OEpwgZiXfTjSV FeLw== X-Gm-Message-State: AIVw112qKQ/nWyOTFM6zA5T5PhsCgxlDSxgPRSkIhB87jNTwNPFk6CxU Lx5KZFTFp8IAve1Y X-Received: by 10.36.181.91 with SMTP id j27mr9878473iti.94.1502066276662; Sun, 06 Aug 2017 17:37:56 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id g204sm3307152iog.54.2017.08.06.17.37.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 06 Aug 2017 17:37:55 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87shhj3wtc.fsf@pokyo> <87inie93lp.fsf@users.sourceforge.net> <07272ad0-8cd0-f75e-1cf7-8f66e1d77466@yandex.ru> <8760e994rv.fsf@users.sourceforge.net> <17696669-9155-d7d2-ffe3-97bb62ceb733@yandex.ru> <87wp6l73ei.fsf@users.sourceforge.net> <87tw1n6k32.fsf@users.sourceforge.net> Date: Sun, 06 Aug 2017 20:39:33 -0400 In-Reply-To: <87tw1n6k32.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Fri, 04 Aug 2017 18:31:45 -0400") Message-ID: <87poc843ei.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) 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: 0.7 (/) tags 27840 fixed close 27840 tags 27873 fixed close 27873 quit npostavs@users.sourceforge.net writes: > Dmitry Gutov writes: > >> Also semantic/symref/grep.el. I fixed it before in a separate patch, >> but let's keep this update all together. > > Oops! Thanks for reminding me. I also noticed that I had missed > handling 'grep --null --after/before-context=N ...' output correctly. Pushed to master [1: c2f1830d69]. [1: c2f1830d69]: 2017-08-06 20:25:11 -0400 Merge null and without-null regexp alists (Bug#27840, Bug#27873) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c2f1830d69f5a5e20dac6fcbf3af4d51afba92bd