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#63778: [PATCH] Use comint-pager in eshell Date: Mon, 29 May 2023 22:14:18 -0700 Message-ID: <635470cf-103b-8383-0bc5-9b69de4f324d@gmail.com> References: <36a8613a-7601-14d5-c659-3bd86708b63b@gmail.com> 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="4439"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63778@debbugs.gnu.org To: Morgan Smith Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 30 07:15:16 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 1q3rhU-0000yC-9U for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 30 May 2023 07:15:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3rhI-0002kU-Mt; Tue, 30 May 2023 01:15:04 -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 1q3rhG-0002kH-R9 for bug-gnu-emacs@gnu.org; Tue, 30 May 2023 01:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3rhG-0008CM-IG for bug-gnu-emacs@gnu.org; Tue, 30 May 2023 01:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3rhG-0007qT-Ds for bug-gnu-emacs@gnu.org; Tue, 30 May 2023 01:15: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: Tue, 30 May 2023 05:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63778 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63778-submit@debbugs.gnu.org id=B63778.168542366730093 (code B ref 63778); Tue, 30 May 2023 05:15:02 +0000 Original-Received: (at 63778) by debbugs.gnu.org; 30 May 2023 05:14:27 +0000 Original-Received: from localhost ([127.0.0.1]:59810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3rgg-0007pI-RL for submit@debbugs.gnu.org; Tue, 30 May 2023 01:14:27 -0400 Original-Received: from mail-pf1-f182.google.com ([209.85.210.182]:46461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3rgf-0007p6-Fc for 63778@debbugs.gnu.org; Tue, 30 May 2023 01:14:25 -0400 Original-Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-64d2a613ec4so2885822b3a.1 for <63778@debbugs.gnu.org>; Mon, 29 May 2023 22:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685423660; x=1688015660; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=n9KhYgya0cJftKkpqnJVU7mtlVXs0uZNISZKwkzr8Ek=; b=jZASoLX3K+ChYEPouHJhNzta8SEBv9aS0KCVAHlDMY25WJsQlSawNeGrfStGQ96hSA 45t733/+Pz9Qd5lZ1Ay8hptCQcel3sVeQcteGnYKAb/fPBCfbpts66UCgmlx3Ws8M3nO XDbjRlkZioPIZBsy6Z9QfVm1ZD4ABYfp8gaWVGlGGLwMP2Xv80UhhhZU7yeeVpVfG8KU pCKvATWebdtgZCRfwdH+kgekdMMcGdL9Te716+FiEatlL8dsRvKqKc4hJ3vTU0cVmyog F7nMWnU5mit2UpfMDk7+nlKb4o9306zDuaQ737XRp09Vxum7tsEUXAcnEnVqLBQk5R/u aY2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685423660; x=1688015660; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=n9KhYgya0cJftKkpqnJVU7mtlVXs0uZNISZKwkzr8Ek=; b=AExcUG/JwDWPDfS/toOmILBQo9GqPWui3PMqsLMjzFDcuWKUkwAJPBDSz9IYT4BofT kQp0pAUg9xQIJE4CjbYqlg0X5ddZymtzGTO7htO1yIAMZYeZs5zKALPfz81gOv+KOVdI ynw0JwEeodtqJVUqAk1H9WjFdLopAWPwxORDWXhA245GcZLZcPO6ZXsf1gTWDJPGXozY Qn9H3dQDU5TrrSubbwxfYATT4CRqLCcZ2xuybpThDsNl8prsQT6sajq8+HfJ68lMsnwA ovmKiTCvPsgSnVkf1A/LgPQfvdpX66hfM5FYzxxiNpunLFSQMWBg0vhy7cYpHOoFaDYZ j0IA== X-Gm-Message-State: AC+VfDz2UQLMLDDXmycL1rmZP38MhUg19QwyUybi/kjc5If+g3jTYPhG zZVWegQ75WxM10lFt3oAtDc= X-Google-Smtp-Source: ACHHUZ5eCQ/E64Nsg3d5jsXPhpS8MjlcT7YhZpwcLrc1CHPc/1AjwXDim8I6wb6XGQxzlncadfRCgA== X-Received: by 2002:a05:6a00:1746:b0:648:ebb2:3d6 with SMTP id j6-20020a056a00174600b00648ebb203d6mr1003704pfc.26.1685423659738; Mon, 29 May 2023 22:14:19 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id c24-20020aa78c18000000b0064fe332209esm788914pfd.98.2023.05.29.22.14.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 May 2023 22:14:19 -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:262620 Archived-At: On 5/28/2023 11:23 PM, Morgan Smith wrote: > My main pain point was trying to figure out how to maintain the ability > to set/unset the PAGER variable. These current patches allow you to > set/unset the PAGER variable iff you don't set comint-pager. It even > allows you to do stuff like 'PAGER=cat git log' (see > eshell-handle-local-variables) without modifying buffer state (as it > should). Maintaining those capabilities when comint-pager is set seems > very difficult so I gave up. Thanks. I'll think this over for a bit and try some stuff out locally too. Looking at your second patch, I think I see where the pain lies: when getting PAGER, it always treats 'comint-pager' as taking precedence over the real env var, but when setting PAGER, it only sets the env var. Therefore, with 'comint-pager' set, setting PAGER won't have the intended effect (though maybe this doesn't apply to local variables). There's probably a nice way to do this, but it might involve some tweaks to how Eshell handles variable aliases in general. I'll look into it more.