bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

Pankaj Jangid-2

New command 'S A' ('gnus-summary-attach-article') is not working
properly with multiple articles.

* Steps
1. Select multiple articles in summary buffer using process mark '#'
2. 'S A'
3. Creates a new message buffer with multiple articles attached. BUT all
the articles are same. The latest among the selected articles is
repeated multiple times.


In GNU Emacs 27.0.60 (build 9, x86_64-apple-darwin19.2.0, NS appkit-1894.20 Version 10.15.2 (Build 19C57))
 of 2020-01-13 built on Pankajs-MacBook-Pro.local
Repository revision: d47b157969356f15e038dbbfa4da7769f6f98583
Repository branch: emacs-27
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.2

Recent messages:
Opening nnimap server on gml...done
nnimap read 0k from imap.gmail.com
No more unseen articles
No more unread articles
scroll-down-command: Beginning of buffer
Composing main Info directory...done
Auto-saving...
delete-backward-char: Text is read-only
Quit [2 times]
Expiring articles...done

Configured using:
 'configure 'CFLAGS=-g -O0' CPPFLAGS=-I/usr/local/opt/ruby/include
 LDFLAGS=-L/usr/local/opt/ruby/lib'

Configured features:
RSVG DBUS GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
NS MODULES THREADS JSON PDUMPER LCMS2 GMP

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

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  cursor-sensor-mode: t
  gnus-undo-mode: t
  electric-pair-mode: t
  direnv-mode: t
  show-paren-mode: t
  which-key-mode: t
  global-hl-line-mode: t
  projectile-mode: t
  icomplete-mode: t
  shell-dirtrack-mode: t
  recentf-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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow emacsbug org-bullets org-element avl-tree ol-eww ol-rmail ol-mhe
ol-irc ol-info ol-gnus ol-docview doc-view jka-compr image-mode exif
ol-bibtex bibtex ol-bbdb ol-w3m help-fns radix-tree cl-print debug
backtrace gnus-uu yenc flow-fill bbdb-message sendmail flyspell ispell
nnir shr-color vc-git diff-mode sort gnus-cite smiley mm-archive
mail-extr gnus-async gnus-bcklg qp gnus-ml disp-table gnus-topic
cursor-sensor nndraft nnmh utf-7 nnfolder bbdb-gnus epa-file gnutls
network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp
gnus-cache gnus-alias gnus-sum url url-proxy url-privacy url-expand
url-methods url-history mailcap shr url-cookie url-domsuf url-util svg
xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc
puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config
mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader
gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045
ietf-drums text-property-search mail-utils mm-util mail-prsvr cl-extra
company-oddmuse company-keywords company-etags etags fileloop 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 display-line-numbers yasnippet help-mode elec-pair hideshow direnv
dash sanityinc-tomorrow-bright-theme color-theme-sanityinc-tomorrow
color paren which-key init server init-prog flymake-proc flymake
warnings init-edit init-keys init-looks delight hl-line init-env
exec-path-from-shell init-melpa init-tools projectile grep compile
ibuf-ext ibuffer ibuffer-loaddefs ob-C cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-python
org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote
org-src ob-comint org-pcomplete org-list org-faces org-entities noutline
outline easy-mmode org-version ob-emacs-lisp ob-core ob-eval org-table
ol org-keys org-compat advice org-macs org-loaddefs find-func cal-menu
calendar cal-loaddefs bbdb-mua bbdb-com crm mailabbrev bbdb bbdb-site
timezone icomplete edmacro kmacro erc-auth erc-join erc-goodies erc
erc-backend erc-compat thingatpt pp erc-loaddefs tramp-cache tramp-sh
tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat
shell pcomplete comint ansi-color ring parse-time iso8601 time-date
ls-lisp format-spec recentf tree-widget wid-edit rx 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
early-init tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu 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 charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray 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 kqueue cocoa ns lcms2 multi-tty
make-network-process emacs)

Memory information:
((conses 16 568885 60395)
 (symbols 48 35566 6)
 (strings 32 119109 14067)
 (string-bytes 1 4158379)
 (vectors 16 58394)
 (vector-slots 8 951194 62772)
 (floats 8 568 516)
 (intervals 56 5830 818)
 (buffers 1000 106))

--
Pankaj Jangid





Reply | Threaded
Open this post in threaded view
|

bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

Eric Abrahamsen-2
Pankaj Jangid <[hidden email]> writes:

> New command 'S A' ('gnus-summary-attach-article') is not working
> properly with multiple articles.
>
> * Steps
> 1. Select multiple articles in summary buffer using process mark '#'
> 2. 'S A'
> 3. Creates a new message buffer with multiple articles attached. BUT all
> the articles are same. The latest among the selected articles is
> repeated multiple times.

That command sets up the message-mode buffer and makes it current before
iterating over the articles, so it's unable to actually find the
articles and simply repeats the last value of
gnus-original-article-buffer.

It's a bit weird, what it's doing with the buffers. I'll look at this a
little later in the day.

Thanks for the report,
Eric



Reply | Threaded
Open this post in threaded view
|

bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

Eric Abrahamsen-2
Eric Abrahamsen <[hidden email]> writes:

