GNU bug report logs - #33881
27.0.50; flymake-show-diagnostics-buffer throwing 'Selecting deleted buffer' error

Previous Next

Package: emacs;

Reported by: jvshahid <at> gmail.com

Date: Wed, 26 Dec 2018 21:43:01 UTC

Severity: normal

Found in version 27.0.50

Done: João Távora <joaotavora <at> gmail.com>

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 33881 in the body.
You can then email your comments to 33881 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#33881; Package emacs. (Wed, 26 Dec 2018 21:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jvshahid <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 26 Dec 2018 21:43:02 GMT) Full text and rfc822 format available.

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

From: jvshahid <at> gmail.com
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50;
 flymake-show-diagnostics-buffer throwing 'Selecting deleted buffer'
 error
Date: Wed, 26 Dec 2018 16:42:19 -0500
Using eglot and flymake, when I re-open the current file using the
following steps, `flymake-show-diagnostics-buffer` stop working and
throws `Selecting deleted buffer' error.  Steps to reproduce:

1. Open file
2. Visit the diagnostics buffer `M-x flymake-show-diagnostics-buffer'
3. Re-open the file using `find-alternate-file'
4. Invoking `flymake-show-diagnostics-buffer' throws an error


In GNU Emacs 27.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
 of 2018-12-26 built on amun
Repository revision: 1419cc4f9de54dad229648e9482716417cc3e3b5
Repository branch: save-excursion-tail-output
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Arch Linux

Recent messages:
flymake-show-diagnostics-buffer
tabulated-list-print: Selecting deleted buffer
Configured using:
 'configure --prefix=/home/jvshahid/bin/emacs-27'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM THREADS LIBSYSTEMD JSON LCMS2 GMP

Important settings:
  value of $LC_COLLATE: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Java//w

Minor modes in effect:
  global-magit-file-mode: t
  magit-file-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  yas-minor-mode: t
  subword-mode: t
  eglot--managed-mode: t
  flymake-mode: t
  show-paren-mode: t
  display-battery-mode: t
  flx-ido-mode: t
  global-company-mode: t
  company-mode: t
  winner-mode: t
  global-auto-revert-mode: t
  savehist-mode: t
  display-time-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
/home/jvshahid/.emacs.d/straight/build/jsonrpc/jsonrpc hides /home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/jsonrpc
/home/jvshahid/.emacs.d/straight/build/cl-lib/cl-lib hides /home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/emacs-lisp/cl-lib
/home/jvshahid/.emacs.d/straight/build/seq/seq hides /home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/emacs-lisp/seq
/home/jvshahid/.emacs.d/straight/build/cl-generic/cl-generic hides /home/jvshahid/bin/emacs-27/share/emacs/27.0.50/lisp/emacs-lisp/cl-generic

