all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* minibuffer completion differences between emacs 22.3, 23.1, and xemacs
@ 2012-04-30  7:32 Christopher Grubert
  0 siblings, 0 replies; only message in thread
From: Christopher Grubert @ 2012-04-30  7:32 UTC (permalink / raw)
  To: help-gnu-emacs

I'm in the process of converting from xemacs to gnu emacs and I have a 
question about minibuffer completion of env variables.

I see that in 22.3 (and earlier) if I do the following:

C-x C-f /whatever/path/im/in/$HOM <TAB>

it says there is no match, but if I complete the var by hand and try again:

C-x C-f /whatever/path/im/in/$HOME <TAB>

it will substitute the value and continue on completing from the 
location (/home/chris in this example).  It will also strip off the 
originating path (/whatever/path/im/in/) and just leave the value of 
$HOME as shown from file system root.

I see that in 23.1 (and later) the behavior has changed such that:

C-x C-f /whatever/path/im/in/$HOM <TAB>

will complete to "/whatever/path/im/in/$HOME [Sole completion]" and 
stop.  If I then type a trailing "/" after the completed $HOME it will 
continue completing from "/whatever/path/im/in//home/chris/..." after it 
does the substitution, but this requires the extra step of typing / 
after the var and it doesn't compress the path.  That's not such a big 
deal in this example, but I tend to keep lots of long project paths in 
env vars and the above behavior can lead to a really long minibuffer line.

What I would like to have is the behavior from xemacs, which does a 
combination of the above:

C-x C-f /whatever/path/im/in/$HOM <TAB>

would first list any variable completions, then substitute the value, 
compress the path, and keep completing, all just by pressing tab:
C-x C-f /whatever/path/im/in/$HOM <TAB>
/whatever/path/im/in/$HOME <TAB>
/home/chris/ <TAB>
...files...

I've searched around and found practically no mention of this behavior 
anywhere, which seems surprising.  I only noticed the 22.3/23.1 behavior 
change after compiling several versions to see if the current behavior 
has always been there in gnu emacs.  I tried looking at the differences 
in the completion code from 22.3 to 23.1 thinking maybe I could just 
merge the features, but it looks like it was all rewritten for 23.  I do 
see some internal functions which perform at least part of this 
(expand-file-name), but I don't see any obvious configuration settings 
for tweaking this, and oddly have not come across any lisp snippets to 
mimic the xemacs behavior.

Any suggestions would be welcomed.  For reference, the behaviors 
described can all be seen in a default setup (emacs -q or xemacs 
--vanilla).  I'm currently using 24.0.96 so any suggestions which are 
specific to version 24 would also be welcomed.
Thanks,
Chris.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-30  7:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-30  7:32 minibuffer completion differences between emacs 22.3, 23.1, and xemacs Christopher Grubert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.