[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t
From: |
Lars Ingebrigtsen |
Subject: |
bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t) |
Date: |
Sun, 23 Jun 2019 14:01:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
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
- bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), (continued)
bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), Davor Rotim, 2019/06/21
- bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), Michael Heerdegen, 2019/06/21
- bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), Michael Heerdegen, 2019/06/21
- bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), Lars Ingebrigtsen, 2019/06/22
- bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), Michael Heerdegen, 2019/06/22
- bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), Noam Postavsky, 2019/06/22
- bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), Michael Heerdegen, 2019/06/22
- bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t),
Lars Ingebrigtsen <=
- bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), Michael Heerdegen, 2019/06/23
bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t), Lars Ingebrigtsen, 2019/06/22