From: Boruch Baum <boruch_baum@gmx.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 20063@debbugs.gnu.org
Subject: bug#20063: 24.4: read-from-minibuffer improperly setting hist parameter
Date: Mon, 09 Mar 2015 08:05:11 -0400 [thread overview]
Message-ID: <54FD8C77.7040208@gmx.com> (raw)
In-Reply-To: <lfh9tvugd2.fsf@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2562 bytes --]
Three reasons I think this should be considered a bug, and changed - two
from a programmer's perspective, and one from a user's perspective. For
both, consider the cases of functions `toggle-option' (this bug report)
and `highlight-regexp' (bug #19877).
1] From a programmer's perspective, forcing a HIST when the programmer
asks for COLLECTION = !nil and HIST = nil, creates a conflict when
parameter REQUIRE-MATCH is set to `t', because the mini-buffer will
offer entries, from HIST, that are not in COLLECTION, and those entries
will then just be rejected due to REQUIRE-MATCH.
2] From a programmer's perspective, there are four legitimate
combinations of COLLECTION and HIST, and the current state denies a
programmer the freedom to offer a specific COLLECTION without some
general HIST.
3] From a user's perspective (and this is how I came across both
instances of this issue), I don't want invalid or nonsense options being
presented to me by emacs. They just confuse, invite unwanted outcomes,
and delay finishing the task at hand. In the case of `toggle-option',
the current situation has the mini-buffer offering the user options
that, should the user select, will be rejected as invalid by the
mini-buffer. In the case of `highlight-regexp', the choices that the
mini-buffer offer from HIST are accepted, but are undesirable, lead to
confusion in selection, and confusion in navigating amongst the
desirable elements, ie. those in COLLECTION.
On 03/08/2015 09:08 PM, Glenn Morris wrote:
> Boruch Baum wrote:
>
>> Function `toggle-option' calls `completing-read', without providing
>> parameters REQUIRE-MATCH or HIST. `completing-read' calls
>> `completing-read-default' in `minibuffer.el'. `completing-read-default'
>> calls `read-from-minibuffer' in `minibuf.c'. There, on line 974 of
>> `minibuf.c:'
>>
>> if (NILP (histvar))
>> histvar = Qminibuffer_history;
>>
>> If I understand this correctly, this says that even if the caller
>> explicitly says that there should be no history used (condition nil),
>> the Qminibuffer_history should be used anyway.
>
> Nil means use the default history list. Eg see "Minibuffer History" in
> the elisp manual:
>
> If you don't specify HISTORY, then the default history list
> `minibuffer-history' is used.
>
> I don't see a bug here, other than perhaps the doc of completing-read
> could stand to be more explicit, like the elisp manual is.
>
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-03-09 12:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-08 22:25 bug#20063: 24.4: read-from-minibuffer improperly setting hist parameter Boruch Baum
2015-03-09 1:08 ` Glenn Morris
2015-03-09 12:05 ` Boruch Baum [this message]
2015-03-09 18:14 ` Stefan Monnier
2015-03-10 15:34 ` Boruch Baum
2015-03-11 14:09 ` Stefan Monnier
2015-03-11 15:43 ` Boruch Baum
2015-03-11 19:19 ` Stefan Monnier
2022-02-13 9:13 ` Lars Ingebrigtsen
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=54FD8C77.7040208@gmx.com \
--to=boruch_baum@gmx.com \
--cc=20063@debbugs.gnu.org \
--cc=rgm@gnu.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 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.