GNU bug report logs -
#63778
[PATCH] Use comint-pager in eshell
Previous Next
Reported by: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Date: Sun, 28 May 2023 22:50:01 UTC
Severity: normal
Tags: patch
Fixed in version 30.1
Done: Jim Porter <jporterbugs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Jim Porter <jporterbugs <at> gmail.com> writes:
>
> Ah, in that case, then I think you'd want to change the logic in esh-var.el so
> that, when 'comint-pager' is nil, $PAGER returns the real value of PAGER from
> the environment. Since this behavior is opt-in, I think it would be enough to
> just make this fix (and ignore the visual command stuff), though special
> handling for visual commands would still be nice to have.
>
I decided to work on this instead of sleeping so I apologize if these
patches are of poor quality.
I still haven't looked into how everything interacts with the visual
commands but it took some real effort (maybe because I'm tired :P) to
get what I got so far and I think it's good enough.
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.
Trying to setq-local comint-pager in the set function might honestly be
a better user experience for those that set comint-pager but then doing
'PAGER=cat git log' would cause a permanent buffer local change.
So currently everything works 100% great and as expected if comint-pager
is nil. If comint-pager is not-nil then you cannot set PAGER in a way
that will take any affect.
[0001-Fix-infinite-loop-in-eshell-get-set-variable.patch (text/x-patch, attachment)]
[0002-Use-comint-pager-in-eshell.patch (text/x-patch, attachment)]
[Message part 4 (text/plain, inline)]
Thanks,
Morgan
This bug report was last modified 1 year and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.