GNU bug report logs -
#1662
23.0.60; Interactive not using minibuffer prompt face
Previous Next
Reported by: "Geoff Gole" <geoffgole <at> gmail.com>
Date: Sun, 21 Dec 2008 21:50:03 UTC
Severity: normal
Done: martin rudalics <rudalics <at> gmx.at>
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 1662 in the body.
You can then email your comments to 1662 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1662
; Package
emacs
.
(Sun, 21 Dec 2008 21:50:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Geoff Gole" <geoffgole <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 21 Dec 2008 21:50:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
The minibuffer prompt displayed by functions that use (interactive) is
usually
highlighted with the face `minibuffer-prompt'. However, interactive specs
"c",
"k" and "K" don't do this.
To reproduce:
emacs -Q
M-z
Running this function shows the difference more clearly:
(defun example-prompt (&rest args)
(interactive "sXXXX: \ncXXXX: \nkXXXX: \nKXXXX: ")
(ignore args))
In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
of 2008-11-22 on elegiac, modified by Debian
(emacs-snapshot package, version 1:20081121-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure '--build' 'i486-linux-gnu' '--host'
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp'
'--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu'
'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000
-g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''
Also observed in GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d
scroll bars) of 2008-11-10 on raven, modified by Debian
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1662
; Package
emacs
.
(Tue, 23 Dec 2008 08:05:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
martin rudalics <rudalics <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 23 Dec 2008 08:05:07 GMT)
Full text and
rfc822 format available.
Message #10 received at 1662 <at> emacsbugs.donarmstrong.com (full text, mbox):
> The minibuffer prompt displayed by functions that use (interactive) is
> usually
> highlighted with the face `minibuffer-prompt'. However, interactive specs
> "c",
> "k" and "K" don't do this.
Strictly spoken, this is not a bug. "c" uses `read-char', "k" and "K"
use `read-key-sequence' and, by specification, neither of these use the
minibuffer. So `minibuffer-prompt' doesn't apply here.
martin
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1662
; Package
emacs
.
(Tue, 23 Dec 2008 20:50:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 23 Dec 2008 20:50:03 GMT)
Full text and
rfc822 format available.
Message #15 received at 1662 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> The minibuffer prompt displayed by functions that use (interactive)
>> is usually highlighted with the face `minibuffer-prompt'. However,
>> interactive specs "c", "k" and "K" don't do this.
> Strictly spoken, this is not a bug. "c" uses `read-char', "k" and "K"
> use `read-key-sequence' and, by specification, neither of these use the
> minibuffer. So `minibuffer-prompt' doesn't apply here.
Yes, strictly speaking, this is true, but this is taking too literal
a point of view. I agree with the OP that we should make those
operations try to behave similarly to minibuffer ones, wrt to
prompt faces.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1662
; Package
emacs
.
(Wed, 24 Dec 2008 06:00:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Geoff Gole" <geoffgole <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 24 Dec 2008 06:00:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 1662 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Strictly spoken, this is not a bug. "c" uses `read-char', "k" and "K"
> use `read-key-sequence' and, by specification, neither of these use the
> minibuffer. So `minibuffer-prompt' doesn't apply here.
That makes sense. However, I do think that highlighting prompts in the
minibuffer is a good idea even in situations where the minibuffer is
not used directly.
Isearch in emacs 23 seems to do that, so there is some precedent.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1662
; Package
emacs
.
(Wed, 24 Dec 2008 10:25:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Lennart Borgman" <lennart.borgman <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 24 Dec 2008 10:25:04 GMT)
Full text and
rfc822 format available.
Message #25 received at 1662 <at> emacsbugs.donarmstrong.com (full text, mbox):
On Wed, Dec 24, 2008 at 6:55 AM, Geoff Gole <geoffgole <at> gmail.com> wrote:
>> Strictly spoken, this is not a bug. "c" uses `read-char', "k" and "K"
>> use `read-key-sequence' and, by specification, neither of these use the
>> minibuffer. So `minibuffer-prompt' doesn't apply here.
>
> That makes sense. However, I do think that highlighting prompts in the
> minibuffer is a good idea even in situations where the minibuffer is
> not used directly.
>
> Isearch in emacs 23 seems to do that, so there is some precedent.
Yes, the purpose of the special minibuffer-prompt is to make the user
aware that input will be treated specially at the moment.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1662
; Package
emacs
.
(Wed, 24 Dec 2008 10:35:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
martin rudalics <rudalics <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 24 Dec 2008 10:35:04 GMT)
Full text and
rfc822 format available.
Message #30 received at 1662 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
> However, I do think that highlighting prompts in the
> minibuffer is a good idea even in situations where the minibuffer is
> not used directly.
Could you try the attached patch?
Thanks, martin.
[prompt.diff (text/plain, inline)]
*** callint.c.~1.167.~ 2008-05-14 09:49:11.000000000 +0200
--- callint.c 2008-12-24 11:09:49.859375000 +0100
***************
*** 45,50 ****
--- 45,51 ----
Lisp_Object Vcommand_debug_status, Qcommand_debug_status;
Lisp_Object Qenable_recursive_minibuffers;
+ extern Lisp_Object Qface, Qminibuffer_prompt;
/* Non-nil means treat the mark as active
even if mark_active is 0. */
***************
*** 541,546 ****
--- 542,550 ----
break;
case 'c': /* Character */
+ Fput_text_property (make_number (0),
+ make_number (SCHARS (callint_message)),
+ Qface, Qminibuffer_prompt, callint_message);
args[i] = Fread_char (callint_message, Qnil, Qnil);
message1_nolog ((char *) 0);
/* Passing args[i] directly stimulates compiler bug */
***************
*** 594,599 ****
--- 598,606 ----
{
int speccount1 = SPECPDL_INDEX ();
specbind (Qcursor_in_echo_area, Qt);
+ Fput_text_property (make_number (0),
+ make_number (SCHARS (callint_message)),
+ Qface, Qminibuffer_prompt, callint_message);
args[i] = Fread_key_sequence (callint_message,
Qnil, Qnil, Qnil, Qnil);
unbind_to (speccount1, Qnil);
***************
*** 622,627 ****
--- 629,637 ----
{
int speccount1 = SPECPDL_INDEX ();
specbind (Qcursor_in_echo_area, Qt);
+ Fput_text_property (make_number (0),
+ make_number (SCHARS (callint_message)),
+ Qface, Qminibuffer_prompt, callint_message);
args[i] = Fread_key_sequence (callint_message,
Qnil, Qt, Qnil, Qnil);
teml = args[i];
*** textprop.c.~1.163.~ 2008-11-03 18:21:08.015625000 +0100
--- textprop.c 2008-12-24 11:17:14.859375000 +0100
***************
*** 57,62 ****
--- 57,63 ----
/* Visual properties text (including strings) may have. */
Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple;
Lisp_Object Qinvisible, Qread_only, Qintangible, Qmouse_face;
+ Lisp_Object Qminibuffer_prompt;
/* Sticky properties */
Lisp_Object Qfront_sticky, Qrear_nonsticky;
***************
*** 2334,2339 ****
--- 2335,2342 ----
Qrear_nonsticky = intern ("rear-nonsticky");
staticpro (&Qmouse_face);
Qmouse_face = intern ("mouse-face");
+ staticpro (&Qminibuffer_prompt);
+ Qminibuffer_prompt = intern ("minibuffer-prompt");
/* Properties that text might use to specify certain actions */
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1662
; Package
emacs
.
(Wed, 24 Dec 2008 14:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Geoff Gole" <geoffgole <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 24 Dec 2008 14:35:03 GMT)
Full text and
rfc822 format available.
Message #35 received at 1662 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Could you try the attached patch?
Thanks, that seems to fix it nicely.
Reply sent
to
martin rudalics <rudalics <at> gmx.at>
:
You have taken responsibility.
(Fri, 26 Dec 2008 10:05:08 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Geoff Gole" <geoffgole <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 26 Dec 2008 10:05:08 GMT)
Full text and
rfc822 format available.
Message #40 received at 1662-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Fixed as
* callint.c (Fcall_interactively): For `c', `k', and `K' prompt
in minibuffer-prompt face. (Bug#1662)
Thanks for the report, martin.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Fri, 23 Jan 2009 15:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.