GNU bug report logs -
#66458
30.0.50; [PATCH] Improve Eshell support for special reference types
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Wed, 11 Oct 2023 00:49:02 UTC
Severity: wishlist
Tags: patch
Found in version 30.0.50
Fixed in version 30.1
Done: Jim Porter <jporterbugs <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66458 in the body.
You can then email your comments to 66458 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
:
bug#66458
; Package
emacs
.
(Wed, 11 Oct 2023 00:49:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
.
(Wed, 11 Oct 2023 00:49:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
X-Debbugs-Cc: monnier <at> iro.umontreal.ca
(Stefan, I added some fairly-tricky calls to Pcomplete in the second
patch - see 'eshell-complete-special-reference' - so let me know if you
have any thoughts on that code.)
These patches do a few things to improve how Eshell's special references
work (these are ways of typing out special Lisp objects like buffers or
processes, e.g. "#<buffer FOO>").
First, this resolves an edge case where the arguments to a special
reference weren't parsed as regular Eshell arguments. That meant that
you couldn't do things like "#<buffer $some-variable>". This does
introduce one very minor incompatible edge case though. Previously, to
refer to a buffer named " foo" (note the leading space), you could type
"#<buffer foo>" (note the two spaces). Now, you'd need to do something
like "#<buffer ' foo'>". I think this is super unlikely to occur in
practice though, and (in my opinion) makes it a lot more obvious how to
refer to these buffers in Eshell anyway.
Second, this makes it possible to (relatively) easily add new special
reference types. In this patch, I also reworked how special refs use
Pcomplete. This lets us write Pcomplete functions for any special ref
type, so we can do the usual '(pcomplete-here ...)' magic in them.
Stefan, if you have any comments on this, I'm all ears. The code works
in all the cases I can think of, but maybe there are cleaner ways to do
things.
Finally, I added a new, hopefully-useful special ref type: markers.
Since Eshell lets you redirect output of commands to a marker, I think
this would make it easier to create these on-the-fly. It also helps to
stress-test some of the new code here, since a marker ref can contain a
nested buffer ref: "#<marker 1 #<buffer my-buffer>>".
[0001-Support-arbitrary-Eshell-arguments-inside-special-re.patch (text/plain, attachment)]
[0002-Add-eshell-special-ref-alist-to-allow-extending-Eshe.patch (text/plain, attachment)]
[0003-Add-a-new-Eshell-special-reference-type-for-markers.patch (text/plain, attachment)]
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sun, 22 Oct 2023 19:50:03 GMT)
Full text and
rfc822 format available.
Reply sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
You have taken responsibility.
(Tue, 24 Oct 2023 19:31:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 24 Oct 2023 19:31:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 66458-done <at> debbugs.gnu.org (full text, mbox):
Version: 30.1
On 10/10/2023 5:47 PM, Jim Porter wrote:
> These patches do a few things to improve how Eshell's special references
> work (these are ways of typing out special Lisp objects like buffers or
> processes, e.g. "#<buffer FOO>").
Merged to master as 64aa01f60ad. Closing this now.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 22 Nov 2023 12:24:13 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 207 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.