From: Eric Abrahamsen Date: Wed, 3 Jul 2019 19:53:43 +0000 (-0700) Subject: Small fix to writing Gnus dribble change-level entries X-Git-Tag: emacs-27.0.90~2110 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=619592df9ed4d54a63f653bf6912ecc44f46dc59;p=emacs.git Small fix to writing Gnus dribble change-level entries * lisp/gnus/gnus-start.el (gnus-group-change-level): PREVIOUS needs to still be a string when the dribble entry is written, so don't convert it to an entry until after that's done. Also, we're not meant to write PREVIOUS itself, we're meant to write the group that comes _after_ it in the sort-order of gnus-group-list, so do that instead. --- diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 85aefe0f5f6..d726ee5aaba 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1271,15 +1271,15 @@ string name) to insert this group after." (consp entry)) (setq oldlevel (gnus-info-level (nth 1 entry))) (setq oldlevel (or oldlevel gnus-level-killed))) - (when (stringp previous) - (setq previous (gnus-group-entry previous))) ;; Group is already subscribed. (unless (and (>= oldlevel gnus-level-zombie) (gnus-group-entry group)) (unless (gnus-ephemeral-group-p group) (gnus-dribble-enter (format "(gnus-group-change-level %S %S %S %S %S)" - group level oldlevel previous fromkilled))) + group level oldlevel + (cadr (member previous gnus-group-list)) + fromkilled))) ;; Then we remove the newgroup from any old structures, if needed. ;; If the group was killed, we remove it from the killed or zombie @@ -1341,6 +1341,8 @@ string name) to insert this group after." ;; at the head of `gnus-newsrc-alist'. (push info (cdr gnus-newsrc-alist)) (puthash group (list num info) gnus-newsrc-hashtb) + (when (stringp previous) + (setq previous (gnus-group-entry previous))) (let* ((prev-idx (seq-position gnus-group-list (caadr previous))) (idx (if prev-idx (1+ prev-idx)