From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#70507: 30.0.50; eshell: grep -H and -n flags are hardcoded and the latter cannot be overwritten Date: Mon, 20 May 2024 13:52:29 -0700 Message-ID: <79d16d39-e024-b65a-bcb1-827f04dc6a78@gmail.com> References: <87plui421d.fsf@mail.jao.io> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13506"; mail-complaints-to="usenet@ciao.gmane.io" To: Stefan Kangas , Jose A Ortega Ruiz , 70507@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 20 22:54:16 2024 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 1s9A1P-0003Na-97 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 May 2024 22:54:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9A19-00016P-An; Mon, 20 May 2024 16:53:59 -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 1s9A18-00016H-A0 for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 16:53:58 -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 1s9A17-0005FT-Vz for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 16:53:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s9A1C-0001RE-EJ for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 May 2024 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70507 X-GNU-PR-Package: emacs Original-Received: via spool by 70507-submit@debbugs.gnu.org id=B70507.17162384265516 (code B ref 70507); Mon, 20 May 2024 20:54:02 +0000 Original-Received: (at 70507) by debbugs.gnu.org; 20 May 2024 20:53:46 +0000 Original-Received: from localhost ([127.0.0.1]:44732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9A0v-0001Qu-Gf for submit@debbugs.gnu.org; Mon, 20 May 2024 16:53:45 -0400 Original-Received: from mail-pf1-f180.google.com ([209.85.210.180]:43388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9A0q-0001Qm-VT for 70507@debbugs.gnu.org; Mon, 20 May 2024 16:53:44 -0400 Original-Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6f6b1ac1e90so872165b3a.1 for <70507@debbugs.gnu.org>; Mon, 20 May 2024 13:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716238350; x=1716843150; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=vlCO2AOGyTfTi/G8Wryp/HXojoUSJUnEP+harqlcuuQ=; b=jPK824xmQECT4Ate7kUOblvWNtVLqcDnjmK9xgMxX7Bl1Y0GzYWfbJ8JlQqQ1bomM3 Lal4Pj2NGdzR3HV1C4XZyRunhngOB7hL/fHI+rou9UfA8XOLwFWQqPAAFgQNfgvisVqS 8CqjW4WS/5HHok7BG0hPTa06sj4qEw9my04AHlS7bMQubGXNXusbuIagtvcLOeIjbNG2 XKbyQo/tf48y/oN6Ms6LJ+JFAQJ5ao7wCmKCxMQxiJ2udgnn1eHCXRmrOwR9mrihW/0m dy+RVibB3Ws8beWGzyV6TPDtZiSaHq/XKV35ndhG0oQlT2jimRsIFxYqacRxs2v403MK a8rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716238350; x=1716843150; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vlCO2AOGyTfTi/G8Wryp/HXojoUSJUnEP+harqlcuuQ=; b=N7SVZ98Sv4nh9t/TlM80VkKYbaCiiXW//20UoY+0bmJQqtUorO3ZM6VpNsQ88sPJE2 6thtV0fSZlyt8LJ6mVL+aZew2ymGkY0XTb3ZbbrWB/740cQjXirR8jh6+/hCgmIun/sU zdjqpIweoZVHEydlGFTQ31xpKpjbAbRy6p4gKtglWavyH53y/Xhwj2toYQf4QpKtqGzE UUQYxDvIDTS2iAj8y+W2FP0O4GdVvKgWdn0RumpFqz0a/1HJ3hRmgZyCU0OJ8QGs8MNY hbcdPcT9yQjOUkU5pPzT9xGqusBVdAnxtr27TtQmrbVbzAgz1Eh40YGxPTYYor306Ag8 xb5w== X-Forwarded-Encrypted: i=1; AJvYcCV8fAPkyBUcwJzc8WFj36JATDqVinPCQqx9fU12LfLQNg0m3npA9unVpd+l36LdaEMez80RN0aJY2H5Rf6KPszou9rlyF4= X-Gm-Message-State: AOJu0YxIJuTJhn6Q0nnXAZ3jSw0RKlnjOmarTZSGEZSECYzCBsm59Xvp lrhHYwc/f6IwdG7pJGXE3IBO0oj8lhKbwI3AwiwIGUOAioIZ2m6o X-Google-Smtp-Source: AGHT+IF5k04kp6Pzleu2buQKW4TdBdrtDwJ3wFsE6+pcTDYF/lefc+bVU/xzPSTuD8zmPwA0FH2frA== X-Received: by 2002:a05:6a21:2d8c:b0:1b0:c1:d8be with SMTP id adf61e73a8af0-1b1ca3b09efmr10082872637.1.1716238350235; Mon, 20 May 2024 13:52:30 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-6f6690c711csm11738803b3a.40.2024.05.20.13.52.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 May 2024 13:52:29 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:285507 Archived-At: On 5/20/2024 1:18 PM, Stefan Kangas wrote: > Jose A Ortega Ruiz writes: > >> I've noticed that -Hn flags are hardcoded when calling eshell's grep >> command. Specially in pipes, where -H prints a noisy (standard input) >> prefix for every line, those flags are rarely what I personally want, >> and I'd like to have the option to disable them. For -H i can add -h to >> the call, or even redefine eshell/grep to not use -H, but there's no >> flag to disable -n. > > Jim, any comments on the above bug report? It would probably be reasonable to define some new 'eshell-grep-default-interactive-flags' variable, defaulting to "-nH" and only taking effect when being redirected to a compilation buffer. Maybe 'eshell-compile' could also take an EXTRA-ARGS argument that holds extra args to use. There are a few edge cases here I haven't fully though through, so maybe this is all wrong. In the short term though, you have a few options: 1. "alias grep '*grep $@*'": This just makes "grep" always use the real "grep" program on your computer, with no fancy compilation buffers. 2. "alias grep 'compile --mode=grep-mode grep $@*'": This ensures that "grep" opens in a compilation buffer when called interactively (and not in a pipeline, etc), but only with the flags you explicitly specify.