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: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Nagy <danielnagy <at> posteo.de>, Stefan Kangas <stefankangas <at> gmail.com>
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, 02 Nov 2023 08:32:38 +0200
> From: Daniel Nagy <danielnagy <at> posteo.de>
> Date: Wed, 01 Nov 2023 16:31:01 +0000
> 
> The current signature of #'buffer-size is:
> 
>     (buffer-size &optional BUFFER)
> 
> It can only handle actual buffer objects as the argument. Could it be
> made to accept the buffer name as a string as well? So that it's
> signature would become:
> 
>     (buffer-size &optional BUFFER-OR-NAME)
> 
> Other functions, like #'get-buffer already do this.

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?




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.