all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Federico Tedin <federicotedin@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 39291@debbugs.gnu.org, pogonyshev@gmail.com, juri@linkov.net
Subject: bug#39291: M-: history doesn't store erroneous input
Date: Thu, 30 Jan 2020 16:14:42 +0200	[thread overview]
Message-ID: <83k159m3ot.fsf@gnu.org> (raw)
In-Reply-To: <87blqm0x0f.fsf@gmail.com> (message from Federico Tedin on Wed, 29 Jan 2020 22:32:16 +0100)

> From: Federico Tedin <federicotedin@gmail.com>
> Cc: Juri Linkov <juri@linkov.net>,  39291@debbugs.gnu.org,  pogonyshev@gmail.com
> Date: Wed, 29 Jan 2020 22:32:16 +0100
> 
> I found that the minibuffer input string in `read_minibuf' was being
> added to the history list after we tried to parse an object from it (if
> `expflag' was true). So if the parsing failed, then the value wasn't
> added to the history. I'm attaching a patch with my changes.

Thanks.

> My only doubt is that now, the call to `string_to_object' (which calls
> `read-from-string', which calls `read1', and then `read0') is located
> outside the context (not sure what the right term is) set up with
> `specbind'. Could this be a problem? Do any of these functions depend on
> the context set up in `read_minibuf'?  (They don't appear to, just want
> to be sure).

Why is it a problem to move the call to unbind_to to after the call to
add-to-history?  AFAIU, the original code, before you changed it,
actually did that.  It just didn't call string_to_object, but I'm not
sure why would that change anything.  Does anyone see a problem here?
Stefan, any comments?





  reply	other threads:[~2020-01-30 14:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26 15:16 bug#39291: M-: history doesn't store erroneous input Paul Pogonyshev
2020-01-28 23:35 ` Juri Linkov
2020-01-29 17:16   ` Eli Zaretskii
2020-01-29 18:09     ` Federico Tedin
2020-01-29 21:32     ` Federico Tedin
2020-01-30 14:14       ` Eli Zaretskii [this message]
2020-01-30 14:20         ` Stefan Monnier
2020-01-30 14:23       ` Stefan Monnier
2020-01-31  0:44         ` Federico Tedin
2020-01-31  9:20           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83k159m3ot.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=39291@debbugs.gnu.org \
    --cc=federicotedin@gmail.com \
    --cc=juri@linkov.net \
    --cc=monnier@iro.umontreal.ca \
    --cc=pogonyshev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.