GNU bug report logs -
#35208
27.0.50; Gnus nndraft error when saving message buffer
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35208 in the body.
You can then email your comments to 35208 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
eric <at> ericabrahamsen.net, yamaoka <at> jpl.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#35208
; Package
emacs,gnus
.
(Tue, 09 Apr 2019 13:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Basil L. Contovounesios" <contovob <at> tcd.ie>
:
New bug report received and forwarded. Copy sent to
eric <at> ericabrahamsen.net, yamaoka <at> jpl.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
.
(Tue, 09 Apr 2019 13:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Trying to save a draft, e.g. as follows:
0. HOME=$(mktemp -d) emacs -Q
1. M-x toggle-debug-on-error RET
2. (setq gnus-select-method '(nnnil)) C-j
3. M-x gnus RET
4. m
5. foo C-x C-s
results in the following error:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
nndraft-update-unread-articles()
run-hooks(after-save-hook)
basic-save-buffer(t)
save-buffer(1)
funcall-interactively(save-buffer 1)
call-interactively(save-buffer nil nil)
command-execute(save-buffer)
--8<---------------cut here---------------end--------------->8---
Reevaluating nndraft-update-unread-articles and repeating step (5) gives
the following backtrace:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
=(0 nil)
(if (= 0 (gnus-group-group-unread)) (progn (delete-region (point-at-bol) (progn (forward-line 1) (point)))))
(if (and gnus-permanently-visible-groups (string-match gnus-permanently-visible-groups group)) nil (gnus-group-goto-group group) (if (= 0 (gnus-group-group-unread)) (progn (delete-region (point-at-bol) (progn (forward-line 1) (point))))))
(while --dolist-tail-- (setq group (car --dolist-tail--)) (if (and gnus-permanently-visible-groups (string-match gnus-permanently-visible-groups group)) nil (gnus-group-goto-group group) (if (= 0 (gnus-group-group-unread)) (progn (delete-region (point-at-bol) (progn (forward-line 1) (point)))))) (setq --dolist-tail-- (cdr --dolist-tail--)))
(let ((--dolist-tail-- groups) group) (while --dolist-tail-- (setq group (car --dolist-tail--)) (if (and gnus-permanently-visible-groups (string-match gnus-permanently-visible-groups group)) nil (gnus-group-goto-group group) (if (= 0 (gnus-group-group-unread)) (progn (delete-region (point-at-bol) (progn (forward-line 1) (point)))))) (setq --dolist-tail-- (cdr --dolist-tail--))))
(save-excursion (let ((--dolist-tail-- groups) group) (while --dolist-tail-- (setq group (car --dolist-tail--)) (if (and gnus-permanently-visible-groups (string-match gnus-permanently-visible-groups group)) nil (gnus-group-goto-group group) (if (= 0 (gnus-group-group-unread)) (progn (delete-region (point-at-bol) (progn ... ...))))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
(let* ((groups (mapcar #'(lambda (elem) (gnus-group-prefixed-name (car elem) (list ... ""))) (nnmail-get-active))) (gnus-group-marked (copy-sequence groups)) (gnus-get-new-news-hook nil) (inhibit-read-only t)) (gnus-group-get-new-news-this-group nil t) (save-excursion (let ((--dolist-tail-- groups) group) (while --dolist-tail-- (setq group (car --dolist-tail--)) (if (and gnus-permanently-visible-groups (string-match gnus-permanently-visible-groups group)) nil (gnus-group-goto-group group) (if (= 0 (gnus-group-group-unread)) (progn (delete-region ... ...)))) (setq --dolist-tail-- (cdr --dolist-tail--))))))
(save-current-buffer (set-buffer gnus-group-buffer) (let* ((groups (mapcar #'(lambda (elem) (gnus-group-prefixed-name ... ...)) (nnmail-get-active))) (gnus-group-marked (copy-sequence groups)) (gnus-get-new-news-hook nil) (inhibit-read-only t)) (gnus-group-get-new-news-this-group nil t) (save-excursion (let ((--dolist-tail-- groups) group) (while --dolist-tail-- (setq group (car --dolist-tail--)) (if (and gnus-permanently-visible-groups (string-match gnus-permanently-visible-groups group)) nil (gnus-group-goto-group group) (if (= 0 ...) (progn ...))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))
nndraft-update-unread-articles()
run-hooks(after-save-hook)
basic-save-buffer(t)
save-buffer(1)
funcall-interactively(save-buffer 1)
call-interactively(save-buffer nil nil)
command-execute(save-buffer)
--8<---------------cut here---------------end--------------->8---
I'm temporarily working around this by
changing (zerop (gnus-group-group-unread))
to (eq 0 (gnus-group-group-unread)),
but a larger problem seems to be at play.
Any tips? Thanks,
--
Basil
Gnus v5.13
In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2019-04-09 built on thunk
Repository revision: 44b306d3510e54432b76724583ea9405f1c90686
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Debian GNU/Linux buster/sid
Configured using:
'configure 'CC=ccache gcc' 'CFLAGS=-O2 -march=native' --config-cache
--prefix=/home/blc/.local --with-mailutils --with-x-toolkit=lucid
--with-modules --with-file-notification=yes --with-x'
Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS
GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#35208
; Package
emacs,gnus
.
(Wed, 10 Apr 2019 01:59:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 35208 <at> debbugs.gnu.org (full text, mbox):
On Tue, 09 Apr 2019 14:46:20 +0100, Basil L. Contovounesios wrote:
> Trying to save a draft, e.g. as follows:
> 0. HOME=$(mktemp -d) emacs -Q
> 1. M-x toggle-debug-on-error RET
> 2. (setq gnus-select-method '(nnnil)) C-j
> 3. M-x gnus RET
> 4. m
> 5. foo C-x C-s
> results in the following error:
The message is saved with no error, hmmm. I did
mv .emacs dot-emacs
mv .newsrc dot-newsrc
mv .newsrc.eld dot-newsrc.eld
mv .gnus.el dot-gnus.el
rm .*~
and the recipe with the latest Emacs master.
Regards,
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#35208
; Package
emacs,gnus
.
(Wed, 10 Apr 2019 17:25:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 35208 <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
> On Tue, 09 Apr 2019 14:46:20 +0100, Basil L. Contovounesios wrote:
>> Trying to save a draft, e.g. as follows:
>
>> 0. HOME=$(mktemp -d) emacs -Q
>> 1. M-x toggle-debug-on-error RET
>> 2. (setq gnus-select-method '(nnnil)) C-j
>> 3. M-x gnus RET
>> 4. m
>> 5. foo C-x C-s
>
>> results in the following error:
>
> The message is saved with no error, hmmm. I did
>
> mv .emacs dot-emacs
> mv .newsrc dot-newsrc
> mv .newsrc.eld dot-newsrc.eld
> mv .gnus.el dot-gnus.el
> rm .*~
>
> and the recipe with the latest Emacs master.
Hmm, that's odd. I can reproduce the error 100% of the time.
I even tried a clean Emacs checkout on a clean OS install:
0. Install Debian Testing in a VirtualBox VM.
1. apt-get build-dep emacs-lucid
2. git clone https://git.savannah.gnu.org/git/emacs.git
3. cd emacs
4. ./autogen.sh all && ./configure && make
5. ./src/emacs -Q
6. Repeat steps 1-5 from my OP.
I include the details of this Emacs build after my signature.
Another thing I noticed, which I don't remember seeing before:
0. HOME=$(mktemp -d) emacs -Q
1. (setq gnus-select-method '(nnnil)) C-j
2. M-x gnus RET
3. m
4. C-x 4 C-o RET
5. foo C-x C-s
The *Group* buffer now has the following contents:
1: nndraft:drafts
K# 0: nndraft:queue
where the text properties at bol of the first group are:
cursor-sensor-functions (gnus-tool-bar-update)
face gnus-group-mail-1
gnus-group "nndraft:drafts"
gnus-indentation ""
gnus-level 1
gnus-marked 32
gnus-unread 1
and those at bol of the second group are:
cursor-sensor-functions (gnus-tool-bar-update)
face gnus-group-news-low-empty
gnus-group "nndraft:queue"
gnus-indentation ""
gnus-level 9
gnus-marked 32
gnus-unread 0
In Emacs 26, the second group nndraft:queue doesn't appear after saving
the *unsent mail* buffer. I suspect this seemingly unexpected group has
something to do with nndraft-update-unread-articles choking.
Thanks,
--
Basil
In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
of 2019-04-10 built on test
Repository revision: 0cef057b02b088ded8b46e3453ac0d891888423a
Repository branch: master
System Description: Debian GNU/Linux buster/sid
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF
XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD
PDUMPER LCMS2 GMP
Important settings:
value of $LANG: en_IE.UTF-8
locale-coding-system: utf-8-unix
Major mode: Message
Minor modes in effect:
gnus-message-citation-mode: t
mml-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
auto-fill-function: message-do-auto-fill
transient-mark-mode: t
abbrev-mode: t
Load-path shadows:
None found.
Reply sent
to
Katsumi Yamaoka <yamaoka <at> jpl.org>
:
You have taken responsibility.
(Thu, 11 Apr 2019 00:25:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Basil L. Contovounesios" <contovob <at> tcd.ie>
:
bug acknowledged by developer.
(Thu, 11 Apr 2019 00:25:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 35208-done <at> debbugs.gnu.org (full text, mbox):
On Wed, 10 Apr 2019 18:24:02 +0100, Basil L. Contovounesios wrote:
> Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
>> The message is saved with no error, hmmm.
[...]
> Hmm, that's odd. I can reproduce the error 100% of the time.
Oh, I could 100% reproduce this issue. Maybe the cause of
the failure was I did it in the real home directory instead of
the pseudo home. Probably Gnus loaded something from ~/News .
Sorry.
Me culprit. The cause is that `nndraft-update-unread-articles'
fails to go to the nndraft:queue group (in order to delete the
group line if the group has no unread article). nndraft:queue
and its directory are created when Gnus launches, and it is
registered into `gnus-active-hashtb' but not `gnus-newsrc-hashtb'.
So, `gnus-group-goto-group', that I recently changed so as to
use `gnus-newsrc-hashtb' instead of `gnus-active-hashtb', fails
to find the nndraft:queue group.
I've pushed the fix. Thank you for pointing this out.
Regards,
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#35208
; Package
emacs,gnus
.
(Thu, 11 Apr 2019 02:37:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 35208 <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
> Me culprit. The cause is that `nndraft-update-unread-articles'
> fails to go to the nndraft:queue group (in order to delete the
> group line if the group has no unread article). nndraft:queue
> and its directory are created when Gnus launches, and it is
> registered into `gnus-active-hashtb' but not `gnus-newsrc-hashtb'.
> So, `gnus-group-goto-group', that I recently changed so as to
> use `gnus-newsrc-hashtb' instead of `gnus-active-hashtb', fails
> to find the nndraft:queue group.
>
> I've pushed the fix. Thank you for pointing this out.
I can confirm your patch fixed the problem.
Thanks for the quick fix and explanation!
--
Basil
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 09 May 2019 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 262 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.