unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Federico Tedin <federicotedin@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 38317@debbugs.gnu.org
Subject: bug#38317: Buffer-local variables don't work as history for read-from-minibuffer
Date: Wed, 27 Nov 2019 19:50:00 +0100	[thread overview]
Message-ID: <87h82pw3vr.fsf@gmail.com> (raw)
In-Reply-To: <87k17lfscs.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 27 Nov 2019 12:53:23 +0100")

> I haven't tested the code, but it makes sense to me.  I do wonder
> whether there are any instances of the variables that are local to the
> minibuffer...  but I guess that's unlikely?

I agree that it would be unlikely. I am not sure what the use-case for
having a history local to the minibuffer itself would be. It makes much
more sense for the history to be global or to be determined by the
context i.e. the current buffer (like I want to do with `goto-line').

>> +** 'read-from-minibuffer' now works with buffer-local history variables
>> +The HIST argument of 'read-from-minibuffer' now works correctly with
>> +buffer-local variables. This means that different buffers can have
>> +their own separated input history list if desired.
>
> This should probably be documented in the manual, too?
>
> The patch otherwise looks good to me.

Thanks. In what part of the manual would you document this? I was
thinking of either in:

1) The "Minibuffer History" section (but it doesn't mention the actual
HIST variable anywhere in there, though, and never mentions any specific
minibuffer-reading function)

2) In "Reading Text Strings with the Minibuffer", in the entry for
`read-from-minibuffer' (right before the link to "Minibuffer
History"). Maybe if we add it there users can then infer that other
minibuffer commands with a HIST argument also accept buffer-local
values.

Should I update the docstring for `read-from-minibuffer' as well? I
would like to add two things: that the value can be buffer-local, and
that the newly read item will be added to the history list. IMO this
wasn't clear enough so I ended up calling `add-to-history' myself, which
was redundant since `read_minibuf' does that already.





  reply	other threads:[~2019-11-27 18:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 21:30 bug#38317: Buffer-local variables don't work as history for read-from-minibuffer Federico Tedin
2019-11-22 13:33 ` Lars Ingebrigtsen
2019-11-22 15:23   ` Michael Heerdegen
2019-11-22 16:24   ` martin rudalics
2019-11-23 11:54     ` Lars Ingebrigtsen
2019-11-23 20:36       ` Federico Tedin
2019-11-23 23:12         ` Federico Tedin
2019-11-26 21:54           ` Federico Tedin
2019-11-27  8:14             ` Robert Pluim
2019-11-27 15:24               ` Drew Adams
2019-11-27 15:28                 ` Robert Pluim
2019-11-27 11:53             ` Lars Ingebrigtsen
2019-11-27 18:50               ` Federico Tedin [this message]
2019-11-27 19:25                 ` Eli Zaretskii
2019-11-27 21:04                   ` Federico Tedin
2019-11-28 12:05                     ` Federico Tedin
2019-12-05  9:31                       ` Lars Ingebrigtsen
2019-11-29  5:22                     ` Richard Stallman
2019-11-29 10:21                       ` Eli Zaretskii
2019-11-29 17:02                         ` Federico Tedin
2019-12-01  5:59                       ` Richard Stallman
2019-11-27 21:19             ` Juri Linkov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87h82pw3vr.fsf@gmail.com \
    --to=federicotedin@gmail.com \
    --cc=38317@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).