GNU bug report logs - #52168
29.0.50; Gnus buffers unexpectedly killed by project-kill-buffers

Previous Next

Package: emacs;

Reported by: Matthias Meulien <orontee <at> gmail.com>

Date: Sun, 28 Nov 2021 20:55:02 UTC

Severity: normal

Found in version 29.0.50

To reply to this bug, email your comments to 52168 AT debbugs.gnu.org.

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#52168; Package emacs. (Sun, 28 Nov 2021 20:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Meulien <orontee <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 28 Nov 2021 20:55:02 GMT) Full text and rfc822 format available.

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

From: Matthias Meulien <orontee <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Gnus buffers unexpectedly killed by project-kill-buffers
Date: Sun, 28 Nov 2021 21:54:39 +0100
1. Open a "project" file, say emacs in ~/Sources/emacs/lisp/outline.el
where ~/Sources/emacs contains GNU Emacs sources

2. From the buffer visiting outline.el, start reading mail with gnus

3. Switch back to outline.el buffer and call project-kill-buffers

4. Gnus buffers like *Group*, .newsrc-dribble, etc. are killed. This is
unexpected.

I've seen that the default-directory of *Group*, .newsrc-dribble,
etc. buffers is ~/Sources/emacs/lisp. But the project-kill-buffers logic
is based on buffer default-directory having the project root as
prefix. Thus *Group*, .newsrc-dribble, etc. buffers are killed by
project-kill-buffers.



In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-11-27 built on carbon
Repository revision: 338f7802373f1cfcc1b3749bbd46091fdef727f4
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --with-native-compilation'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: ELisp/l

Minor modes in effect:
  bug-reference-prog-mode: t
  display-line-numbers-mode: t
  highlight-changes-mode: t
  shell-dirtrack-mode: t
  minions-mode: t
  global-company-mode: t
  company-mode: t
  outline-minor-mode: t
  desktop-save-mode: t
  save-place-mode: t
  electric-pair-mode: t
  icomplete-mode: t
  global-so-long-mode: t
  global-auto-revert-mode: t
  auto-insert-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-layout-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  window-divider-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
/home/matthias/.config/emacs/elpa/transient-20211105.100/transient hides /usr/local/share/emacs/29.0.50/lisp/transient
/home/matthias/.config/emacs/elpa/dictionary-20201001.1727/dictionary hides /usr/local/share/emacs/29.0.50/lisp/net/dictionary

Features:
(edebug finder-inf semantic/wisent/grammar semantic/bovine/grammar
semantic/bovine semantic/grammar semantic/idle semantic/analyze
semantic/sort semantic/scope semantic/analyze/fcn semantic/db eieio-base
semantic/grammar-wy semantic/format semantic/tag-ls semantic/find
semantic/ctxt semantic/wisent semantic/wisent/wisent semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local
cedet generic cc-awk sh-script executable make-mode apropos autoconf
autoconf-mode shr-color nndoc gnus-dup url-cache debbugs-gnu debbugs
soap-client rng-xsd xsd-regexp debbugs-browse log-view time grep
cus-start tramp-archive tramp-gvfs tramp-cache zeroconf gnus-fun
flow-fill mm-archive smiley gnus-cite qp gnus-async gnus-bcklg gnus-ml
gnus-topic nndraft nnmh nnfolder utf-7 epa-file gnutls network-stream
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-cache
mailalias smtpmail shadow sort mail-extr gnus-msg emacsbug sendmail
log-edit pcvs-util smerge-mode diff whitespace cl-print mule-diag
hl-line dabbrev misearch multi-isearch pulse reftex-dcr reftex
reftex-loaddefs reftex-vars tex-mode mule-util shortdoc help-fns
radix-tree add-log checkdoc lisp-mnt url-http url-auth url-gw nsm
mhtml-mode css-mode smie sgml-mode typescript-mode yaml-mode hideshow
cap-words superword subword js python tramp-sh tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat ls-lisp follow view
enriched disp-table facemenu dired-aux bug-reference
display-line-numbers hilit-chg vc-dir reveal flyspell ox-odt rng-loc
rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table
ox-ascii ox-publish ox goto-addr org-element avl-tree ol-eww eww xdg
url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-search eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015
mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom ol-docview
doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi
org-link-doi vc-mtn vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc
bash-completion shell eglot array jsonrpc ert ewoc debug backtrace
flymake-proc flymake compile imenu company-oddmuse company-keywords
company-etags etags fileloop generator xref project company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-capf company-cmake company-semantic company-template
company-bbdb avoid minions company pcase carbon-custom cus-edit cus-load
gnus-demon nntp gnus-group gnus-undo gnus-start gnus-dbus dbus xml
gnus-cloud nnimap nnmail mail-source utf7 netrc parse-time gnus-spec
gnus-win nnoo gnus-int gnus-range message yank-media rmc puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus nnheader
gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils
mm-util mail-prsvr wid-edit gnus-dired dired-x dired dired-loaddefs
org-capture org-refile org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint
ansi-color ring org-list org-faces org-entities org-version
ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601
time-date ol org-keys oc org-compat org-macs org-loaddefs format-spec
find-func cal-menu calendar cal-loaddefs dictionary link connection
advice markdown-mode edit-indirect color thingatpt noutline outline
skeleton find-file vc-git diff-mode easy-mmode vc-dispatcher ispell comp
comp-cstr warnings rx cl-extra help-mode desktop frameset server
bookmark text-property-search pp saveplace elec-pair icomplete so-long
autorevert filenotify autoinsert cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs generic-x
face-remap proof-site proof-autoloads info package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars
seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer 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 emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget keymap hashtable-print-readable backquote threads
dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 2441288 968693)
 (symbols 48 52799 45)
 (strings 32 380048 37832)
 (string-bytes 1 13137332)
 (vectors 16 119634)
 (vector-slots 8 2757532 884272)
 (floats 8 764 2067)
 (intervals 56 218793 3395)
 (buffers 992 165))

