GNU bug report logs - #51138
Increase the value of kill-ring-max

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Mon, 11 Oct 2021 20:20:02 UTC

Severity: wishlist

Tags: patch

Fixed in version 29.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51138 in the body.
You can then email your comments to 51138 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Mon, 11 Oct 2021 20:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefan <at> marxist.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 11 Oct 2021 20:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: bug-gnu-emacs <at> gnu.org
Subject: Increase the value of kill-ring-max
Date: Mon, 11 Oct 2021 13:19:07 -0700
Severity: wishlist

The value of kill-ring-max was last increased in 1998, when it was
doubled from 30 to 60.  See commit bffa4d92e152.

Given that RAM is cheaper these days, how about doubling it to 120?
That's the value I use locally, and it has saved my neck many times.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Tue, 12 Oct 2021 06:56:02 GMT) Full text and rfc822 format available.

Message #8 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51138 <at> debbugs.gnu.org
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Tue, 12 Oct 2021 09:46:57 +0300
> The value of kill-ring-max was last increased in 1998, when it was
> doubled from 30 to 60.  See commit bffa4d92e152.
>
> Given that RAM is cheaper these days, how about doubling it to 120?
> That's the value I use locally, and it has saved my neck many times.

A long time ago I customized kill-ring-max to 1024,
and the only problem with such a big value is that
it produces too long submenu in "Paste from Kill Menu".
This is because menu-bar-update-yank-menu
truncates to the length of kill-ring-max,
but it should introduce a new variable
separately customized for the paste menu's size.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Tue, 12 Oct 2021 12:59:01 GMT) Full text and rfc822 format available.

Message #11 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51138 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Tue, 12 Oct 2021 14:57:58 +0200
Juri Linkov <juri <at> linkov.net> writes:

>> The value of kill-ring-max was last increased in 1998, when it was
>> doubled from 30 to 60.  See commit bffa4d92e152.
>>
>> Given that RAM is cheaper these days, how about doubling it to 120?

Sounds like a good idea to me.  (Or bigger.)

> A long time ago I customized kill-ring-max to 1024,
> and the only problem with such a big value is that
> it produces too long submenu in "Paste from Kill Menu".
> This is because menu-bar-update-yank-menu
> truncates to the length of kill-ring-max,
> but it should introduce a new variable
> separately customized for the paste menu's size.

Yup.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Tue, 12 Oct 2021 13:24:02 GMT) Full text and rfc822 format available.

Message #14 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Juri Linkov <juri <at> linkov.net>
Cc: 51138 <at> debbugs.gnu.org
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Tue, 12 Oct 2021 06:23:14 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Sounds like a good idea to me.  (Or bigger.)

Even better.

256 is nice because powers of 2 makes us look like we know what we're
doing.  ;-)

More seriously, 200 or 250 could be a good value.  I don't exactly have
a strong opinion.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Tue, 12 Oct 2021 13:28:02 GMT) Full text and rfc822 format available.

Message #17 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51138 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Tue, 12 Oct 2021 15:26:48 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> More seriously, 200 or 250 could be a good value.  I don't exactly have
> a strong opinion.

Me neither.  There may be repercussions for packages like undo-tree and
the like (that display undo stuff), so perhaps just doubling it in Emacs
29 is the right thing, and then we'll see whether there's any fallout.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Tue, 12 Oct 2021 23:23:02 GMT) Full text and rfc822 format available.

Message #20 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51138 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Tue, 12 Oct 2021 16:21:59 -0700
[Message part 1 (text/plain, inline)]
tags 51138 + patch
thanks

Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Me neither.  There may be repercussions for packages like undo-tree and
> the like (that display undo stuff), so perhaps just doubling it in Emacs
> 29 is the right thing, and then we'll see whether there's any fallout.

Makes sense.  How does the attached patch look?

It should also fix the issue indicated by Juri by adding a new user
option for the number of entries in the "Paste from Kill Ring" menu.
I set it to 60 by default, as that was the previous max number of
entries, and it feels like it should have the least amount of impact to
just change nothing, but I'm open to alternative suggestions.
[0001-Double-the-default-value-of-kill-ring-max.patch (text/x-diff, attachment)]

Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Tue, 12 Oct 2021 23:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Wed, 13 Oct 2021 11:37:02 GMT) Full text and rfc822 format available.

