all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* use-short-answers, and yes/no questions
@ 2024-03-01 16:41 T.V Raman
  2024-03-01 16:57 ` T.V Raman
  0 siblings, 1 reply; 9+ messages in thread
From: T.V Raman @ 2024-03-01 16:41 UTC (permalink / raw)
  To: emacs-devel

1. If you set use-short-answers to t via custom,
2. Both y-or-n-p and yes-or-no-p enter recursive edit if you answer
3. If you turn off use-short-answers, yes-or-no-p works,
4. But y-or-n-p enters recursive edit.
5. Appears to be a fairly new breakage
-- 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: use-short-answers, and yes/no questions
  2024-03-01 16:41 use-short-answers, and yes/no questions T.V Raman
@ 2024-03-01 16:57 ` T.V Raman
  2024-03-02  7:45   ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: T.V Raman @ 2024-03-01 16:57 UTC (permalink / raw)
  To: emacs-devel

"T.V Raman" <raman@google.com> writes:


Following up to myself, specifically the issue appears to be that it
wants a C-j after answering "y" doesn't take Enter.

> 1. If you set use-short-answers to t via custom,
> 2. Both y-or-n-p and yes-or-no-p enter recursive edit if you answer
> 3. If you turn off use-short-answers, yes-or-no-p works,
> 4. But y-or-n-p enters recursive edit.
> 5. Appears to be a fairly new breakage

-- 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: use-short-answers, and yes/no questions
  2024-03-01 16:57 ` T.V Raman
@ 2024-03-02  7:45   ` Eli Zaretskii
  2024-03-02 15:43     ` T.V Raman
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-03-02  7:45 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

> From: "T.V Raman" <raman@google.com>
> Date: Fri, 01 Mar 2024 08:57:46 -0800
> 
> "T.V Raman" <raman@google.com> writes:
> 
> 
> Following up to myself, specifically the issue appears to be that it
> wants a C-j after answering "y" doesn't take Enter.
> 
> > 1. If you set use-short-answers to t via custom,
> > 2. Both y-or-n-p and yes-or-no-p enter recursive edit if you answer
> > 3. If you turn off use-short-answers, yes-or-no-p works,
> > 4. But y-or-n-p enters recursive edit.
> > 5. Appears to be a fairly new breakage

I cannot reproduce this with the current master branch.
use-short-answers is not supposed to affect y-or-n-p at all, and in my
testing it doesn't: I don't need to type C-j or RET after "y", neither
when use-short-answers is nil nor when it's non-nil.

Can you show a complete detailed recipe that exhibits the problem?
(And I suggest "make bootstrap" first to make sure you don't see
strange effects of incompatible *.elc/*.eln files.)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: use-short-answers, and yes/no questions
  2024-03-02  7:45   ` Eli Zaretskii
@ 2024-03-02 15:43     ` T.V Raman
  2024-03-02 15:50       ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: T.V Raman @ 2024-03-02 15:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

1. Verified that it does not happen with emacs -q -- with emacspeak loaded.
2. So this is clearly coming from  some package I have installed; any
   tips on how I would debug this -- *other* than uninstalling the 100+
   packages and bringing them back one at a time?

   
-- 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: use-short-answers, and yes/no questions
  2024-03-02 15:43     ` T.V Raman
@ 2024-03-02 15:50       ` Eli Zaretskii
  2024-03-02 16:02         ` T.V Raman
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-03-02 15:50 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

> From: "T.V Raman" <raman@google.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 02 Mar 2024 07:43:53 -0800
> 
> 1. Verified that it does not happen with emacs -q -- with emacspeak loaded.
> 2. So this is clearly coming from  some package I have installed; any
>    tips on how I would debug this -- *other* than uninstalling the 100+
>    packages and bringing them back one at a time?

Bisection is usually faster.

But if you are "feeling lucky", try looking for a customization or a
package that affects the minibuffer-related keymaps.

Another idea is to step with Edebug through y-or-n-p, in "emacs -q"
and in your normal session, and see what you find by comparing what
happens in these two cases.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: use-short-answers, and yes/no questions
  2024-03-02 15:50       ` Eli Zaretskii
@ 2024-03-02 16:02         ` T.V Raman
  2024-03-02 16:22           ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: T.V Raman @ 2024-03-02 16:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Found it by edebug and looking at the docs for y-or-n-p which I hadn't
read in a long time.

The fix in my case appears to be to set
(setq y-or-n-p-use-read-key t)

I've never touched that before and its default is nil.

Setting it to t got me the behavior I am used to.

-- 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: use-short-answers, and yes/no questions
  2024-03-02 16:02         ` T.V Raman
@ 2024-03-02 16:22           ` Eli Zaretskii
  2024-03-02 16:33             ` T.V Raman
  2024-03-02 21:42             ` T.V Raman
  0 siblings, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2024-03-02 16:22 UTC (permalink / raw)
  To: T.V Raman; +Cc: emacs-devel

> From: "T.V Raman" <raman@google.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 02 Mar 2024 08:02:58 -0800
> 
> Found it by edebug and looking at the docs for y-or-n-p which I hadn't
> read in a long time.
> 
> The fix in my case appears to be to set
> (setq y-or-n-p-use-read-key t)
> 
> I've never touched that before and its default is nil.
> 
> Setting it to t got me the behavior I am used to.

Very strange, because the default is nil, and I get the behavior you
want without changing it.  And so did you, since it worked for you in
"emacs -q".

Never mind.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: use-short-answers, and yes/no questions
  2024-03-02 16:22           ` Eli Zaretskii
@ 2024-03-02 16:33             ` T.V Raman
  2024-03-02 21:42             ` T.V Raman
  1 sibling, 0 replies; 9+ messages in thread
From: T.V Raman @ 2024-03-02 16:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

I suspect there is a package somewhere in my full setup that is the
actual culprit, but at least I have a fix for now. Will continue to
track it, I just got lucky in finding the fix as follows:

1. debug-on-entry y-or-n-p
2. Called y-or-n-p
3. Entered debugger.
4. That in turn called y-or-n-p because of something in emacspeak
5. And there in the debugger session, '"y" without enter or anything
   else worked.
6. Then I checked the state of the world in edebug and found that var
   
-- 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: use-short-answers, and yes/no questions
  2024-03-02 16:22           ` Eli Zaretskii
  2024-03-02 16:33             ` T.V Raman
@ 2024-03-02 21:42             ` T.V Raman
  1 sibling, 0 replies; 9+ messages in thread
From: T.V Raman @ 2024-03-02 21:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Adding this note to the thread while I remember:

1. So given that i noticed that behavior correcting itself  when in the debugger,
   1. and the lines below: (line  3914)
            (y-or-n-p-use-read-key
          ;; ¡Beware! when I tried to edebug this code, Emacs got into a weird state
          ;; where all the keys were unbound (i.e. it somehow got triggered
   2.  read-char-choice does not exhibit the strange behavior.

      This is likely the locus of the strangeness

      
-- 



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-03-02 21:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-01 16:41 use-short-answers, and yes/no questions T.V Raman
2024-03-01 16:57 ` T.V Raman
2024-03-02  7:45   ` Eli Zaretskii
2024-03-02 15:43     ` T.V Raman
2024-03-02 15:50       ` Eli Zaretskii
2024-03-02 16:02         ` T.V Raman
2024-03-02 16:22           ` Eli Zaretskii
2024-03-02 16:33             ` T.V Raman
2024-03-02 21:42             ` T.V Raman

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.