GNU bug report logs -
#15017
24.3.50; `read-from-minibuffer' to allow transforming input before adding to HIST
Previous Next
To reply to this bug, email your comments to 15017 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15017
; Package
emacs
.
(Sat, 03 Aug 2013 16:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 03 Aug 2013 16:55:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
(`read-from-minibuffer' is still coded in C...)
Enhancement request: Provide a global variable whose value would be nil
or a function to transform the input chosen for `read-from-minibuffer',
before adding it to the history variable.
A use case: a command that uses `completing-read' to choose among
absolute file names and uses `file-name-history' as the HIST argument.
This means (intentionally) that the candidates are not abbreviated with
`abbreviate-file-name', so a candidate might look like this:
"/usr/foo/toto/bar.el" instead of, say, this: "~/toto/bar.el".
But `read-file-name' puts abbreviated file names, such as
"~/toto/bar.el" on `file-name-history' (as it should). Obviously,
simple string comparisons (e.g., to avoid the cost of file access) on
file names will not work: "/usr/foo/toto/bar.el" is not `equal' to
"~/toto/bar.el", for instance.
I would like to be able to let-bind a global variable around a call to
`completing-read' to, say, function `abbreviate-file-name'. The
completion candidates would still be absolute, unabbreviated file names,
but when added to `file-name-history' they would be abbreviated.
Other input transformations might also be useful before adding to a
minibuffer history, besides the use case mentioned above.
In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
of 2013-07-21 on ODIEONE
Bzr revision: 113485 lekktu <at> gmail.com-20130722012547-e3b7qxn1dba5vf20
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
CFLAGS=-O0 -g3 LDFLAGS=-Lc:/Devel/emacs/lib
CPPFLAGS=-Ic:/Devel/emacs/include'
This bug report was last modified 11 years and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.