Message #25 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51138 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Wed, 13 Oct 2021 13:36:00 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> It should also fix the issue indicated by Juri by adding a new user
> option for the number of entries in the "Paste from Kill Ring" menu.
> I set it to 60 by default, as that was the previous max number of
> entries, and it feels like it should have the least amount of impact to
> just change nothing, but I'm open to alternative suggestions.

Looks good to me.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Wed, 13 Oct 2021 17:48:01 GMT) Full text and rfc822 format available.

Message #28 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51138 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Wed, 13 Oct 2021 20:45:29 +0300
> It should also fix the issue indicated by Juri by adding a new user
> option for the number of entries in the "Paste from Kill Ring" menu.
> I set it to 60 by default, as that was the previous max number of
> entries, and it feels like it should have the least amount of impact to
> just change nothing, but I'm open to alternative suggestions.

Thanks.  It makes sense to reduce the default value of yank-menu-max-items
because long menus are hard to navigate, but OTOH indeed maybe better
to leave it at the previous max number.

>  (defcustom yank-menu-length 20
> -  "Maximum length to display in the `yank-menu'."
> +  "Maximum length of entries in the `yank-menu'."

The previous docstring was unclear, but the new docstring
doesn't make it clearer.  I don't have a concrete suggestion,
but it needs to say that this length truncates the text
of each menu item.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Wed, 13 Oct 2021 18:25:01 GMT) Full text and rfc822 format available.

Message #31 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51138 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Wed, 13 Oct 2021 21:22:36 +0300
>> It should also fix the issue indicated by Juri by adding a new user
>> option for the number of entries in the "Paste from Kill Ring" menu.
>> I set it to 60 by default, as that was the previous max number of
>> entries, and it feels like it should have the least amount of impact to
>> just change nothing, but I'm open to alternative suggestions.
>
> Thanks.  It makes sense to reduce the default value of yank-menu-max-items
> because long menus are hard to navigate, but OTOH indeed maybe better
> to leave it at the previous max number.

There is one reason for reducing the default number because a large number
of menu items slows down menu display.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Wed, 13 Oct 2021 18:28:01 GMT) Full text and rfc822 format available.

Message #34 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51138 <at> debbugs.gnu.org, larsi <at> gnus.org, stefan <at> marxist.se
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Wed, 13 Oct 2021 21:27:43 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Date: Wed, 13 Oct 2021 20:45:29 +0300
> Cc: 51138 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
> 
> >  (defcustom yank-menu-length 20
> > -  "Maximum length to display in the `yank-menu'."
> > +  "Maximum length of entries in the `yank-menu'."
> 
> The previous docstring was unclear, but the new docstring
> doesn't make it clearer.  I don't have a concrete suggestion,
> but it needs to say that this length truncates the text
> of each menu item.

How about "Maximum number of items to show in the `yank-menu'."?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Wed, 13 Oct 2021 18:32:01 GMT) Full text and rfc822 format available.

