Subject: Re: bug#38282: 26.3; goto-line should not share input history with other commands

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 22 Nov 2019 13:09:06 +0100

Federico Tedin <[email-masked]> writes:

> +            ;; It would be better to use `goto-line-history' as a HIST
> +            ;; parameter to `read-from-minibuffer' (through
> +            ;; `read-number'), but using buffer-local variables
> +            ;; doesn't work for that purpose. (Bug#38317)
> +            (minibuffer-history
> +             (buffer-local-value 'goto-line-history (or buffer
> +                                                        (current-buffer)))))

I think a per-buffer history for goto-line makes sense, but I was also
wondering whether read-number should have its own separate history, too.

This would, I think, not interoperate well with that (that is, if
`read-number' passes a different variable to read-from-minibuffer than
nil).

So I think a better solution would be to fix the problem with
buffer-local variables not working in read-from-minibuffer first, and
then we could extend read-number with a history parameter instead of
hacking around the problem this way.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no