GNU bug report logs - #72532
[PATCH] ; lisp/progmodes/which-func.el (which-function-mode): check buffer

Previous Next

Package: emacs;

Reported by: Raffael Stocker <r.stocker <at> mnet-mail.de>

Date: Thu, 8 Aug 2024 19:50:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72532 in the body.
You can then email your comments to 72532 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#72532; Package emacs. (Thu, 08 Aug 2024 19:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raffael Stocker <r.stocker <at> mnet-mail.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 08 Aug 2024 19:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Raffael Stocker <r.stocker <at> mnet-mail.de>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] ; lisp/progmodes/which-func.el (which-function-mode): check
 buffer
Date: Thu, 08 Aug 2024 21:48:45 +0200
[Message part 1 (text/plain, inline)]
Tags: patch

Hi Emacs,

I have been getting "Selecting deleted buffer" errors recently when
opening files.  This is due to ‘which-function-mode’ (in my
prog-mode-hook) walking through (buffer-list) without checking for live
buffers.

I have not been able to reproduce with ‘emacs -Q’, but it seems to be
connected to eglot, as I see the problem only with eglot enabled.

Nevertheless, I would like to suggest the attached patch, if only to
make which-function-mode more robust.

Regards,
Raffael


In GNU Emacs 30.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.43, cairo version 1.18.0) of 2024-08-06 built on Whiteflame
Repository revision: fb642d9cf546f52a11cdfef479447ce2e8fa3ec8
Repository branch: emacs-30
Windowing system distributor 'The X.Org Foundation', version 11.0.12101013
System Description: Arch Linux

Configured using:
 'configure --prefix=/opt/emacs --with-native-compilation=aot'

[0001-lisp-progmodes-which-func.el-which-function-mode-che.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72532; Package emacs. (Fri, 09 Aug 2024 05:28:02 GMT) Full text and rfc822 format available.

Message #8 received at 72532 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Raffael Stocker <r.stocker <at> mnet-mail.de>
Cc: 72532 <at> debbugs.gnu.org
Subject: Re: bug#72532: [PATCH] ;
 lisp/progmodes/which-func.el (which-function-mode): check buffer
Date: Fri, 09 Aug 2024 08:27:06 +0300
> From: Raffael Stocker <r.stocker <at> mnet-mail.de>
> Date: Thu, 08 Aug 2024 21:48:45 +0200
> 
> I have been getting "Selecting deleted buffer" errors recently when
> opening files.  This is due to ‘which-function-mode’ (in my
> prog-mode-hook) walking through (buffer-list) without checking for live
> buffers.
> 
> I have not been able to reproduce with ‘emacs -Q’, but it seems to be
> connected to eglot, as I see the problem only with eglot enabled.
> 
> Nevertheless, I would like to suggest the attached patch, if only to
> make which-function-mode more robust.

Thanks, but please show a couple of Lisp backtraces you get for this
error.  We'd like to be sure we are fixing the problem you report, not
some other problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72532; Package emacs. (Fri, 09 Aug 2024 09:48:01 GMT) Full text and rfc822 format available.

Message #11 received at 72532 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Raffael Stocker <r.stocker <at> mnet-mail.de>, 72532 <at> debbugs.gnu.org
Subject: Re: bug#72532: [PATCH] ; lisp/progmodes/which-func.el
 (which-function-mode): check buffer
Date: Fri, 9 Aug 2024 09:45:25 +0000
Raffael Stocker <r.stocker <at> mnet-mail.de> writes:

> From cd8b170f2c716cf67623c4ffc4ae38dc63c49496 Mon Sep 17 00:00:00 2001
> From: Raffael Stocker <r.stocker <at> mnet-mail.de>
> Date: Thu, 8 Aug 2024 21:38:14 +0200
> Subject: [PATCH] ; lisp/progmodes/which-func.el (which-function-mode): check
>  buffer
>
> Ensure we are not selecting a deleted buffer.
> ---
>  lisp/progmodes/which-func.el | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
> index 28aacd335ba..5326be5e877 100644
> --- a/lisp/progmodes/which-func.el
> +++ b/lisp/progmodes/which-func.el
> @@ -309,9 +309,10 @@ which-function-mode
>      (setq which-func-update-timer
>            (run-with-idle-timer which-func-update-delay t #'which-func-update)))
>    (dolist (buf (buffer-list))
> -    (with-current-buffer buf
> -      (which-func--header-line-remove)
> -      (which-func-ff-hook))))
> +    (when (buffer-live-p buf)
> +      (with-current-buffer buf
> +        (which-func--header-line-remove)
> +        (which-func-ff-hook)))))

