From: Lars Ingebrigtsen <larsi@gnus.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 36324@debbugs.gnu.org, Davor Rotim <rotim.davor@gmail.com>
Subject: bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t)
Date: Sun, 23 Jun 2019 14:01:09 +0200 [thread overview]
Message-ID: <m3k1dcv7cq.fsf@gnus.org> (raw)
In-Reply-To: <87imsxiqp9.fsf@web.de> (Michael Heerdegen's message of "Sat, 22 Jun 2019 17:29:22 +0200")
Michael Heerdegen <michael_heerdegen@web.de> writes:
>> The doc string for `read-from-minibuffer' doesn't document the t value
>> for HISTORY at all -- perhaps that should also be fixed?
>
> It's also not hardcoded AFAIK. t is non-nil so Qminibuffer_history
> isn't substituted in `read-from-minibuffer', and it's not listp so
> `add-to-history' ignores it silently. AFAIU other values V with these
> properties would also work this way but still provoke the
> (wrong-type-argument listp V) error.
>
> Having some input not recorded in a history is a useful feature. IMHO
> this should be doable in an official way, and be documented.
Yes, it's a useful feature, and it should be documented, but before
doing that, I wonder how this feature developed.
It was developed in 2012, apparently, when `read-passwd' changed from
this ad-hoc way to the `t':
- (read-string prompt nil
- (let ((sym (make-symbol "forget-history")))
- (set sym nil)
- sym)
- default)
+ (read-string prompt nil t default) ; t = "no history"
This apparently came from an XEmacs convention, which explains this 2005
change to savehist.el:
- (add-to-list 'savehist-minibuffer-history-variables
- minibuffer-history-variable))
+ ;; XEmacs sets minibuffer-history-variable to t to mean "no history
+ ;; is being recorded".
+ (unless (eq minibuffer-history-variable t)
+ (add-to-list 'savehist-minibuffer-history-variables
+ minibuffer-history-variable)))
So the `t' being the "no history" signal isn't just some random
artefact, but is the design, so I'm just going to go ahead and document
that in `read-from-minibuffer', which explains all the details about
HISTORY. I'll add it to `minibuffer-history-variable' for completeness'
sake, too.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2019-06-23 12:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 16:04 bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t) Michael Heerdegen
2019-06-21 16:16 ` Lars Ingebrigtsen
2019-06-21 16:40 ` Michael Heerdegen
2019-06-21 16:50 ` Lars Ingebrigtsen
2019-06-21 17:05 ` Michael Heerdegen
2019-06-21 19:22 ` Davor Rotim
2019-06-21 23:23 ` Michael Heerdegen
2019-06-22 2:35 ` Michael Heerdegen
2019-06-22 9:33 ` Lars Ingebrigtsen
2019-06-22 15:29 ` Michael Heerdegen
2019-06-22 17:41 ` Noam Postavsky
2019-06-22 17:51 ` Michael Heerdegen
2019-06-23 12:01 ` Lars Ingebrigtsen [this message]
2019-06-23 15:27 ` Michael Heerdegen
2019-06-22 9:20 ` 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=m3k1dcv7cq.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=36324@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
--cc=rotim.davor@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.