bug#6980: Could goto-char please have its own history list?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#6980: Could goto-char please have its own history list?

Lennart Borgman (gmail)
I can't see no reason its history should be mixed by something else.
(More than devel historic reasons ;-)



Reply | Threaded
Open this post in threaded view
|

bug#6980: Could goto-char please have its own history list?

Juri Linkov
> I can't see no reason its history should be mixed by something else.
> (More than devel historic reasons ;-)

It makes sense to share the same history that contains only numeric
values between all commands that use `read-number', like
e.g. `goto-line' and `goto-char' (with some changes), because
non-numeric values (added to the history from other commands)
are useless for such number-reading commands.



Reply | Threaded
Open this post in threaded view
|

bug#6980: Could goto-char please have its own history list?

Drew Adams
> > I can't see no reason its history should be mixed by something else.
> > (More than devel historic reasons ;-)
>
> It makes sense to share the same history that contains only numeric
> values between all commands that use `read-number', like
> e.g. `goto-line' and `goto-char' (with some changes), because
> non-numeric values (added to the history from other commands)
> are useless for such number-reading commands.

I don't have much of an opinion about the suggestion.
There are always pros & cons to making a history more or less specific.

But I'll point out that just because non-numeric histories are inappropriate for
numeric input does not mean that the same numeric history should be used for all
numeric inputs.




Reply | Threaded
Open this post in threaded view
|

bug#6980: Could goto-char please have its own history list?

Juri Linkov
>> > I can't see no reason its history should be mixed by something else.
>> > (More than devel historic reasons ;-)
>>
>> It makes sense to share the same history that contains only numeric
>> values between all commands that use `read-number', like
>> e.g. `goto-line' and `goto-char' (with some changes), because
>> non-numeric values (added to the history from other commands)
>> are useless for such number-reading commands.
>
> I don't have much of an opinion about the suggestion.
> There are always pros & cons to making a history more or less specific.
>
> But I'll point out that just because non-numeric histories are inappropriate for
> numeric input does not mean that the same numeric history should be used for all
> numeric inputs.

Yes, not all number-reading commands should share the numeric history.

For instance, version-control commands that read a revision number
can also accept non-numeric values like "submit:".  So every case
should be carefully considered on its own.



Reply | Threaded
Open this post in threaded view
|

bug#6980: Could goto-char please have its own history list?

Lennart Borgman (gmail)
On Thu, Aug 18, 2011 at 13:52, Juri Linkov <[hidden email]> wrote:

>>> > I can't see no reason its history should be mixed by something else.
>>> > (More than devel historic reasons ;-)
>>>
>>> It makes sense to share the same history that contains only numeric
>>> values between all commands that use `read-number', like
>>> e.g. `goto-line' and `goto-char' (with some changes), because
>>> non-numeric values (added to the history from other commands)
>>> are useless for such number-reading commands.
>>
>> I don't have much of an opinion about the suggestion.
>> There are always pros & cons to making a history more or less specific.
>>
>> But I'll point out that just because non-numeric histories are inappropriate for
>> numeric input does not mean that the same numeric history should be used for all
>> numeric inputs.
>
> Yes, not all number-reading commands should share the numeric history.
>
> For instance, version-control commands that read a revision number
> can also accept non-numeric values like "submit:".  So every case
> should be carefully considered on its own.

And of course I mean "I can see no reason its history should be mixed
by something else". ;-)



Reply | Threaded
Open this post in threaded view
|

bug#6980: Could goto-char please have its own history list?

Juri Linkov
In reply to this post by Juri Linkov
>> I can't see no reason its history should be mixed by something else.
>> (More than devel historic reasons ;-)
>
> It makes sense to share the same history that contains only numeric
> values between all commands that use `read-number', like
> e.g. `goto-line' and `goto-char' (with some changes), because
> non-numeric values (added to the history from other commands)
> are useless for such number-reading commands.

Matt reminded about this request in
https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg01270.html

Now `read-number' has own history in `read-number-history' added a year ago
in bug#38282.  The same commit 7c5d6a2afc6 also added `goto-line-history'
for `goto-line'.

So this request could be closed unless there is still a need to add
`goto-char-history' for `goto-char' too.  I'm not sure if
`read-number-history' is sufficient already, or own history should be added
to every number-reading command like `move-to-column', etc.