Gnus development mailing list
 help / color / mirror / Atom feed
* The current state of gnus-cloud
@ 2022-03-05 15:50 Steinar Bang
  2024-01-08 13:11 ` Steinar Bang
  0 siblings, 1 reply; 8+ messages in thread
From: Steinar Bang @ 2022-03-05 15:50 UTC (permalink / raw)
  To: ding

Just a summary of my experiences in using gnus-cloud.

As a recap: gnus-cloud adds IMAP-like capabilities to Gnus nntp groups:
you can see the same read, unread/ticket and replied to messages from
different gnus instances.

In addition gnus-cloud can sync the gnus config (which I don't want,
since both ~/.emacs and ~/.gnus.el are git-versioned for me, with one
branch per client), and the gnus score files.

I'm currently running gnus-cloud on two separate machines, a debian
GNU/linux desktop, and a windows 10 laptop.

This works well for the read mark sync, not so well for the file sync
(more detail below) and has an annoying effect in that the nnimap server
used for sync can't use the gnus agent (this affects both the performace
for reading nnimap groups and connectivity for the laptop. I have to
manually enter the server buffer and open the nnimap server after a
laptop sleep).

I'm running emacs 27 on both machines.

The gnus-cloud delivered with the gnus of emacs 27, doesn't work well,
so what I've done, is:
 1. Fork the emacs-27 git branch [1]
 2. Replace gnus-cloud.el in the branch with the emacs 28 version of
    gnus-cloud.el [2] 
 3. Add the gnus directory of the forked emacs 27, with gnus-cloud.el
    replaced to the load-path [3]
 4. Fix an incompatibility with emacs-27 in gnus-cloud.el [4]
 5. Make file sync of gnus-cloud.el tolerant of trying to sync multiple
    deltas, by allowing the overwrite of existing backup files [5]

In my config I have changed storage encoding from the default EPG to "no
encoding", which was the only one I could make work.

I've also switched off config sync, since my config is git versioned:

 (setq gnus-cloud-storage-method nil)
 (setq gnus-cloud-synced-files '((:directory "~/News" :match ".*.SCORE\\'")))

On the windows client, I ended up disabling file sync completely since
the emacs rename function fails on file names with ":" in them, and the
score files contains ":" as part of their file name[6][7] (the emacs
rename function is used to move the existing file to a backup file
before copying in the synced file):

 (setq gnus-cloud-storage-method nil)
 (setq gnus-cloud-synced-files nil)

References:
[1] <https://github.com/steinarb/emacs-gnus-cloud-sb/tree/emacs-27-with-gnus-cloud-from-emacs-28>
[2] <https://github.com/steinarb/emacs-gnus-cloud-sb/commit/a33240a8145edcf1341bfd35498d81021f399c74>
[3] <https://gist.github.com/steinarb/fd844fca4d0627b2a9efa2fd46cdf1ad>
[4] <https://github.com/steinarb/emacs-gnus-cloud-sb/commit/a33240a8145edcf1341bfd35498d81021f399c74>
[5] <https://github.com/steinarb/emacs-gnus-cloud-sb/commit/a507db488fc0a5761111e618956740b80301418c>
[6] <https://lists.gnu.org/archive/html/help-gnu-emacs/2022-02/msg00282.html>
[7] <https://lists.gnu.org/archive/html/help-gnu-emacs/2022-02/msg00286.html>



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

* Re: The current state of gnus-cloud
  2022-03-05 15:50 The current state of gnus-cloud Steinar Bang
@ 2024-01-08 13:11 ` Steinar Bang
  2024-01-13 15:16   ` John Haman
  2024-01-13 22:34   ` John Haman
  0 siblings, 2 replies; 8+ messages in thread
From: Steinar Bang @ 2024-01-08 13:11 UTC (permalink / raw)
  To: ding

I'm trying to use gnus-cloud on emacs 29 on a new windows laptop.

First hurdle:
gnus-cloud sync fails because it can't overwrite ~ backup files.

I cloned the emacs git repository, made a branch off the emacs-29 branch
and cherry picked my fix from a similar emacs 28 branch (made in june
2023)
 https://github.com/steinarb/emacs-gnus-cloud-sb/commit/e48bb24270f93e40192b18dcead2f95190e1b1a4

Then byte compiled the gnus and restarted emacs (I have
~/git/emacs/lisp/gnus in the load-path).

The new branch is here: https://github.com/steinarb/emacs-gnus-cloud-sb/tree/emacs-29-with-gnus-cloud-mods

Second hurdle: gnus sync fails because it can't handle files with ":" in
their names on Windows. Stack trace here:
 https://gist.github.com/steinarb/8806d9ac18f00a4504eb00ece117c0bf

