GNU bug report logs - #66458
30.0.50; [PATCH] Improve Eshell support for special reference types

Previous Next

Package: emacs;

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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#66458: closed (30.0.50; [PATCH] Improve Eshell support for
 special reference types)
Date: Tue, 24 Oct 2023 19:31:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 24 Oct 2023 12:30:10 -0700
with message-id <6e86e444-e0d1-c066-b6fc-54144a90578a <at> gmail.com>
and subject line Re: bug#66458: 30.0.50; [PATCH] Improve Eshell support for special reference types
has caused the debbugs.gnu.org bug report #66458,
regarding 30.0.50; [PATCH] Improve Eshell support for special reference types
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
66458: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66458
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; [PATCH] Improve Eshell support for special reference types
Date: Tue, 10 Oct 2023 17:47:52 -0700
[Message part 3 (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)]
[Message part 7 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: 66458-done <at> debbugs.gnu.org
Cc: monnier <at> iro.umontreal.ca
Subject: Re: bug#66458: 30.0.50; [PATCH] Improve Eshell support for special
 reference types
Date: Tue, 24 Oct 2023 12:30:10 -0700
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.



This bug report was last modified 1 year and 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.