GNU bug report logs - #15017
24.3.50; `read-from-minibuffer' to allow transforming input before adding to HIST

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Drew Adams <drew.adams@HIDDEN>; dated Sat, 3 Aug 2013 16:55:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Aug 2013 16:54:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 03 12:54:23 2013
Received: from localhost ([127.0.0.1]:38429 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1V5f5y-0006lm-7E
	for submit <at> debbugs.gnu.org; Sat, 03 Aug 2013 12:54:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39358)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1V5f5v-0006lU-2X
 for submit <at> debbugs.gnu.org; Sat, 03 Aug 2013 12:54:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1V5f5f-0005qW-EF
 for submit <at> debbugs.gnu.org; Sat, 03 Aug 2013 12:54:13 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,USER_IN_WHITELIST
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:46991)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1V5f5f-0005qM-BN
 for submit <at> debbugs.gnu.org; Sat, 03 Aug 2013 12:54:03 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41032)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1V5f5V-0003Gs-H0
 for bug-gnu-emacs@HIDDEN; Sat, 03 Aug 2013 12:54:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1V5f5M-0005n9-V0
 for bug-gnu-emacs@HIDDEN; Sat, 03 Aug 2013 12:53:53 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:21493)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1V5f5M-0005mx-OS
 for bug-gnu-emacs@HIDDEN; Sat, 03 Aug 2013 12:53:44 -0400
Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 r73GrgMN002810
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Sat, 3 Aug 2013 16:53:43 GMT
Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
 by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r73Grfmp018390
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
 for <bug-gnu-emacs@HIDDEN>; Sat, 3 Aug 2013 16:53:42 GMT
Received: from abhmt115.oracle.com (abhmt115.oracle.com [141.146.116.67])
 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r73Grf6u008798
 for <bug-gnu-emacs@HIDDEN>; Sat, 3 Aug 2013 16:53:41 GMT
MIME-Version: 1.0
Message-ID: <592430da-2f45-412f-971f-753f7b31559d@default>
Date: Sat, 3 Aug 2013 09:53:40 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50; `read-from-minibuffer' to allow transforming input before
 adding to HIST
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6668.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: ucsinet22.oracle.com [156.151.31.94]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

(`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@HIDDEN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=3D/c/Devel/emacs/binary --enable-checking=3Dyes,glyphs
 CFLAGS=3D-O0 -g3 LDFLAGS=3D-Lc:/Devel/emacs/lib
 CPPFLAGS=3D-Ic:/Devel/emacs/include'




Acknowledgement sent to Drew Adams <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#15017; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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