I have the following setting in ~/.emacs:
 (setq gnus-cloud-synced-files '((:directory "~/News" :match ".*.SCORE\\'"))

I have tried to make it more restrictive to exclude file names
containing ":" but I get the same error:
 (setq gnus-cloud-synced-files '((:directory "~/News" :match "[^:]*\\.SCORE\\'"))

Ideas?

Thanks!


- Steinar



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

* Re: The current state of gnus-cloud
  2024-01-08 13:11 ` Steinar Bang
@ 2024-01-13 15:16   ` John Haman
  2024-01-13 22:34   ` John Haman
  1 sibling, 0 replies; 8+ messages in thread
From: John Haman @ 2024-01-13 15:16 UTC (permalink / raw)
  To: ding

I don't really know how to help with your gnus-cloud issues. I'd just mention that I use Syncthing to sync my newsrc.eld and score files between my Windows, Mac, and Linux computers, and it works great.


-- 
Dr. John Haman
Maryland, USA



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

* Re: The current state of gnus-cloud
  2024-01-08 13:11 ` Steinar Bang
  2024-01-13 15:16   ` John Haman
@ 2024-01-13 22:34   ` John Haman
  2024-01-15 15:54     ` Steinar Bang
  1 sibling, 1 reply; 8+ messages in thread
From: John Haman @ 2024-01-13 22:34 UTC (permalink / raw)
  To: ding

Steinar Bang <sb@dod.no> writes:

> Second hurdle: gnus sync fails because it can't handle files with ":" in
> their names on Windows. Stack trace here:
>  https://gist.github.com/steinarb/8806d9ac18f00a4504eb00ece117c0bf

I use the following in my gnus.el

;;; Colon is illegal on Windows filesystem
  (setq nnheader-file-name-translation-alist '((?: . ?_)))

now, no colons in score files.

-- 
Dr. John Haman
Maryland, USA


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

* Re: The current state of gnus-cloud
  2024-01-13 22:34   ` John Haman
@ 2024-01-15 15:54     ` Steinar Bang
  2024-01-17  7:24       ` Steinar Bang
  0 siblings, 1 reply; 8+ messages in thread
From: Steinar Bang @ 2024-01-15 15:54 UTC (permalink / raw)
  To: ding

>>>>> John Haman <mail@johnhaman.org>:

> Steinar Bang <sb@dod.no> writes:
>> Second hurdle: gnus sync fails because it can't handle files with ":" in
>> their names on Windows. Stack trace here:
>> https://gist.github.com/steinarb/8806d9ac18f00a4504eb00ece117c0bf

> I use the following in my gnus.el

> ;;; Colon is illegal on Windows filesystem
>   (setq nnheader-file-name-translation-alist '((?: . ?_)))

> now, no colons in score files.

Thanks for the tip!

Didn't help, unfortunately. :-/

Looks like the above translation (i.e. from ascii 58 to ascii 95) was
part of the original value of nnheader-file-name-translation-alist on a
windows emacs:

nnheader-file-name-translation-alist is a variable defined in ‘nnheader.el’.

Its value is shown below.
[snip!]
Value: ((58 . 95))
Original value was 
((58 . 95)
 (42 . 95)
 (34 . 95)
 (60 . 95)
 (62 . 95)
 (63 . 95))



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

* Re: The current state of gnus-cloud
  2024-01-15 15:54     ` Steinar Bang
@ 2024-01-17  7:24       ` Steinar Bang
  2024-01-21 19:32         ` Andy Moreton
  0 siblings, 1 reply; 8+ messages in thread
From: Steinar Bang @ 2024-01-17  7:24 UTC (permalink / raw)
  To: ding

For now, this is what I've done in my ~/.emacs:

(when windows-emacs
  (setq gnus-cloud-synced-files nil))


And windows-emacs is an oldie that has been with me since the 1990-ies:

(defvar windows-emacs (string-match "mingw" (emacs-version))
  "Hold a numerical value if this is an Emacs running on Windows, and
nil if this isn't windows")

(git blame says 2004 but I think maybe it lies a little bit here. But at
least windows-emacs has been in the samme spot since 2004... (and git
didn't exist in 2004 you may say...? Correct! But cvs existed then, and
RCS before that. My home directory has gone from individual file RCS
versioning, to CVS (I just moved the RCS files of one computer into a
CVS repo) and then turned that into svn with very complex branch
tracking in the mid-late noughts, before I finally landed on git in 2010
(I think...?)))



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

* Re: The current state of gnus-cloud
  2024-01-17  7:24       ` Steinar Bang
@ 2024-01-21 19:32         ` Andy Moreton
  2024-01-24 17:51           ` Steinar Bang
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Moreton @ 2024-01-21 19:32 UTC (permalink / raw)
  To: ding

On Wed 17 Jan 2024, Steinar Bang wrote:

> For now, this is what I've done in my ~/.emacs:
>
> (when windows-emacs
>   (setq gnus-cloud-synced-files nil))
>

You could use (when (eq system-type 'windows-nt).

    AndyM



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

* Re: The current state of gnus-cloud
  2024-01-21 19:32         ` Andy Moreton
@ 2024-01-24 17:51           ` Steinar Bang
  0 siblings, 0 replies; 8+ messages in thread
From: Steinar Bang @ 2024-01-24 17:51 UTC (permalink / raw)
  To: ding

>>>>> Andy Moreton <andrewjmoreton@gmail.com>:

> You could use (when (eq system-type 'windows-nt).

Thanks!

Maybe I'll switch.



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

end of thread, other threads:[~2024-01-24 17:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-05 15:50 The current state of gnus-cloud Steinar Bang
2024-01-08 13:11 ` Steinar Bang
2024-01-13 15:16   ` John Haman
2024-01-13 22:34   ` John Haman
2024-01-15 15:54     ` Steinar Bang
2024-01-17  7:24       ` Steinar Bang
2024-01-21 19:32         ` Andy Moreton
2024-01-24 17:51           ` Steinar Bang

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 NNTP newsgroup(s).