From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Schroeder via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66338: 30.0.50; grep-commnd set and using an old fish results in empty Copyright files Date: Wed, 04 Oct 2023 12:09:43 +0200 Message-ID: <87cyxu66mw.fsf@alexschroeder.ch> Reply-To: Alex Schroeder Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27802"; mail-complaints-to="usenet@ciao.gmane.io" To: 66338@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 04 14:54:01 2023 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 1qo1O4-0006to-Jo for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Oct 2023 14:54:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qo1Mt-0007bn-2z; Wed, 04 Oct 2023 08:52:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qo1Mq-0007YF-LG for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 08:52:44 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qo1Mq-0008VU-BD for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 08:52:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qo1N7-0005Il-P3 for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 08:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Schroeder Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Oct 2023 12:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66338 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169642394220309 (code B ref -1); Wed, 04 Oct 2023 12:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Oct 2023 12:52:22 +0000 Original-Received: from localhost ([127.0.0.1]:41792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo1MR-0005HR-96 for submit@debbugs.gnu.org; Wed, 04 Oct 2023 08:52:22 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:45016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnyqD-0003cn-Ve for submit@debbugs.gnu.org; Wed, 04 Oct 2023 06:10:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnypp-0003lL-Ua for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 06:10:30 -0400 Original-Received: from out-191.mta0.migadu.com ([2001:41d0:1004:224b::bf]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnypm-0003J6-Cu for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 06:10:29 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alexschroeder.ch; s=key1; t=1696414223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IrcR5sJrIe93OpsYYgbSN6VcJrjrEN6xwPcrEs2WuvM=; b=SqMYxTkg8qs0dCCXIrM2clVzX0aNgHvt8W648+dXc68Caj50HCw4C3o/bP6PnsoCshJAuF MdK6PvI1GR+HAzRv62VAOXlwqaybPVBq5WZTxbluGfLch2wqq6NEDyPILR+Q+oN0VYZRqz l+x3doV/xj/HL+yvdtrOlYXlnq7v/V0urJJd4vqEFd0sxV0kzfSwX/bM7EN4ykRgY/COm/ MNqDkQcASipc8Q8DQP1Oqnub3wl7+UqXKFAJR4j3BX0WTCQ6+ZIRZunGAAE/V5yFzvUirI nIQFekESGsfIBgmNHNqF9kANNJJC59ppV6PTkTIri153SBypXArSYTTpiVKf7Q== X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::bf; envelope-from=alex@alexschroeder.ch; helo=out-191.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 04 Oct 2023 08:52:17 -0400 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271798 Archived-At: My directories are littered with empty =E2=80=9CCopyright=E2=80=9D files. I= think the problem is that I use fish version 3.0.2 (current is 3.6.1) and I have grep-command set. So, using fish, start Emacs -Q. (getenv "SHELL") ;; "/usr/bin/fish" (setq grep-command "grep --color -niH -e ") M-x grep You don=E2=80=99t have to actually use grep. Invoking grep calls grep-compute-defaults which =E2=80=93 if grep-command is set =E2=80=93 call= s grep-probe which calls process-file-shell-command. The resulting command: /usr/bin/fish -c "grep --color -niH -e ^Copyright \ /usr/local/share/emacs/30.0.50/etc/HELLO" If I run this in the shell, it hangs. I terminate with C-d and notice that the empty file =E2=80=9CCopyright=E2=80=9D was created. If I quote the= regular expression, no problem: /usr/bin/fish -c "grep --color -niH -e '^Copyright' \ /usr/local/share/emacs/30.0.50/etc/HELLO" (This correctly produces a line of output.) This seems to be a feature of fish. The following command generates an empty file called =E2=80=9CXXX=E2=80=9D. echo ^XXX In the documentation I see the following regarding the caret, in a section about feature flags: =E2=80=9Cstderr-nocaret was introduced in fish 3.0 (and made the default in 3.3). It makes ^ an ordinary character instead of denoting an stderr redirection, to make dealing with quoting and such easier. Use 2> instead. This can no longer be turned off since fish 3.5. The flag can still be tested for compatibility, but a no-stderr-nocaret value will simply be ignored.=E2=80=9D https://fishshell.com/docs/current/language.html#featureflags So this is the problem and it=E2=80=99s already improved in newer versions = of fish. In my case, however: alex@melanobombus ~> status features stderr-nocaret off 3.0 ^ no longer redirects stderr qmark-noglob off 3.0 ? no longer globs I have since changed the stderr-nocaret to =E2=80=9Con=E2=80=9D for my syst= em (and as seen above, it is going to be mandatory going forward). This seems to do the job. No change to Emacs was required. I=E2=80=99m not quite sure what to suggest, here. All I can say is that I w= as very angry about these empty Copyright files appearing every now and then all over my directories. I looked at hooks, I grepped the sources for "Copyright" (which didn=E2=80=99t match "^Copyright"), I looked at pack= ages, I just couldn=E2=80=99t find it, and I also couldn=E2=80=99t reliably repro= duce it, since it effectively only created an empty Copyright file the first time I called grep in an Emacs session. Given the difficulty in finding the source of the problem, perhaps some sort of warning message or workaround is appropriate? Cheers Alex In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2023-10-04 built on melanobombus Repository revision: fbfdd1e0e3e67f765c6dbf9f61b5f913e55e004e Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: PureOS Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: emms-mode-line-mode: t emms-playing-time-display-mode: t emms-playing-time-mode: t edebug-mode: t windmove-mode: t winner-mode: t server-mode: t idle-highlight-mode: t global-git-gutter-mode: t override-global-mode: t savehist-mode: t desktop-save-mode: t display-time-mode: t midnight-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t minibuffer-regexp-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/alex/.emacs.d/elpa/transient-20230501.1034/transient hides /usr/local= /share/emacs/30.0.50/lisp/transient Features: (shadow flyspell ispell typo ecomplete mail-extr emacsbug message yank-media rfc822 mailabbrev gmm-utils mailheader sendmail tabify imenu man cl-print dired-aux ibuffer ibuffer-loaddefs em-unix em-term term disp-table shell ehelp em-script em-prompt em-pred em-ls em-hist em-glob em-extpipe em-cmpl em-dirs em-basic em-banner em-alias esh-mode esh-var eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg pcomplete esh-module esh-groups esh-util emms-mpris dbus emms-librefm-stream emms-librefm-scrobbler emms-playlist-limit emms-i18n emms-history emms-score emms-stream-info emms-metaplaylist-mode emms-bookmarks emms-cue emms-mode-line-icon emms-browser sort emms-volume emms-volume-sndioctl emms-volume-mixerctl emms-volume-pulse emms-volume-amixer emms-playlist-sort emms-last-played emms-player-xine emms-player-mpd tq emms-lyrics emms-url emms-streams emms-show-all emms-tag-editor format-spec emms-tag-tracktag emms-mark emms-mode-line emms-cache emms-info-native bindat emms-info-exiftool emms-info-tinytag emms-info-metaflac emms-info-opusinfo emms-info-ogginfo emms-info-mp3info emms-playlist-mode emms-player-vlc emms-player-mpv emms-playing-time emms-info emms-later-do emms-player-mplayer emms-player-simple emms-source-playlist emms-source-file locate dired-x dired dired-loaddefs emms-setup emms emms-compat files-x edebug debug backtrace misearch multi-isearch find-func shortdoc comp comp-cstr warnings grep help-fns radix-tree mediawiki url-cache mm-url gnus nnheader mail-utils range wid-edit mml mml-sec epa epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm brutalist-dark-theme brutalist-theme brutalist-build move-text rcirc-emojis rx password-generator oddmuse hi-lock goto-addr url-misc sgml-mode facemenu cl shr pixel-fill kinsoku url-file puny svg xml dom windmove winner server slime-fancy slime-indentation slime-cl-indent cl-indent slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references slime-compiler-notes-tree slime-scratch slime-presentations bridge slime-macrostep macrostep slime-mdot-fu slime-enclosing-context slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc slime-repl elp slime-parse slime derived lisp-mnt gud apropos compile text-property-search etags fileloop generator xref project arc-mode archive-mode noutline outline icons pp comint ansi-osc ansi-color ring hyperspec slime-autoloads mmm-mode mmm-univ mmm-class mmm-region mmm-auto mmm-vars mmm-utils mmm-compat advice image-file image-converter idle-highlight-mode thingatpt git-gutter edmacro kmacro cl-extra help-mode use-package-bind-key bind-key easy-mmode savehist desktop frameset time skeleton midnight generic use-package-ensure use-package-core finder-inf go-eldoc-autoloads go-mode-autoloads pcase mediawiki-autoloads wgrep-autoloads info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process emacs) Memory information: ((conses 16 510904 41722) (symbols 48 27987 1) (strings 32 120078 5410) (string-bytes 1 3474453) (vectors 16 50833) (vector-slots 8 1390521 192276) (floats 8 256 120) (intervals 56 2880 0) (buffers 984 21))