unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37590: 27.0.50; gnus-group-set-info setcdr exception
@ 2019-10-02 19:05 dick
  2019-10-02 19:10 ` dick
  0 siblings, 1 reply; 3+ messages in thread
From: dick @ 2019-10-02 19:05 UTC (permalink / raw)
  To: 37590


emacs -Q --batch -f package-initialize --eval "(debbugs-gnu \"normal\"))" --eval "(debbugs-gnu-select-report)" --eval "(gnus-group-set-timestamp)"
This results in wrong-type-argument consp, nil


In GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2019-10-02 built on dick
Repository revision: 92862ab4d7e9f8400229add13a6e16e437d6dbd3
Repository branch: gnus-group-set-info
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Ubuntu 16.04.6 LTS

Recent messages:
Type C-x 4 C-o RET to restore the other window.  
Mark saved where search started [4 times]
Mark set
Mark saved where search started [6 times]
mouse-2, RET: Display more help on this symbol
Quit
Mark set
Quit [2 times]
Mark set
Mark saved where search started

Configured using:
 'configure --prefix=/home/dick/.local'

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY GNUTLS LIBXML2
FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM THREADS PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: 
  locale-coding-system: utf-8-unix

Major mode: Outline

Minor modes in effect:
  bug-reference-mode: t
  dap-ui-mode: t
  dap-mode: t
  global-company-mode: t
  company-mode: t
  show-paren-mode: t
  global-magit-file-mode: t
  magit-file-mode: t
  magit-auto-revert-mode: t
  global-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  flx-ido-mode: t
  ido-everywhere: t
  projectile-mode: t
  override-global-mode: t
  global-hl-line-mode: t
  winner-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-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

Load-path shadows:
/home/dick/.emacs.d/elpa/async-20180527.1730/async-autoloads hides /home/dick/.local/share/emacs/site-lisp/emacs-async/async-autoloads
/home/dick/.emacs.d/elpa/async-20180527.1730/async-bytecomp hides /home/dick/.local/share/emacs/site-lisp/emacs-async/async-bytecomp
/home/dick/.emacs.d/elpa/async-20180527.1730/smtpmail-async hides /home/dick/.local/share/emacs/site-lisp/emacs-async/smtpmail-async
/home/dick/.emacs.d/elpa/async-20180527.1730/dired-async hides /home/dick/.local/share/emacs/site-lisp/emacs-async/dired-async
/home/dick/.emacs.d/elpa/async-20180527.1730/async hides /home/dick/.local/share/emacs/site-lisp/emacs-async/async
/home/dick/.emacs.d/elpa/async-20180527.1730/async-pkg hides /home/dick/.local/share/emacs/site-lisp/emacs-async/async-pkg
/home/dick/.emacs.d/lisp/json hides /home/dick/.local/share/emacs/27.0.50/lisp/json

Features:
(shadow sort flyspell ispell footnote mail-extr gnus-msg gnus-art mm-uu
mml2015 mm-view mml-smime smime dig gnus-sum shr svg dom gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time
iso8601 gnus-spec gnus-int gnus-range gnus-win emacsbug sendmail apropos
bug-reference misearch multi-isearch help-fns radix-tree mm-archive url-cache
debbugs-gnu debbugs soap-client url-http url-auth url-gw rng-xsd rng-dt
rng-util xsd-regexp paredit-ext paredit company-oddmuse company-keywords
company-etags company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-semantic company-eclim
company-template company-css company-nxml company-bbdb company-c-headers
dap-java dap-ui gdb-mi bindat gud bui bui-list bui-info bui-entry bui-core
bui-history bui-button bui-utils tree-mode dap-mode dap-overlays
google-java-format lsp-java request cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs lsp company-lsp lsp-mode ewoc
markdown-mode edit-indirect color tree-widget spinner network-stream nsm
inline f s em-glob esh-util ht dash-functional anaphora a pp sx
key-combo company pcase haskell-interactive-mode haskell-presentation-mode
haskell-process haskell-session haskell-compile haskell-mode haskell-cabal
haskell-utils haskell-font-lock haskell-indentation haskell-string
haskell-sort-imports haskell-lexeme haskell-align-imports haskell-compat
haskell-complete-module haskell-ghc-support noutline outline flymake-proc
flymake warnings etags fileloop generator xref project dabbrev
haskell-customize hydra lv use-package-ensure paren magit-submodule
magit-obsolete magit-popup magit-blame magit-stash magit-reflog 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-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log which-func imenu magit-diff smerge-mode diff diff-mode
magit-core magit-autorevert autorevert filenotify magit-margin magit-transient
magit-process magit-mode transient git-commit magit-git magit-section
magit-utils crm log-edit message rmc dired dired-loaddefs format-spec rfc822
mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader pcvs-util add-log with-editor async-bytecomp async shell
pcomplete server dash flx-ido flx ido solarized-theme solarized-definitions
projectile ibuf-ext ibuffer ibuffer-loaddefs thingatpt grep compile comint
ansi-color gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045
ietf-drums text-property-search time-date mail-utils mm-util mail-prsvr
use-package-bind-key bind-key easy-mmode cus-edit cus-start cus-load wid-edit
twittering-mode epa derived epg epg-config tls gnutls puny url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap advice xml cl cl-extra help-mode use-package-core hl-line winner ring
finder-inf edmacro kmacro howdoyou-autoloads rx json-reformat-autoloads
json-snatcher-autoloads sml-mode-autoloads tornado-template-mode-autoloads
info package easymenu browse-url url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x 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
dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 692904 37162)
 (symbols 48 38471 1)
 (strings 32 165223 17119)
 (string-bytes 1 4900695)
 (vectors 16 54905)
 (vector-slots 8 711622 35386)
 (floats 8 3312 574)
 (intervals 56 19743 0)
 (buffers 992 18)
 (heap 1024 37858 19223))





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#37590: 27.0.50; gnus-group-set-info setcdr exception
  2019-10-02 19:05 bug#37590: 27.0.50; gnus-group-set-info setcdr exception dick
@ 2019-10-02 19:10 ` dick
  2019-10-02 20:53   ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: dick @ 2019-10-02 19:10 UTC (permalink / raw)
  To: 37590

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: patch --]
[-- Type: text/x-diff, Size: 1526 bytes --]

