* bug#1662: 23.0.60; Interactive not using minibuffer prompt face @ 2008-12-21 21:43 ` Geoff Gole 2008-12-23 7:59 ` martin rudalics 2008-12-26 10:05 ` bug#1662: marked as done (23.0.60; Interactive not using minibuffer prompt face) Emacs bug Tracking System 0 siblings, 2 replies; 8+ messages in thread From: Geoff Gole @ 2008-12-21 21:43 UTC (permalink / raw) To: emacs-pretest-bug [-- Attachment #1: Type: text/plain, Size: 1380 bytes --] 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 [-- Attachment #2: Type: text/html, Size: 1723 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1662: 23.0.60; Interactive not using minibuffer prompt face 2008-12-21 21:43 ` bug#1662: 23.0.60; Interactive not using minibuffer prompt face Geoff Gole @ 2008-12-23 7:59 ` martin rudalics 2008-12-23 20:45 ` Stefan Monnier 2008-12-26 10:05 ` bug#1662: marked as done (23.0.60; Interactive not using minibuffer prompt face) Emacs bug Tracking System 1 sibling, 1 reply; 8+ messages in thread From: martin rudalics @ 2008-12-23 7:59 UTC (permalink / raw) To: 1662 > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1662: 23.0.60; Interactive not using minibuffer prompt face 2008-12-23 7:59 ` martin rudalics @ 2008-12-23 20:45 ` Stefan Monnier 0 siblings, 0 replies; 8+ messages in thread From: Stefan Monnier @ 2008-12-23 20:45 UTC (permalink / raw) To: martin rudalics; +Cc: 1662 >> 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1662: marked as done (23.0.60; Interactive not using minibuffer prompt face) 2008-12-21 21:43 ` bug#1662: 23.0.60; Interactive not using minibuffer prompt face Geoff Gole 2008-12-23 7:59 ` martin rudalics @ 2008-12-26 10:05 ` Emacs bug Tracking System 1 sibling, 0 replies; 8+ messages in thread From: Emacs bug Tracking System @ 2008-12-26 10:05 UTC (permalink / raw) To: martin rudalics [-- Attachment #1: Type: text/plain, Size: 899 bytes --] Your message dated Fri, 26 Dec 2008 10:55:35 +0100 with message-id <4954AA17.9080907@gmx.at> and subject line Re: bug#1662: 23.0.60; Interactive not using minibuffer prompt face has caused the Emacs bug report #1662, regarding 23.0.60; Interactive not using minibuffer prompt face to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) -- 1662: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1662 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 6338 bytes --] [-- Attachment #2.1.1: Type: text/plain, Size: 1380 bytes --] 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 [-- Attachment #2.1.2: Type: text/html, Size: 1723 bytes --] [-- Attachment #3: Type: message/rfc822, Size: 1694 bytes --] From: martin rudalics <rudalics@gmx.at> Cc: 1662-done@emacsbugs.donarmstrong.com Subject: Re: bug#1662: 23.0.60; Interactive not using minibuffer prompt face Date: Fri, 26 Dec 2008 10:55:35 +0100 Message-ID: <4954AA17.9080907@gmx.at> Fixed as * callint.c (Fcall_interactively): For `c', `k', and `K' prompt in minibuffer-prompt face. (Bug#1662) Thanks for the report, martin. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1662: 23.0.60; Interactive not using minibuffer prompt face
@ 2008-12-24 5:55 Geoff Gole
2008-12-24 10:16 ` Lennart Borgman
2008-12-24 10:22 ` martin rudalics
0 siblings, 2 replies; 8+ messages in thread
From: Geoff Gole @ 2008-12-24 5:55 UTC (permalink / raw)
To: martin rudalics, monnier, 1662
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1662: 23.0.60; Interactive not using minibuffer prompt face 2008-12-24 5:55 bug#1662: 23.0.60; Interactive not using minibuffer prompt face Geoff Gole @ 2008-12-24 10:16 ` Lennart Borgman 2008-12-24 10:22 ` martin rudalics 1 sibling, 0 replies; 8+ messages in thread From: Lennart Borgman @ 2008-12-24 10:16 UTC (permalink / raw) To: Geoff Gole, 1662 On Wed, Dec 24, 2008 at 6:55 AM, Geoff Gole <geoffgole@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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1662: 23.0.60; Interactive not using minibuffer prompt face 2008-12-24 5:55 bug#1662: 23.0.60; Interactive not using minibuffer prompt face Geoff Gole 2008-12-24 10:16 ` Lennart Borgman @ 2008-12-24 10:22 ` martin rudalics 1 sibling, 0 replies; 8+ messages in thread From: martin rudalics @ 2008-12-24 10:22 UTC (permalink / raw) To: Geoff Gole; +Cc: 1662 [-- Attachment #1: Type: text/plain, Size: 202 bytes --] > 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. [-- Attachment #2: prompt.diff --] [-- Type: text/plain, Size: 2399 bytes --] *** 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 */ ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1662: 23.0.60; Interactive not using minibuffer prompt face
@ 2008-12-24 14:27 Geoff Gole
0 siblings, 0 replies; 8+ messages in thread
From: Geoff Gole @ 2008-12-24 14:27 UTC (permalink / raw)
To: martin rudalics, monnier, 1662
> Could you try the attached patch?
Thanks, that seems to fix it nicely.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-12-26 10:05 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <4954AA17.9080907@gmx.at> 2008-12-21 21:43 ` bug#1662: 23.0.60; Interactive not using minibuffer prompt face Geoff Gole 2008-12-23 7:59 ` martin rudalics 2008-12-23 20:45 ` Stefan Monnier 2008-12-26 10:05 ` bug#1662: marked as done (23.0.60; Interactive not using minibuffer prompt face) Emacs bug Tracking System 2008-12-24 5:55 bug#1662: 23.0.60; Interactive not using minibuffer prompt face Geoff Gole 2008-12-24 10:16 ` Lennart Borgman 2008-12-24 10:22 ` martin rudalics -- strict thread matches above, loose matches on Subject: below -- 2008-12-24 14:27 Geoff Gole
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.