unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>, Daniel Nagy <danielnagy@posteo.de>
Cc: 66890@debbugs.gnu.org
Subject: bug#66890: 29.1; buffer-size should also accept the buffer's name as string argument
Date: Thu, 2 Nov 2023 12:38:26 -0700	[thread overview]
Message-ID: <CADwFkmnbX6X9T-cz4q_NFot1dZaxpPUY-0WN0r6ZCpMXqUyvXg@mail.gmail.com> (raw)
In-Reply-To: <83edh88y2h.fsf@gnu.org>

tags 66890 + moreinfo
thanks

Eli Zaretskii <eliz@gnu.org> writes:

> It's very easy to get the buffer from its name.  You could do
>
>   (buffer-size (get-buffer BUFFER-OR-NAME))
>
> So I wonder whether it is worth our while to convert more functions to
> accept both buffers and names of buffers.
>
> Stefan, WDYT?

I'd lean towards not making the proposed change, as it stands.

Perhaps, for the sake of consistency, we should allow buffer names in
either none or all buffer-related functions.  But the only example given
so far is `get-buffer', and I don't really see how we could possibly
disallow using strings there.  Thus, it's not very convincing.

If anyone is interested in making a better case for this change, a
single example is not enough.  I'd suggest starting with a review of
what we have now, for example something like `M-x apropos-function RET
^buffer- RET'.

Without such a review, I don't really see that we have grounds for
making any changes here.  So I'm tagging this bug "moreinfo".





  reply	other threads:[~2023-11-02 19:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01 16:31 bug#66890: 29.1; buffer-size should also accept the buffer's name as string argument Daniel Nagy
2023-11-02  6:32 ` Eli Zaretskii
2023-11-02 19:38   ` Stefan Kangas [this message]
2023-11-02 20:55     ` Daniel Nagy
2023-11-03 13:38       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-04  0:21         ` Stefan Kangas
2023-11-04  6:03           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-04 10:43             ` Stefan Kangas
2023-11-04 20:57         ` Daniel Nagy
2023-11-04 22:12           ` Drew Adams
2023-11-05  5:35           ` Eli Zaretskii
2023-11-05 23:02           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]     ` <87bkcbzy6c.fsf@posteo.de>
2023-11-03  6:46       ` Eli Zaretskii

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=CADwFkmnbX6X9T-cz4q_NFot1dZaxpPUY-0WN0r6ZCpMXqUyvXg@mail.gmail.com \
    --to=stefankangas@gmail.com \
    --cc=66890@debbugs.gnu.org \
    --cc=danielnagy@posteo.de \
    --cc=eliz@gnu.org \
    /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).