Features:
(magit-extras magit-submodule magit-obsolete magit-blame magit-stash
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-collab ghub-graphql treepy
graphql ghub url-http url-gw nsm url-auth url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf mailcap
let-alist magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode
magit-core magit-autorevert magit-process magit-margin magit-mode
git-commit recentf tree-widget magit-git magit-section magit-utils
magit-popup crm log-edit pcvs-util add-log with-editor async-bytecomp
dabbrev eieio-opt speedbar sb-image ezimage dframe completion dos-w32
find-cmd grep find-dired help-fns radix-tree misearch multi-isearch
shadow sort mail-extr emacsbug sendmail shell helm-command helm-elisp
helm-eval edebug helm-info helm-mode pulse windmove org-table org-rmail
org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range message rmc puny rfc822 mml
mml-sec epa derived epg mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr
wid-edit org-docview doc-view jka-compr image-mode org-bibtex bibtex
org-bbdb org-w3m org-element avl-tree org org-macro org-footnote
org-pcomplete pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu
calendar cal-loaddefs markdown-mode edit-indirect color noutline outline
time-date vc-git diff-mode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc
vc-dispatcher yasnippet-snippets yasnippet cap-words superword subword
eglot jsonrpc array ert pp ewoc debug backtrace flymake-proc flymake
warnings compile comint ansi-color url-util cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs thingatpt
helm-fzf s helm-files helm-buffers helm-tags helm-locate helm-grep
helm-regexp format-spec helm-utils helm-help helm-types helm easy-mmode
helm-source eieio-compat helm-multi-match helm-lib async dired-aux
parinfer-ext paredit parinfer ediff-merg ediff-wind ediff-diff
ediff-mult ediff-help ediff-init ediff-util ediff mode-local find-func
parinferlib dash elec-pair dired-x dired dired-loaddefs paren battery
cus-start cus-load flx-ido advice flx floobits-autoloads
highlight-autoloads arduino-mode-autoloads ede/auto rust-mode-autoloads
flycheck-clojure-autoloads cider-autoloads sesman-autoloads
spinner-autoloads queue-autoloads clojure-mode-autoloads
parinfer-autoloads paredit-autoloads ginkgo-mode-autoloads
go-rename-autoloads company-go-autoloads go-eldoc-autoloads
go-guru-autoloads go-mode-autoloads rx robe-autoloads inf-ruby-autoloads
rvm-autoloads eglot-autoloads jsonrpc-autoloads company-oddmuse
company-keywords company-etags etags multifile generator xref project
company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-clang company-semantic
company-eclim company-template company-bbdb company pcase
company-autoloads eshell-z-autoloads helm-fzf-autoloads helm-autoloads
helm-core-autoloads popup-autoloads git-link-autoloads magit-autoloads
magit-popup-autoloads git-commit-autoloads with-editor-autoloads
ghub-autoloads treepy-autoloads graphql-autoloads async-autoloads
exwm-randr xcb-randr exwm-config ido exwm exwm-input xcb-keysyms xcb-xkb
exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout
exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types
xcb-debug exwm-autoloads xelb-autoloads cl-generic-autoloads
tango-dark-theme server winner ring edmacro kmacro autorevert filenotify
savehist time edit-indirect-autoloads pianobar-autoloads
concourse-mode-autoloads hierarchy-autoloads flx-ido-autoloads
flx-autoloads wgrep-autoloads flycheck-autoloads seq-autoloads
dash-autoloads ace-window-autoloads avy-autoloads
dockerfile-mode-autoloads s-autoloads yasnippet-snippets-autoloads
yasnippet-autoloads protobuf-mode-autoloads markdown-mode-autoloads
yaml-mode-autoloads etags-select-autoloads projectile-autoloads
pkg-info-autoloads epl-autoloads debbugs-autoloads cl-lib-autoloads
straight-autoloads info cl-extra help-mode straight subr-x mule-util
finder-inf package easymenu epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq byte-opt gv bytecomp byte-compile
cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 539082 374845)
 (symbols 48 61816 41)
 (strings 32 168910 63466)
 (string-bytes 1 5878815)
 (vectors 16 92850)
 (vector-slots 8 2365421 412104)
 (floats 8 543 2370)
 (intervals 56 1915 1375)
 (buffers 992 39))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33881; Package emacs. (Wed, 26 Dec 2018 21:49:02 GMT) Full text and rfc822 format available.

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

From: John Shahid <jvshahid <at> gmail.com>
To: 33881 <at> debbugs.gnu.org
Subject: Re: 27.0.50;
 flymake-show-diagnostics-buffer throwing 'Selecting deleted buffer'
 error
Date: Wed, 26 Dec 2018 16:48:32 -0500
[Message part 1 (text/plain, inline)]
I was able to fix the issue by applying the following patch

[0001-Always-set-the-source-buffer-before-reverting.patch (text/x-patch, inline)]
From 2dda8ad72bb5a1603473d9420e90e8d1d694a134 Mon Sep 17 00:00:00 2001
From: John Shahid <jvshahid <at> gmail.com>
Date: Wed, 26 Dec 2018 16:45:33 -0500
Subject: [PATCH] Always set the source buffer before reverting