From 92862ab4d7e9f8400229add13a6e16e437d6dbd3 Mon Sep 17 00:00:00 2001
From: dickmao <none>
Date: Wed, 2 Oct 2019 14:22:26 -0400
Subject: [PATCH] Avoid setcdr exception when gnus-newsrc-alist is empty

Exception occurs when using debbugs-gnu.
* lisp/gnus/gnus-group.el (gnus-group-set-info): check if
  gnus-newsrc-alist is a consp
---
 lisp/gnus/gnus-group.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 915125b655..bca5d35f24 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4466,11 +4466,14 @@ gnus-group-set-info
 			     (gnus-list-of-unread-articles (car info)))))
 	    ;; The above `setcar' will only affect the hashtable, not
 	    ;; the alist: update the alist separately.
-	    (push info (cdr (setq gnus-newsrc-alist
-				   (remove (assoc-string
-					    (gnus-info-group info)
-					    gnus-newsrc-alist)
-					   gnus-newsrc-alist)))))
+            (setf (alist-get (car info)
+                             ;; avoid usurping dummy info at the head
+                             ;; of gnus-newsrc-alist
+                             (if (consp gnus-newsrc-alist)
+                                 (cdr gnus-newsrc-alist)
+                               gnus-newsrc-alist)
+                             nil nil #'equal)
+                  (cdr info)))
 	(error "No such group: %s" (gnus-info-group info))))))
 
 ;; Ad-hoc function for inserting data from a different newsrc.eld
-- 
2.23.0






^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#37590: 27.0.50; gnus-group-set-info setcdr exception
  2019-10-02 19:10 ` dick
@ 2019-10-02 20:53   ` Eric Abrahamsen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2019-10-02 20:53 UTC (permalink / raw)
  To: dick; +Cc: 37590

dick <dick.r.chiang@gmail.com> writes:

> From 92862ab4d7e9f8400229add13a6e16e437d6dbd3 Mon Sep 17 00:00:00 2001
> From: dickmao <none>
> Date: Wed, 2 Oct 2019 14:22:26 -0400
> Subject: [PATCH] Avoid setcdr exception when gnus-newsrc-alist is empty

Yeah, this is something we've been looking at in #36903. In the case of
debbugs-gnu, Gnus isn't actually started up at all, and
gnus-newsrc-alist hasn't been initialized. I think it would be better
just to skip that clause altogether when gnus-newsrc-alist is nil,
rather than setting it like this.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-02 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 19:05 bug#37590: 27.0.50; gnus-group-set-info setcdr exception dick
2019-10-02 19:10 ` dick
2019-10-02 20:53   ` Eric Abrahamsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).