> Pankaj Jangid <[hidden email]> writes:
>
>> New command 'S A' ('gnus-summary-attach-article') is not working
>> properly with multiple articles.
>>
>> * Steps
>> 1. Select multiple articles in summary buffer using process mark '#'
>> 2. 'S A'
>> 3. Creates a new message buffer with multiple articles attached. BUT all
>> the articles are same. The latest among the selected articles is
>> repeated multiple times.
>
> That command sets up the message-mode buffer and makes it current before
> iterating over the articles, so it's unable to actually find the
> articles and simply repeats the last value of
> gnus-original-article-buffer.
Okay, that was only right by accident. The real problem was that the
code inside the iterate was setting the buffer to the message-mode
buffer. Then the calls to `gnus-summary-select-article' kept re-setting
to the summary-buffer, but always on the same article.

Anyway, would you test this patch and confirm it fixes the problem?

Eric


attach-article-fix.diff (793 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

Pankaj Jangid-2
Eric Abrahamsen <[hidden email]> writes:

>> That command sets up the message-mode buffer and makes it current
>> before iterating over the articles, so it's unable to actually find
>> the articles and simply repeats the last value of
>> gnus-original-article-buffer.
>
> Okay, that was only right by accident. The real problem was that the
> code inside the iterate was setting the buffer to the message-mode
> buffer. Then the calls to `gnus-summary-select-article' kept
> re-setting to the summary-buffer, but always on the same article.
>
> Anyway, would you test this patch and confirm it fixes the problem?

Just did that. Following observation,

when I process mark multiple items in summary-buffer and move the point
to anything other than the latest marked mail and then press 'S A', the
last mail is not added and the second-last email gets attached twice.

When the point is on the last marked email and then I press 'S A', it
works fine.

Regards,
--
Pankaj Jangid



Reply | Threaded
Open this post in threaded view
|

bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

Eric Abrahamsen-2

On 01/14/20 03:42 AM, Pankaj Jangid wrote:

> Eric Abrahamsen <[hidden email]> writes:
>
>>> That command sets up the message-mode buffer and makes it current
>>> before iterating over the articles, so it's unable to actually find
>>> the articles and simply repeats the last value of
>>> gnus-original-article-buffer.
>>
>> Okay, that was only right by accident. The real problem was that the
>> code inside the iterate was setting the buffer to the message-mode
>> buffer. Then the calls to `gnus-summary-select-article' kept
>> re-setting to the summary-buffer, but always on the same article.
>>
>> Anyway, would you test this patch and confirm it fixes the problem?
>
> Just did that. Following observation,
>
> when I process mark multiple items in summary-buffer and move the point
> to anything other than the latest marked mail and then press 'S A', the
> last mail is not added and the second-last email gets attached twice.
>
> When the point is on the last marked email and then I press 'S A', it
> works fine.
Sorry, got busy for a couple of days there...

Looks like the currently-opened message is interfering with the process
somewhat. I've tried this out a few different ways and this new version
of the patch seems to do the right thing, would you give it another
shot?

Eric


attach-article-fix.diff (944 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

Eric Abrahamsen-2

On 01/18/20 09:25 AM, Pankaj Jangid wrote:
> Eric Abrahamsen <[hidden email]> writes:
>
>> Looks like the currently-opened message is interfering with the process
>> somewhat. I've tried this out a few different ways and this new version
>> of the patch seems to do the right thing, would you give it another
>> shot?
>
> Done. Working fine now.

Great.

> Please push into release branch.

Let me just confirm with Eli here, as I'm not 100% on policy -- Eli, is
this sort of bugfix okay for the 27 branch?

Eric



Reply | Threaded
Open this post in threaded view
|

bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

Eric Abrahamsen-2
Eli Zaretskii <[hidden email]> writes:

>> From: Eric Abrahamsen <[hidden email]>
>> Cc: [hidden email], Eli Zaretskii <[hidden email]>
>> Date: Sat, 18 Jan 2020 10:34:29 -0800
>>
>> > Please push into release branch.
>>
>> Let me just confirm with Eli here, as I'm not 100% on policy -- Eli, is
>> this sort of bugfix okay for the 27 branch?
>
> Yes, thanks.

Done, thank you.



Reply | Threaded
Open this post in threaded view
|

bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

Eric Abrahamsen-2
Eric Abrahamsen <[hidden email]> writes:

> Eli Zaretskii <[hidden email]> writes:
>
>>> From: Eric Abrahamsen <[hidden email]>
>>> Cc: [hidden email], Eli Zaretskii <[hidden email]>
>>> Date: Sat, 18 Jan 2020 10:34:29 -0800
>>>
>>> > Please push into release branch.
>>>
>>> Let me just confirm with Eli here, as I'm not 100% on policy -- Eli, is
>>> this sort of bugfix okay for the 27 branch?
>>
>> Yes, thanks.
>
> Done, thank you.

Bah, then I went and put it on master. Is there a clean way to get it on
Emacs 27 as well?

Sorry about that, total brain-o.



Reply | Threaded
Open this post in threaded view
|

bug#39112: 27.0.60; gnus-summary-attach-article 'S A' with multiple articles selected repeats latest article

Eli Zaretskii
> From: Eric Abrahamsen <[hidden email]>
> Cc: [hidden email],  [hidden email],  [hidden email]
> Date: Sat, 18 Jan 2020 11:19:16 -0800
>
> >> Yes, thanks.
> >
> > Done, thank you.
>
> Bah, then I went and put it on master. Is there a clean way to get it on
> Emacs 27 as well?

"git cherry-pick -x", of course.