Message #37 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51138 <at> debbugs.gnu.org, larsi <at> gnus.org, stefan <at> marxist.se
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Wed, 13 Oct 2021 21:30:23 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Date: Wed, 13 Oct 2021 20:45:29 +0300
> Cc: 51138 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
> 
> >  (defcustom yank-menu-length 20
> > -  "Maximum length to display in the `yank-menu'."
> > +  "Maximum length of entries in the `yank-menu'."
> 
> The previous docstring was unclear, but the new docstring
> doesn't make it clearer.  I don't have a concrete suggestion,
> but it needs to say that this length truncates the text
> of each menu item.

How about "Items in `yank-menu' longer than this will be truncated."?

(Please disregard my previous message, I was confused.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Wed, 13 Oct 2021 18:34:01 GMT) Full text and rfc822 format available.

Message #40 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51138 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Wed, 13 Oct 2021 11:33:26 -0700
Juri Linkov <juri <at> linkov.net> writes:

> Thanks.  It makes sense to reduce the default value of yank-menu-max-items
> because long menus are hard to navigate, but OTOH indeed maybe better
> to leave it at the previous max number.

Right, I guess having a ridiculously large number like 60 can't hurt, as
you anyways will start out at the top of the menu.

OTOH, I'd be fine with reducing it to 40 to restore some sanity here.
I mean, we also now provide a user-option for this.

>>  (defcustom yank-menu-length 20
>> -  "Maximum length to display in the `yank-menu'."
>> +  "Maximum length of entries in the `yank-menu'."
>
> The previous docstring was unclear, but the new docstring
> doesn't make it clearer.  I don't have a concrete suggestion,
> but it needs to say that this length truncates the text
> of each menu item.

How about:

"Maximum length to which entries in the 'yank-menu' will be truncated."

?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Wed, 13 Oct 2021 18:40:02 GMT) Full text and rfc822 format available.

Message #43 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 51138 <at> debbugs.gnu.org, larsi <at> gnus.org, stefan <at> marxist.se
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Wed, 13 Oct 2021 21:38:15 +0300
>> >  (defcustom yank-menu-length 20
>> > -  "Maximum length to display in the `yank-menu'."
>> > +  "Maximum length of entries in the `yank-menu'."
>>
>> The previous docstring was unclear, but the new docstring
>> doesn't make it clearer.  I don't have a concrete suggestion,
>> but it needs to say that this length truncates the text
>> of each menu item.
>
> How about "Items in `yank-menu' longer than this will be truncated."?

"Maximum length to which entries in the 'yank-menu' will be truncated."
suggested by Stefan and your suggestion will make the docstring much clearer.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Wed, 13 Oct 2021 22:29:01 GMT) Full text and rfc822 format available.

Message #46 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Juri Linkov <juri <at> linkov.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 51138 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Wed, 13 Oct 2021 15:28:25 -0700
Juri Linkov <juri <at> linkov.net> writes:

>> How about "Items in `yank-menu' longer than this will be truncated."?
>
> "Maximum length to which entries in the 'yank-menu' will be truncated."
> suggested by Stefan and your suggestion will make the docstring much clearer.

Thanks, I went with Eli's suggestion as I think the wording was slightly
more direct and easy to understand.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Wed, 13 Oct 2021 22:29:02 GMT) Full text and rfc822 format available.

Message #49 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51138 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Wed, 13 Oct 2021 15:28:47 -0700
close 51138 29.1
thanks

Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Looks good to me.

Pushed to master with docstring fixes suggested by Juri and Eli.
See commit 97c4f84cbc.

Thanks for reviewing.




bug marked as fixed in version 29.1, send any further explanations to 51138 <at> debbugs.gnu.org and Stefan Kangas <stefan <at> marxist.se> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Wed, 13 Oct 2021 22:29:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Thu, 14 Oct 2021 16:18:02 GMT) Full text and rfc822 format available.

Message #54 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51138 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, larsi <at> gnus.org
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Thu, 14 Oct 2021 19:10:19 +0300
>>> How about "Items in `yank-menu' longer than this will be truncated."?
>>
>> "Maximum length to which entries in the 'yank-menu' will be truncated."
>> suggested by Stefan and your suggestion will make the docstring much clearer.
>
> Thanks, I went with Eli's suggestion as I think the wording was slightly
> more direct and easy to understand.

I tried to reread the docstring again, but it seems it's still not 100% clear
that it applies to the string titles of menu items, not to the list of items.
Maybe this would be better:

  "Text of items in `yank-menu' longer than this will be truncated."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Thu, 14 Oct 2021 18:52:01 GMT) Full text and rfc822 format available.

Message #57 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51138 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, larsi <at> gnus.org
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Thu, 14 Oct 2021 11:51:19 -0700
Juri Linkov <juri <at> linkov.net> writes:

>   "Text of items in `yank-menu' longer than this will be truncated."

LGTM, please install.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51138; Package emacs. (Fri, 15 Oct 2021 07:03:01 GMT) Full text and rfc822 format available.

Message #60 received at 51138 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51138 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, larsi <at> gnus.org
Subject: Re: bug#51138: Increase the value of kill-ring-max
Date: Fri, 15 Oct 2021 09:59:14 +0300
>>   "Text of items in `yank-menu' longer than this will be truncated."
>
> LGTM, please install.

Pushed to emacs-28.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Nov 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.