* bug#42823: 27.1; gnus-unplugged: nnimap (gmail) folder names having spaces not appearing
@ 2020-08-12 7:02 ozhap
2020-08-12 16:57 ` Eric Abrahamsen
0 siblings, 1 reply; 8+ messages in thread
From: ozhap @ 2020-08-12 7:02 UTC (permalink / raw)
To: 42823
1. Gmail IMAP should be accessible. Keep credentials in .authinfo.gpg.
No Gnus files or directories (News, .newsrc*, Mail) present.
2. emacs -Q
3. Run:
(setq gnus-select-method
'(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
(nnimap-stream ssl)))
4. M-x gnus
5. ^ (Server list)
6. Go to 'gmail' and: J a (agentize)
7. q (back to Group buffer)
8. g (refresh)
9. q (quit Gnus)
10. Go offline.
11. M-x gnus-unplugged
'Sent mail' is missing. (The space character seems to be the problem
as it also happens to 'All mail', if set up). Works properly in 26.3.
In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
of 2020-08-11 built on Compu
Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Ubuntu 20.04.1 LTS
Recent messages:
Saving /home/abc/.newsrc.eld...
Saving file /home/abc/.newsrc.eld...
Wrote /home/abc/.newsrc.eld
Saving /home/abc/.newsrc.eld...done
<XF86RFKill> is undefined
Reading /home/abc/.newsrc.eld...
Checking new news...
Reading active file from gmail via nnimap...done
Reading active file via nndraft...done
Checking new news...done
Configured using:
'configure --prefix=/home/abc/emacs'
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD PDUMPER
LCMS2 GMP
Important settings:
value of $LANG: en_IN
locale-coding-system: iso-latin-1-unix
Major mode: Group
Minor modes in effect:
cursor-sensor-mode: t
gnus-undo-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 sort mail-extr emacsbug sendmail nnagent nnml cursor-sensor
nndraft nnmh nnfolder utf-7 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-sum url
url-proxy url-privacy url-expand url-methods url-history mailcap shr
url-cookie url-domsuf url-util url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs json map url-vars svg xml dom
browse-url gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range message rmc puny format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search time-date subr-x seq byte-opt gv bytecomp
byte-compile cconv mail-utils mm-util mail-prsvr wid-edit cl-loaddefs
cl-lib dired dired-loaddefs 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
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 inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 142608 15208)
(symbols 48 14296 1)
(strings 32 41121 2403)
(string-bytes 1 1407412)
(vectors 16 21744)
(vector-slots 8 291245 17836)
(floats 8 196 23)
(intervals 56 701 373)
(buffers 1000 19))
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42823: 27.1; gnus-unplugged: nnimap (gmail) folder names having spaces not appearing
2020-08-12 7:02 bug#42823: 27.1; gnus-unplugged: nnimap (gmail) folder names having spaces not appearing ozhap
@ 2020-08-12 16:57 ` Eric Abrahamsen
2020-09-19 4:57 ` bug#42823: [PATCH] " Ozhap
0 siblings, 1 reply; 8+ messages in thread
From: Eric Abrahamsen @ 2020-08-12 16:57 UTC (permalink / raw)
To: ozhap; +Cc: 42823
ozhap@vollbio.de writes:
> 1. Gmail IMAP should be accessible. Keep credentials in .authinfo.gpg.
> No Gnus files or directories (News, .newsrc*, Mail) present.
> 2. emacs -Q
> 3. Run:
>
> (setq gnus-select-method
> '(nnimap "gmail"
> (nnimap-address "imap.gmail.com")
> (nnimap-server-port 993)
> (nnimap-stream ssl)))
>
> 4. M-x gnus
> 5. ^ (Server list)
> 6. Go to 'gmail' and: J a (agentize)
> 7. q (back to Group buffer)
> 8. g (refresh)
> 9. q (quit Gnus)
> 10. Go offline.
> 11. M-x gnus-unplugged
>
> 'Sent mail' is missing.
Hmm, I can partially confirm: in my tests, I do see the group still
present in the *Group* buffer, but it can't be activated. The group is
present in the agent's data: the group has its own directory (complete
with space in the directory name), and it is also present in the agent's
active file (also with space).
I've only been able to get as far as figuring out that the group is
*not* present in nnml-group-alist, after nnagent has been made the
current server. Presumably that's because the reading of the active file
is still done with `read', which will only read one word, not the full
name, thus the parsing fails and this line is discarded.
It might be time to get rid of the last of the `read' tricks...
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42823: [PATCH] gnus-unplugged: nnimap (gmail) folder names having spaces not appearing
2020-08-12 16:57 ` Eric Abrahamsen
@ 2020-09-19 4:57 ` Ozhap
2020-09-19 7:08 ` Andreas Schwab
0 siblings, 1 reply; 8+ messages in thread
From: Ozhap @ 2020-09-19 4:57 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: 42823
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> I've only been able to get as far as figuring out that the group is
> *not* present in nnml-group-alist, after nnagent has been made the
> current server. Presumably that's because the reading of the active file
> is still done with `read', which will only read one word, not the full
> name, thus the parsing fails and this line is discarded.
>
> It might be time to get rid of the last of the `read' tricks...
I considered that approach, but felt it would always be flawed by space
also being a delimiter in the active file. This patch puts quotes around
the group names when *writing* the active file of agent & cache (and
escapes any \ or " in them). I've been using it and I think it's clean.
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 3429d6560b..f822ce57ba 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1179,10 +1179,13 @@ gnus-write-active-file
(maphash
(lambda (group active)
(when active
- (insert (format "%s %d %d y\n"
- (if full-names
- group
- (gnus-group-real-name group))
+ (insert (format "\"%s\" %d %d y\n"
+ (replace-regexp-in-string
+ "[\\\"]" "\\\\\\&"
+ (if full-names
+ group
+ (gnus-group-real-name group))
+ t nil)
(or (cdr active)
(car active))
(car active)))))
But I'm not a position to actually test it with nntp, or IMAP folder names with \ or ".
--
Ozhap
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#42823: [PATCH] gnus-unplugged: nnimap (gmail) folder names having spaces not appearing
2020-09-19 4:57 ` bug#42823: [PATCH] " Ozhap
@ 2020-09-19 7:08 ` Andreas Schwab
2020-09-19 7:45 ` Ozhap
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2020-09-19 7:08 UTC (permalink / raw)
To: Ozhap; +Cc: Eric Abrahamsen, 42823
On Sep 19 2020, Ozhap wrote:
> + (insert (format "\"%s\" %d %d y\n"
> + (replace-regexp-in-string
> + "[\\\"]" "\\\\\\&"
You can use %S as the format instead.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42823: [PATCH] gnus-unplugged: nnimap (gmail) folder names having spaces not appearing
2020-09-19 7:08 ` Andreas Schwab
@ 2020-09-19 7:45 ` Ozhap
2020-09-19 15:36 ` Eric Abrahamsen
0 siblings, 1 reply; 8+ messages in thread
From: Ozhap @ 2020-09-19 7:45 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Eric Abrahamsen, 42823
Andreas Schwab <schwab@linux-m68k.org> writes:
> On Sep 19 2020, Ozhap wrote:
>
>> + (insert (format "\"%s\" %d %d y\n"
>> + (replace-regexp-in-string
>> + "[\\\"]" "\\\\\\&"
>
> You can use %S as the format instead.
Perfect! Thanks. So I'm using this now:
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 3429d6560b..c2f0e355bc 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1179,7 +1179,7 @@ gnus-write-active-file
(maphash
(lambda (group active)
(when active
- (insert (format "%s %d %d y\n"
+ (insert (format "%S %d %d y\n"
(if full-names
group
(gnus-group-real-name group))
Forgot to add earlier: The problem didn't occur in 26.3 because the
intern command retired in c1b63af4458e92bad33da0def2b15c206656e2fa
escaped space characters (as well as other symbols).
--
Ozhap
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#42823: [PATCH] gnus-unplugged: nnimap (gmail) folder names having spaces not appearing
2020-09-19 7:45 ` Ozhap
@ 2020-09-19 15:36 ` Eric Abrahamsen
2020-09-20 1:32 ` Ozhap
0 siblings, 1 reply; 8+ messages in thread
From: Eric Abrahamsen @ 2020-09-19 15:36 UTC (permalink / raw)
To: Ozhap; +Cc: 42823, Andreas Schwab
On 09/19/20 13:15 PM, Ozhap wrote:
> Andreas Schwab <schwab@linux-m68k.org> writes:
>
>> On Sep 19 2020, Ozhap wrote:
>>
>>> + (insert (format "\"%s\" %d %d y\n"
>>> + (replace-regexp-in-string
>>> + "[\\\"]" "\\\\\\&"
>>
>> You can use %S as the format instead.
>
> Perfect! Thanks. So I'm using this now:
>
> diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
> index 3429d6560b..c2f0e355bc 100644
> --- a/lisp/gnus/gnus-util.el
> +++ b/lisp/gnus/gnus-util.el
> @@ -1179,7 +1179,7 @@ gnus-write-active-file
> (maphash
> (lambda (group active)
> (when active
> - (insert (format "%s %d %d y\n"
> + (insert (format "%S %d %d y\n"
> (if full-names
> group
> (gnus-group-real-name group))
Looks reasonable to me -- definitely the cleanest solution. Do you have
push access? If not I can apply this in a bit.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42823: [PATCH] gnus-unplugged: nnimap (gmail) folder names having spaces not appearing
2020-09-19 15:36 ` Eric Abrahamsen
@ 2020-09-20 1:32 ` Ozhap
2020-09-23 23:08 ` Eric Abrahamsen
0 siblings, 1 reply; 8+ messages in thread
From: Ozhap @ 2020-09-20 1:32 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: 42823, Andreas Schwab
Eric Abrahamsen writes:
> Looks reasonable to me -- definitely the cleanest solution. Do you have
> push access? If not I can apply this in a bit.
No. Please do so. TIA.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#42823: [PATCH] gnus-unplugged: nnimap (gmail) folder names having spaces not appearing
2020-09-20 1:32 ` Ozhap
@ 2020-09-23 23:08 ` Eric Abrahamsen
0 siblings, 0 replies; 8+ messages in thread
From: Eric Abrahamsen @ 2020-09-23 23:08 UTC (permalink / raw)
To: Ozhap; +Cc: 42823, 42823-done, Andreas Schwab
On 09/20/20 07:02 AM, Ozhap wrote:
> Eric Abrahamsen writes:
>
>> Looks reasonable to me -- definitely the cleanest solution. Do you have
>> push access? If not I can apply this in a bit.
>
> No. Please do so. TIA.
There goes, I'm closing this now.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-09-23 23:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-12 7:02 bug#42823: 27.1; gnus-unplugged: nnimap (gmail) folder names having spaces not appearing ozhap
2020-08-12 16:57 ` Eric Abrahamsen
2020-09-19 4:57 ` bug#42823: [PATCH] " Ozhap
2020-09-19 7:08 ` Andreas Schwab
2020-09-19 7:45 ` Ozhap
2020-09-19 15:36 ` Eric Abrahamsen
2020-09-20 1:32 ` Ozhap
2020-09-23 23:08 ` 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).