* lisp/progmodes/flymake.el (flymake-show-diagnostics-buffer): Do it.
---
 lisp/progmodes/flymake.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 7b100da42b..c773eb1c15 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1332,9 +1332,9 @@ flymake-show-diagnostics-buffer
          (target (or (get-buffer name)
                      (with-current-buffer (get-buffer-create name)
                        (flymake-diagnostics-buffer-mode)
-                       (setq flymake--diagnostics-buffer-source source)
                        (current-buffer)))))
     (with-current-buffer target
+      (setq flymake--diagnostics-buffer-source source)
       (revert-buffer)
       (display-buffer (current-buffer)))))
 
-- 
2.19.2


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33881; Package emacs. (Sat, 05 Jan 2019 11:45:02 GMT) Full text and rfc822 format available.

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

From: João Távora <joaotavora <at> gmail.com>
To: John Shahid <jvshahid <at> gmail.com>
Cc: 33881-done <at> debbugs.gnu.org, 33881 <at> debbugs.gnu.org
Subject: Re: bug#33881: 27.0.50;
 flymake-show-diagnostics-buffer throwing 'Selecting deleted buffer'
 error
Date: Sat, 05 Jan 2019 11:44:00 +0000
John Shahid <jvshahid <at> gmail.com> writes:

> I was able to fix the issue by applying the following patch
>
> From 2dda8ad72bb5a1603473d9420e90e8d1d694a134 Mon Sep 17 00:00:00 2001
> From: John Shahid <jvshahid <at> gmail.com>
> Date: Wed, 26 Dec 2018 16:45:33 -0500
> Subject: [PATCH] Always set the source buffer before reverting
>
> * lisp/progmodes/flymake.el (flymake-show-diagnostics-buffer): Do it.
> ---
>  lisp/progmodes/flymake.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
> index 7b100da42b..c773eb1c15 100644
> --- a/lisp/progmodes/flymake.el
> +++ b/lisp/progmodes/flymake.el
> @@ -1332,9 +1332,9 @@ flymake-show-diagnostics-buffer
>           (target (or (get-buffer name)
>                       (with-current-buffer (get-buffer-create name)
>                         (flymake-diagnostics-buffer-mode)
> -                       (setq flymake--diagnostics-buffer-source source)
>                         (current-buffer)))))
>      (with-current-buffer target
> +      (setq flymake--diagnostics-buffer-source source)
>        (revert-buffer)
>        (display-buffer (current-buffer)))))

Pushed your patch with a slight change to the commit message.

Marked it as "Copyright-Paperwork-Exempt", but now I see I shouldn't
have, as you have probably already signed papers since I see a lot more
commits to your name.

Anyway, thanks!
João





Reply sent to João Távora <joaotavora <at> gmail.com>:
You have taken responsibility. (Sat, 05 Jan 2019 11:45:02 GMT) Full text and rfc822 format available.

Notification sent to jvshahid <at> gmail.com:
bug acknowledged by developer. (Sat, 05 Jan 2019 11:45:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33881; Package emacs. (Sat, 05 Jan 2019 12:38:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 33881 <at> debbugs.gnu.org, jvshahid <at> gmail.com
Subject: Re: bug#33881: 27.0.50;
 flymake-show-diagnostics-buffer throwing 'Selecting deleted buffer'
 error
Date: Sat, 05 Jan 2019 14:37:13 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Date: Sat, 05 Jan 2019 11:44:00 +0000
> Cc: 33881-done <at> debbugs.gnu.org, 33881 <at> debbugs.gnu.org
> 
> Marked it as "Copyright-Paperwork-Exempt", but now I see I shouldn't
> have, as you have probably already signed papers since I see a lot more
> commits to your name.

Indeed, we have John's assignment on file.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 03 Feb 2019 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 83 days ago.

Previous Next


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