GNU bug report logs - #66890
29.1; buffer-size should also accept the buffer's name as string argument

Previous Next

Package: emacs;

Reported by: Daniel Nagy <danielnagy <at> posteo.de>

Date: Thu, 2 Nov 2023 05:54:02 UTC

Severity: wishlist

Tags: moreinfo

Found in version 29.1

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Daniel Nagy <danielnagy <at> posteo.de>
Cc: 66890 <at> 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
tags 66890 + moreinfo
thanks

Eli Zaretskii <eliz <at> 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".




This bug report was last modified 109 days ago.

Previous Next


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