GNU bug report logs - #71466
30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Mon, 10 Jun 2024 10:26:02 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 30.1

Done: Eshel Yaron <me <at> eshelyaron.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 71466 <at> debbugs.gnu.org, me <at> eshelyaron.com
Subject: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted
Date: Mon, 24 Jun 2024 09:27:52 +0300
>> So what is the decision?  Maybe better to keep xref-revert-buffer
>> as a wrapper around the new function xref--revert-buffer?
>
> That should work, though at the expense of duplicating some code.

I still don't understand how duplicating revert-buffer

+(defun xref-revert-buffer ()
+  "Refresh the search results in the current buffer."
+  (declare (obsolete revert-buffer "30.1"))
+  (interactive)
+  (let (restore-functions)
+    (when (boundp 'revert-buffer-restore-functions)
+      (run-hook-wrapped 'revert-buffer-restore-functions
+                        (lambda (f) (push (funcall f) restore-functions) nil)))
+    (prog1 (xref--revert-buffer)
+      (mapc #'funcall (delq nil restore-functions)))))

can be better than what Eshel proposed with an alias:

+ (define-obsolete-function-alias 'xref-revert-buffer #'revert-buffer "30.1")




This bug report was last modified 330 days ago.

Previous Next


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