-- 
Matthias




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52168; Package emacs. (Mon, 29 Nov 2021 15:29:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Matthias Meulien <orontee <at> gmail.com>
Cc: Philip K <philip <at> warpmail.net>, 52168 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52168: 29.0.50; Gnus buffers unexpectedly killed by
 project-kill-buffers
Date: Mon, 29 Nov 2021 16:27:56 +0100
Matthias Meulien <orontee <at> gmail.com> writes:

> 1. Open a "project" file, say emacs in ~/Sources/emacs/lisp/outline.el
> where ~/Sources/emacs contains GNU Emacs sources
>
> 2. From the buffer visiting outline.el, start reading mail with gnus
>
> 3. Switch back to outline.el buffer and call project-kill-buffers
>
> 4. Gnus buffers like *Group*, .newsrc-dribble, etc. are killed. This is
> unexpected.

I've added Philip and Dmitry to the CCs; perhaps they some comments.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52168; Package emacs. (Tue, 30 Nov 2021 13:22:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Matthias Meulien <orontee <at> gmail.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 52168 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52168: 29.0.50; Gnus buffers unexpectedly killed by
 project-kill-buffers
Date: Tue, 30 Nov 2021 14:20:51 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Matthias Meulien <orontee <at> gmail.com> writes:
>
>> 1. Open a "project" file, say emacs in ~/Sources/emacs/lisp/outline.el
>> where ~/Sources/emacs contains GNU Emacs sources
>>
>> 2. From the buffer visiting outline.el, start reading mail with gnus
>>
>> 3. Switch back to outline.el buffer and call project-kill-buffers
>>
>> 4. Gnus buffers like *Group*, .newsrc-dribble, etc. are killed. This is
>> unexpected.
>
> I've added Philip and Dmitry to the CCs; perhaps they some comments.

The address I used for Philip bounced; trying again with a different
address.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52168; Package emacs. (Tue, 30 Nov 2021 18:54:02 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 52168 <at> debbugs.gnu.org,
 Matthias Meulien <orontee <at> gmail.com>, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52168: 29.0.50; Gnus buffers unexpectedly killed by
 project-kill-buffers
Date: Tue, 30 Nov 2021 18:52:38 +0000
(I'm not sure if my last message got sent out, so I'm sending this again)

Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>>
>>> Matthias Meulien <orontee <at> gmail.com> writes:
>>>
>>>> 1. Open a "project" file, say emacs in ~/Sources/emacs/lisp/outline.el
>>>> where ~/Sources/emacs contains GNU Emacs sources
>>>>
>>>> 2. From the buffer visiting outline.el, start reading mail with gnus
>>>>
>>>> 3. Switch back to outline.el buffer and call project-kill-buffers
>>>>
>>>> 4. Gnus buffers like *Group*, .newsrc-dribble, etc. are killed. This is
>>>> unexpected.
>>>
>>> I've added Philip and Dmitry to the CCs; perhaps they some comments.
>>
>> The address I used for Philip bounced; trying again with a different
>> address.

To fix issues like this was the intention behind adding
project-kill-buffer-conditions (that is yet to be generalised).  What I
believe is happening here is that the *Group* buffer is being matched by
this condition

     (and (derived-mode . special-mode)
          (not (major-mode . help-mode)))

because `gnus-group-mode' derives `special-mode' via
`gnus-mode'. .newsrc-dribble matches both

      buffer-file-name

and

     (major-mode . fundamental-mode)

at least on my system.  Fixing this specific issue should be possible by
just adjusting project-kill-buffer-conditions, but it is probably
desirable to think about how this can be avoided in general, without
loosing the actual intended functionality of project-kill-buffers.

-- 
	Philip Kaludercic




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52168; Package emacs. (Wed, 01 Dec 2021 04:27:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 52168 <at> debbugs.gnu.org, Matthias Meulien <orontee <at> gmail.com>,
 Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52168: 29.0.50; Gnus buffers unexpectedly killed by
 project-kill-buffers
Date: Wed, 01 Dec 2021 05:25:53 +0100
Philip Kaludercic <philipk <at> posteo.net> writes:

> To fix issues like this was the intention behind adding
> project-kill-buffer-conditions (that is yet to be generalised).  What I
> believe is happening here is that the *Group* buffer is being matched by
> this condition
>
>      (and (derived-mode . special-mode)
>           (not (major-mode . help-mode)))
>
> because `gnus-group-mode' derives `special-mode' via
> `gnus-mode'. .newsrc-dribble matches both
>
>       buffer-file-name
>
> and
>
>      (major-mode . fundamental-mode)
>
> at least on my system.  Fixing this specific issue should be possible by
> just adjusting project-kill-buffer-conditions, but it is probably
> desirable to think about how this can be avoided in general, without
> loosing the actual intended functionality of project-kill-buffers.

I guess the issue is that it's pretty difficult to get an include-list
here:

    ;; Most of the temp buffers in the background:
    (major-mode . fundamental-mode)
    ;; non-text buffer such as xref, occur, vc, log, ...
    (and (derived-mode . special-mode)
         (not (major-mode . help-mode)))

But...  I think this is way too dangerous -- I think you really have to
come up with a include-list instead of going after fundamental-mode and
special-mode buffers.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52168; Package emacs. (Fri, 04 Nov 2022 22:51:02 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52168 <at> debbugs.gnu.org, Philip K <philip <at> warpmail.net>,
 Matthias Meulien <orontee <at> gmail.com>, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52168: 29.0.50; Gnus buffers unexpectedly killed by
 project-kill-buffers
Date: Fri, 04 Nov 2022 22:50:32 +0000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Matthias Meulien <orontee <at> gmail.com> writes:
>
>> 1. Open a "project" file, say emacs in ~/Sources/emacs/lisp/outline.el
>> where ~/Sources/emacs contains GNU Emacs sources
>>
>> 2. From the buffer visiting outline.el, start reading mail with gnus
>>
>> 3. Switch back to outline.el buffer and call project-kill-buffers
>>
>> 4. Gnus buffers like *Group*, .newsrc-dribble, etc. are killed. This is
>> unexpected.
>
> I've added Philip and Dmitry to the CCs; perhaps they some comments.

Has the issue been addressed with ef45bfacb2157f6cb6e9d306b5ad8e3e219d03f8?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52168; Package emacs. (Fri, 04 Nov 2022 23:02:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Philip Kaludercic <philipk <at> posteo.net>
Cc: 52168 <at> debbugs.gnu.org, Matthias Meulien <orontee <at> gmail.com>
Subject: Re: bug#52168: 29.0.50; Gnus buffers unexpectedly killed by
 project-kill-buffers
Date: Sat, 5 Nov 2022 01:01:25 +0200
Somehow I missed this issue back then, sorry.

On 01.12.2021 06:25, Lars Ingebrigtsen wrote:
> But...  I think this is way too dangerous -- I think you really have to
> come up with a include-list instead of going after fundamental-mode and
> special-mode buffers.

We're talking about this now in bug#58839.




This bug report was last modified 2 years and 225 days ago.

Previous Next


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