`buffer-list' is documented to return a list of all live buffers, so it
would be good to understand why buffers are getting killed in this loop.

In other words, are we sure that your patch is not just covering up some
problem elsewhere?

>
>  (defvar which-function-imenu-failed nil
>    "Locally t in a buffer if `imenu--make-index-alist' found nothing there.")
> --
> 2.46.0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72532; Package emacs. (Fri, 09 Aug 2024 17:36:02 GMT) Full text and rfc822 format available.

Message #14 received at 72532 <at> debbugs.gnu.org (full text, mbox):

From: Raffael Stocker <r.stocker <at> mnet-mail.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72532 <at> debbugs.gnu.org
Subject: Re: bug#72532: [PATCH] ; lisp/progmodes/which-func.el
 (which-function-mode): check buffer
Date: Fri, 09 Aug 2024 19:35:08 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Thanks, but please show a couple of Lisp backtraces you get for this
> error.  We'd like to be sure we are fixing the problem you report, not
> some other problem.

See [1] and [2] below.


[1]:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "Selecting deleted buffer")
  which-function-mode()
    debugger-may-continue = t
    inhibit-redisplay = nil
    inhibit-debugger = t
    inhibit-changing-match-data = nil
  run-hooks(change-major-mode-after-body-hook prog-mode-hook c-ts-base-mode-hook c-ts-mode-hook)
  apply(run-hooks change-major-mode-after-body-hook (prog-mode-hook c-ts-base-mode-hook c-ts-mode-hook))
  run-mode-hooks(c-ts-mode-hook)
  c-ts-mode()
  set-auto-mode-0(c-mode nil)
  set-auto-mode--apply-alist((("\\.[pP][dD][fF]\\'" . #f(compiled-function () #<bytecode 0x51b1ee9548b3>))
                              ("\\.epub\\'" . nov-mode) ("\\.mac\\'" . maxima-mode)
                              ("\\.ledger$" . ledger-mode)
                              ("\\.\\(plantuml\\|pum\\|plu\\|puml\\)\\'" . plantuml-mode)
                              ("\\.mo\\'" . modelica-mode) ("\\.asy$" . asy-mode)
                              ("\\.hva\\'" . LaTeX-mode) ("\\.tsv\\'" . tsv-mode)
                              ("\\.[Cc][Ss][Vv]\\'" . csv-mode) ("\\.djvu\\'" . djvu-init-mode)
                              ("\\.rkt\\'" . scheme-mode) ("/git/ignore\\'" . gitignore-mode)
                              ("/info/exclude\\'" . gitignore-mode) ("/\\.gitignore\\'" . gitignore-mode)
                              ("/etc/gitconfig\\'" . gitconfig-mode)
                              ("/\\.gitmodules\\'" . gitconfig-mode) ("/git/config\\'" . gitconfig-mode)
                              ("/modules/.*/config\\'" . gitconfig-mode)
                              ("/\\.git/config\\'" . gitconfig-mode) ("/\\.gitconfig\\'" . gitconfig-mode)
                              ("/git/attributes\\'" . gitattributes-mode)
                              ("/info/attributes\\'" . gitattributes-mode)
                              ("/\\.gitattributes\\'" . gitattributes-mode)
                              ("\\.gv\\'" . graphviz-dot-mode) ("\\.dot\\'" . graphviz-dot-mode)
                              ("\\.pro\\'" . idlwave-mode) ("\\.hex\\'" . intel-hex-mode)
                              ("\\.jl\\'" . julia-mode) ("\\.ledger\\'" . ledger-mode)
                              ("/git-rebase-todo\\'" . git-rebase-mode) ("\\.mms" . mmix-mode)
                              ("\\.mmo" . mmix-mmo-mode)
                              ("\\.\\(?:php[s345]?\\|phtml\\)\\'" . php-mode-maybe)
                              ("\\.\\(?:php\\.inc\\|stub\\)\\'" . php-mode)
                              ("/\\.php_cs\\(?:\\.dist\\)?\\'" . php-mode)
                              ("\\.\\(plantuml\\|pum\\|plu\\)\\'" . plantuml-mode)
                              ("\\.ps[dm]?1\\'" . powershell-mode) ("\\.rs\\'" . rustic-mode)
                              ("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode)
                              ("\\.rs\\'" . rust-mode) ("\\.grm\\'" . sml-yacc-mode)
                              ("\\.cm\\'" . sml-cm-mode) ("\\.s\\(ml\\|ig\\)\\'" . sml-mode)
                              ("/systemd/[^z-a]+?\\.d/[^/]+?\\.conf\\'" . systemd-mode)
                              ("\\.#\\(?:[.0-9@-Z\\_a-z-]+?\\.\\(?:automount\\|busname\\|link\\|mount\\|net\\(?:dev\\|work\\)\\|s\\(?:ervice\\|lice\\|ocket\\|wap\\)\\|t\\(?:arget\\|imer\\)\\)\\|override\\.conf\\)[[:xdigit:]]\\{16\\}\\'"
                               . systemd-mode)
                              ("[.0-9@-Z\\_a-z-]+?\\.\\(?:automount\\|busname\\|link\\|mount\\|net\\(?:dev\\|work\\)\\|s\\(?:ervice\\|lice\\|ocket\\|wap\\)\\|t\\(?:arget\\|imer\\)\\)\\'"
                               . systemd-mode)
                              ("\\.nspawn\\'" . systemd-mode) ("\\.\\(e?ya?\\|ra\\)ml\\'" . yaml-mode)
                              ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ...)
                             nil nil)
  #<subr set-auto-mode>()
  so-long--set-auto-mode(#<subr set-auto-mode>)
    so-long--set-auto-mode = t
  apply(so-long--set-auto-mode #<subr set-auto-mode> nil)
  set-auto-mode()
  normal-mode(t)
    enable-local-variables = t
  after-find-file(nil t)
  find-file-noselect-1(#<buffer android.c> "~/build/emacs/src/android.c" nil nil
                                "~/build/emacs/src/android.c" (1320625 65027))
  find-file-noselect("/home/rst/build/emacs/src/android.c" nil nil nil)
  find-file("/home/rst/build/emacs/src/android.c")
  counsel-find-file-action("/home/rst/build/emacs/src/android.c")
  ivy-call()
  ivy-read("Find file: " read-file-name-internal :matcher counsel--find-file-matcher
           :initial-input nil :action counsel-find-file-action :preselect nil
           :require-match confirm-after-completion :history file-name-history :keymap
           (keymap (remap keymap (undo . counsel-find-file-undo))
                   (67108960 lambda (&optional arg) "nil (`nil')" (interactive "p")
                             (if (string= "" ivy-text) (execute-kbd-macro (kbd "M-o b"))
                               (self-insert-command arg)))
                   (96 . counsel-file-jump-from-find)
                   (C-backspace . counsel-up-directory)
                   (67108991 . counsel-up-directory))
           :caller counsel-find-file)
    ivy-recursive-last = nil
    ivy--display-function = nil
  counsel--find-file-1("Find file: " nil counsel-find-file-action counsel-find-file)
    default-directory = "/home/rst/build/emacs/src/"
  counsel-find-file()
    default-directory = "/home/rst/build/emacs/src/"
    tramp-archive-enabled = nil
  funcall-interactively(counsel-find-file)
  command-execute(counsel-find-file)
    current-minibuffer-command = counsel-find-file
--8<---------------cut here---------------end--------------->8---


[2]:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "Selecting deleted buffer")
  set-buffer(#<killed buffer>)
  (save-current-buffer
    (set-buffer buf) (which-func--header-line-remove) (which-func-ff-hook))
  (let ((buf (car tail)))
    (save-current-buffer
      (set-buffer buf) (which-func--header-line-remove) (which-func-ff-hook))
    (setq tail (cdr tail)))
  (while tail
    (let ((buf (car tail)))
      (save-current-buffer
        (set-buffer buf) (which-func--header-line-remove) (which-func-ff-hook))
      (setq tail (cdr tail))))
  (let ((tail (buffer-list)))
    (while tail
      (let ((buf (car tail)))
        (save-current-buffer
          (set-buffer buf) (which-func--header-line-remove) (which-func-ff-hook))
        (setq tail (cdr tail)))))
  (let ((last-message (current-message)))
    (progn
      (set-default 'which-function-mode
                   (cond
                    ((eq arg 'toggle) (not (default-value 'which-function-mode)))
                    ((and (numberp arg) (< arg 1)) nil) (t t))))
    (if (boundp 'global-minor-modes)
        (progn
          (setq global-minor-modes
                (delq 'which-function-mode global-minor-modes))
          (if (default-value 'which-function-mode)
              (progn
                (setq global-minor-modes
                      (cons 'which-function-mode global-minor-modes))))))
    (if (timerp which-func-update-timer)
        (progn (cancel-timer which-func-update-timer)))
    (setq which-func-update-timer nil)
    (if which-function-mode
        (progn
          (setq which-func-update-timer
                (run-with-idle-timer which-func-update-delay t
                                     #'which-func-update))))
    (let ((tail (buffer-list)))
      (while tail
        (let ((buf (car tail)))
          (save-current-buffer
            (set-buffer buf) (which-func--header-line-remove)
            (which-func-ff-hook))
          (setq tail (cdr tail)))))
    (run-hooks 'which-function-mode-hook
               (if (default-value 'which-function-mode)
                   'which-function-mode-on-hook
                 'which-function-mode-off-hook))
    (if (called-interactively-p 'any)
        (progn
          (customize-mark-as-set 'which-function-mode)
          (if
              (and (current-message)
                   (not (equal last-message (current-message))))
              nil
            (let ((local ""))
              (message "%s %sabled%s" "Which-Function mode"
                       (if (default-value ...) "en" "dis") local))))))
  which-function-mode()
    arg = nil
  run-hooks(change-major-mode-after-body-hook prog-mode-hook c-ts-base-mode-hook c-ts-mode-hook)
  apply(run-hooks change-major-mode-after-body-hook (prog-mode-hook c-ts-base-mode-hook c-ts-mode-hook))
  run-mode-hooks(c-ts-mode-hook)
  c-ts-mode()
  set-auto-mode-0(c-mode nil)
  set-auto-mode--apply-alist((("\\.[pP][dD][fF]\\'" . #f(compiled-function () #<bytecode 0x51b1ee9548b3>))
                              ("\\.epub\\'" . nov-mode) ("\\.mac\\'" . maxima-mode)
                              ("\\.ledger$" . ledger-mode)
                              ("\\.\\(plantuml\\|pum\\|plu\\|puml\\)\\'" . plantuml-mode)
                              ("\\.mo\\'" . modelica-mode) ("\\.asy$" . asy-mode)
                              ("\\.hva\\'" . LaTeX-mode) ("\\.tsv\\'" . tsv-mode)
                              ("\\.[Cc][Ss][Vv]\\'" . csv-mode) ("\\.djvu\\'" . djvu-init-mode)
                              ("\\.rkt\\'" . scheme-mode) ("/git/ignore\\'" . gitignore-mode)
                              ("/info/exclude\\'" . gitignore-mode) ("/\\.gitignore\\'" . gitignore-mode)
                              ("/etc/gitconfig\\'" . gitconfig-mode)
                              ("/\\.gitmodules\\'" . gitconfig-mode) ("/git/config\\'" . gitconfig-mode)
                              ("/modules/.*/config\\'" . gitconfig-mode)
                              ("/\\.git/config\\'" . gitconfig-mode) ("/\\.gitconfig\\'" . gitconfig-mode)
                              ("/git/attributes\\'" . gitattributes-mode)
                              ("/info/attributes\\'" . gitattributes-mode)
                              ("/\\.gitattributes\\'" . gitattributes-mode)
                              ("\\.gv\\'" . graphviz-dot-mode) ("\\.dot\\'" . graphviz-dot-mode)
                              ("\\.pro\\'" . idlwave-mode) ("\\.hex\\'" . intel-hex-mode)
                              ("\\.jl\\'" . julia-mode) ("\\.ledger\\'" . ledger-mode)
                              ("/git-rebase-todo\\'" . git-rebase-mode) ("\\.mms" . mmix-mode)
                              ("\\.mmo" . mmix-mmo-mode)
                              ("\\.\\(?:php[s345]?\\|phtml\\)\\'" . php-mode-maybe)
                              ("\\.\\(?:php\\.inc\\|stub\\)\\'" . php-mode)
                              ("/\\.php_cs\\(?:\\.dist\\)?\\'" . php-mode)
                              ("\\.\\(plantuml\\|pum\\|plu\\)\\'" . plantuml-mode)
                              ("\\.ps[dm]?1\\'" . powershell-mode) ("\\.rs\\'" . rustic-mode)
                              ("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode)
                              ("\\.rs\\'" . rust-mode) ("\\.grm\\'" . sml-yacc-mode)
                              ("\\.cm\\'" . sml-cm-mode) ("\\.s\\(ml\\|ig\\)\\'" . sml-mode)
                              ("/systemd/[^z-a]+?\\.d/[^/]+?\\.conf\\'" . systemd-mode)
                              ("\\.#\\(?:[.0-9@-Z\\_a-z-]+?\\.\\(?:automount\\|busname\\|link\\|mount\\|net\\(?:dev\\|work\\)\\|s\\(?:ervice\\|lice\\|ocket\\|wap\\)\\|t\\(?:arget\\|imer\\)\\)\\|override\\.conf\\)[[:xdigit:]]\\{16\\}\\'"
                               . systemd-mode)
                              ("[.0-9@-Z\\_a-z-]+?\\.\\(?:automount\\|busname\\|link\\|mount\\|net\\(?:dev\\|work\\)\\|s\\(?:ervice\\|lice\\|ocket\\|wap\\)\\|t\\(?:arget\\|imer\\)\\)\\'"
                               . systemd-mode)
                              ("\\.nspawn\\'" . systemd-mode) ("\\.\\(e?ya?\\|ra\\)ml\\'" . yaml-mode)
                              ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ...)
                             nil nil)
  #<subr set-auto-mode>()
  so-long--set-auto-mode(#<subr set-auto-mode>)
    so-long--set-auto-mode = t
  apply(so-long--set-auto-mode #<subr set-auto-mode> nil)
  set-auto-mode()
  normal-mode(t)
    enable-local-variables = t
  after-find-file(nil nil t nil nil)
  revert-buffer--default(t nil)
    inhibit-read-only = t
  revert-buffer(t)
    revert-buffer-preserve-modes = nil
    revert-buffer-in-progress-p = t
  funcall-interactively(revert-buffer t)
  command-execute(revert-buffer)
    current-minibuffer-command = revert-buffer
--8<---------------cut here---------------end--------------->8---





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72532; Package emacs. (Fri, 09 Aug 2024 17:40:01 GMT) Full text and rfc822 format available.

Message #17 received at 72532 <at> debbugs.gnu.org (full text, mbox):

From: Raffael Stocker <r.stocker <at> mnet-mail.de>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 72532 <at> debbugs.gnu.org
Subject: Re: bug#72532: [PATCH] ; lisp/progmodes/which-func.el
 (which-function-mode): check buffer
Date: Fri, 09 Aug 2024 19:39:01 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

> `buffer-list' is documented to return a list of all live buffers, so it
> would be good to understand why buffers are getting killed in this loop.
>
> In other words, are we sure that your patch is not just covering up some
> problem elsewhere?

I guess it is.  I just did some trying out and found that I can reliably
make the problem appear and disappear by enabling/disabling eglot.

I will spend some more time with this and see what more I can find out.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72532; Package emacs. (Fri, 09 Aug 2024 20:01:02 GMT) Full text and rfc822 format available.

Message #20 received at 72532 <at> debbugs.gnu.org (full text, mbox):

From: Raffael Stocker <r.stocker <at> mnet-mail.de>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 72532 <at> debbugs.gnu.org
Subject: Re: bug#72532: [PATCH] ; lisp/progmodes/which-func.el
 (which-function-mode): check buffer
Date: Fri, 09 Aug 2024 21:59:46 +0200
Raffael Stocker <r.stocker <at> mnet-mail.de> writes:

> Stefan Kangas <stefankangas <at> gmail.com> writes:
>
>> `buffer-list' is documented to return a list of all live buffers, so it
>> would be good to understand why buffers are getting killed in this loop.
>>
>> In other words, are we sure that your patch is not just covering up some
>> problem elsewhere?
>
> I guess it is.  I just did some trying out and found that I can reliably
> make the problem appear and disappear by enabling/disabling eglot.
>
> I will spend some more time with this and see what more I can find out.

It seems the problem comes from me putting ‘which-function-mode’ into
‘prog-mode-hook’, which I probably shouldn't have done.  Each time I
load a file in some prog-mode while eglot is active managing at least
one buffer, which-function-mode seems to get re-enabled and cause my
problems.  If I just globally enable it (as I probably should do), this
doesn't happen.

In short, seems to be a pilot error.
Why I still can't reproduce it with ‘emacs -Q’, I do not know.
Still, not worth a patch it seems, sorry for the noise.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 15 Aug 2024 08:37:01 GMT) Full text and rfc822 format available.

Notification sent to Raffael Stocker <r.stocker <at> mnet-mail.de>:
bug acknowledged by developer. (Thu, 15 Aug 2024 08:37:02 GMT) Full text and rfc822 format available.

Message #25 received at 72532-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Raffael Stocker <r.stocker <at> mnet-mail.de>
Cc: 72532-done <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: Re: bug#72532: [PATCH] ;
 lisp/progmodes/which-func.el (which-function-mode): check buffer
Date: Thu, 15 Aug 2024 11:36:02 +0300
> Cc: 72532 <at> debbugs.gnu.org
> From: Raffael Stocker <r.stocker <at> mnet-mail.de>
> Date: Fri, 09 Aug 2024 21:59:46 +0200
> 
> Raffael Stocker <r.stocker <at> mnet-mail.de> writes:
> 
> > Stefan Kangas <stefankangas <at> gmail.com> writes:
> >
> >> `buffer-list' is documented to return a list of all live buffers, so it
> >> would be good to understand why buffers are getting killed in this loop.
> >>
> >> In other words, are we sure that your patch is not just covering up some
> >> problem elsewhere?
> >
> > I guess it is.  I just did some trying out and found that I can reliably
> > make the problem appear and disappear by enabling/disabling eglot.
> >
> > I will spend some more time with this and see what more I can find out.
> 
> It seems the problem comes from me putting ‘which-function-mode’ into
> ‘prog-mode-hook’, which I probably shouldn't have done.  Each time I
> load a file in some prog-mode while eglot is active managing at least
> one buffer, which-function-mode seems to get re-enabled and cause my
> problems.  If I just globally enable it (as I probably should do), this
> doesn't happen.
> 
> In short, seems to be a pilot error.
> Why I still can't reproduce it with ‘emacs -Q’, I do not know.
> Still, not worth a patch it seems, sorry for the noise.

Thanks, I'm therefore closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 12 Sep 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 338 days ago.

Previous Next


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