GNU bug report logs - #71370
30.0.50; Please un-obsolete buffer-substring as a generalized variable

Previous Next

Package: emacs;

Reported by: Adam Porter <adam <at> alphapapa.net>

Date: Wed, 5 Jun 2024 01:34:02 UTC

Severity: wishlist

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Andrea Corallo <acorallo <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, Adam Porter <adam <at> alphapapa.net>, 71370 <at> debbugs.gnu.org
Subject: bug#71370: 30.0.50; Please un-obsolete buffer-substring as a generalized variable
Date: Fri, 21 Jun 2024 04:55:06 -0400
Ihor Radchenko <yantar92 <at> posteo.net> writes:

> Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
> of text editors" <bug-gnu-emacs <at> gnu.org> writes:
>
>> Any arguments why this gv is different from the others that had been
>> deprecated?
>
> It is one of the commonly used gvs.
> https://github.com/search?q=%22%28setf+%28buffer-substring%22&type=code
> gives 500+ hits (and it is not all forks of one or two popular packages)

Interesting, I took the time to apply your methodology to all GV
obsoleted by the same commit and this is the result:

| GV                           | file occurrences |
|                              |        in github |
|------------------------------+------------------|
| buffer-file-name             |                5 |
| buffer-modified-p            |                7 |
| buffer-name                  |               48 |
| buffer-string                |              142 |
| buffer-substring             |              512 |
| current-buffer               |              234 |
| current-column               |                3 |
| current-global-map           |                0 |
| current-input-mode           |                0 |
| current-local-map            |                0 |
| current-window-configuration |                0 |
| default-file-modes           |                0 |
| current-window-configuration |                0 |
| default-file-modes           |                0 |
| documentation-property       |                8 |
| frame-height                 |               38 |
| frame-visible-p              |                0 |
| global-key-binding           |                3 |
| local-key-binding            |                0 |
| mark                         |                4 |
| mark-marker                  |                0 |
| marker-position              |               16 |
| mouse-position               |                7 |
| point                        |               32 |
| point-marker                 |                0 |
| point-max                    |                0 |
| point-min                    |               40 |
| read-mouse-position          |                0 |
| screen-height                |                4 |
| screen-width                 |               15 |
| selected-window              |                4 |
| selected-screen              |                0 |
| selected-frame               |                0 |
| standard-case-table          |                0 |
| syntax-table                 |                0 |
| visited-file-modtime         |                0 |
| window-height                |               13 |
| window-width                 |                9 |
| x-get-secondary-selection    |                0 |

While some of them are rarely/not used some others looks quite popular.
This is an indication that the popular ones are probably a good
abstraction or they are just convenient.

I don't know what would be the risk of un-obsoleting the popular ones
now, but if is not possible I think we should consider doing it for the
next release cycle.

  Andrea




This bug report was last modified 86 days ago.

Previous Next


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