From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: 64398@debbugs.gnu.org, stefankangas@gmail.com, angelo.borsotti@gmail.com
Subject: bug#64398: Buffer list
Date: Thu, 05 Oct 2023 11:10:21 +0300 [thread overview]
Message-ID: <83a5sx4hhu.fsf@gnu.org> (raw)
In-Reply-To: <87il7lcz6m.fsf@yahoo.com> (message from Po Lu on Thu, 05 Oct 2023 15:21:05 +0800)
> From: Po Lu <luangruo@yahoo.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, 64398@debbugs.gnu.org,
> angelo.borsotti@gmail.com
> Date: Thu, 05 Oct 2023 15:21:05 +0800
>
> Stefan Kangas <stefankangas@gmail.com> writes:
>
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> >>> It's tempting to just bump this to some similarly conservative value
> >>> like 15 or 12 on graphical displays, and be done with it.
> >>
> >> We could do that, but then 15 is the maximum value we could use, since
> >> it makes the menu take 24 lines, which is the largest value possible
> >> with 24-line TTY frames.
> >
> > How about something like the below?
> >
> > diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
> > index 5e837485db3..14d8d664d58 100644
> > --- a/lisp/menu-bar.el
> > +++ b/lisp/menu-bar.el
> > @@ -2314,14 +2314,16 @@ menu-bar-select-yank
> > \f
> > ;;; Buffers Menu
> >
> > -(defcustom buffers-menu-max-size 10
> > +(defcustom buffers-menu-max-size (if (display-graphic-p) 15 10)
> > "Maximum number of entries which may appear on the Buffers menu.
> > -If this is 10, then only the ten most-recently-selected buffers are shown.
> > -If this is nil, then all buffers are shown.
> > -A large number or nil slows down menu responsiveness."
> > - :type '(choice integer
> > - (const :tag "All" nil))
> > - :group 'menu)
> > +If this is a number, only that many most-recently-selected
> > +buffers are shown.
> > +If this is nil, all buffers are shown."
> > + :type '(choice natnump
> > + (const :tag "All" nil))
> > + :group 'menu
> > + :version "30.1")
> >
> > (defcustom buffers-menu-buffer-name-length 30
> > "Maximum length of the buffer name on the Buffers menu.
>
> This doesn't work because menu-bar.el is preloaded and additionally
> because Emacs supports creating both GUI and terminal frames in the same
> process, whereas a feature can only be loaded once, with the value of
> display-graphic-p subject to whatever frame is selected at the time it
> is loaded. Why not set it to 15 and call it a day?
It's possible, but then we will not be able to extend this in the
future anymore, as I explained above. But maybe we don't care.
If we do care, then we could have an additional option, or we could
make this option accept a cons cell, or something else.
next prev parent reply other threads:[~2023-10-05 8:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-01 10:31 bug#64398: Buffer list Angelo Borsotti
2023-07-01 10:44 ` Eli Zaretskii
2023-09-04 20:22 ` Stefan Kangas
2023-09-05 2:30 ` Eli Zaretskii
2023-09-05 21:46 ` Stefan Kangas
2023-09-06 11:25 ` Eli Zaretskii
2023-09-06 11:54 ` Stefan Kangas
2023-09-06 12:39 ` Eli Zaretskii
2023-09-30 23:09 ` Stefan Kangas
2023-10-05 7:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-05 8:10 ` Eli Zaretskii [this message]
2023-10-05 12:54 ` Stefan Kangas
2023-10-05 16:05 ` Eli Zaretskii
2023-10-05 18:19 ` Stefan Kangas
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a5sx4hhu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=64398@debbugs.gnu.org \
--cc=angelo.borsotti@gmail.com \
--cc=luangruo@yahoo.com \
--cc=stefankangas@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).