* Starting gnus with desktop-mode
@ 2021-05-21 15:29 Valtteri Vuorikoski
2022-11-16 4:30 ` TRS-80
0 siblings, 1 reply; 3+ messages in thread
From: Valtteri Vuorikoski @ 2021-05-21 15:29 UTC (permalink / raw)
To: ding
I use desktop-mode to save the state of my emacs "desktop". However,
gnus is not relaunched if it was active when the desktop was saved. I
tried adding gnus-group-mode to desktop-buffer-mode-handlers but this
had no apparent effect.
Search engines mostly hit questions about gnus and desktop
notifications and I couldn't find anything about this. Does anyone
have suggestions?
I'm running gnus shipped with GNU Emacs 27.2.50 (build 1,
x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0) of 2021-05-09.
-Valtteri
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Starting gnus with desktop-mode
2021-05-21 15:29 Starting gnus with desktop-mode Valtteri Vuorikoski
@ 2022-11-16 4:30 ` TRS-80
2022-11-17 19:27 ` Björn Bidar
0 siblings, 1 reply; 3+ messages in thread
From: TRS-80 @ 2022-11-16 4:30 UTC (permalink / raw)
To: ding
Valtteri Vuorikoski <vuori@notcom.org> writes:
> I use desktop-mode to save the state of my emacs "desktop". However,
> gnus is not relaunched if it was active when the desktop was saved. I
> tried adding gnus-group-mode to desktop-buffer-mode-handlers but this
> had no apparent effect.
>
> Search engines mostly hit questions about gnus and desktop
> notifications and I couldn't find anything about this. Does anyone
> have suggestions?
>
> I'm running gnus shipped with GNU Emacs 27.2.50 (build 1,
> x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0) of 2021-05-09.
>
> -Valtteri
>
I realize the message is old, but I have been reading back through the
archive (in reverse chronological order), and it looks like you never
received an answer.
My thoughts are that Gnus likely pre-dates `desktop-mode' and also works
by way of some quite unique (archaic?) functionality. She's a strange
(and wonderful!) beast, at least that's my current point of view.
Anyway, I think that Gnus likely requires some special handling for your
use-case. But maybe you figured that out by now.
Cheers,
TRS-80
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Starting gnus with desktop-mode
2022-11-16 4:30 ` TRS-80
@ 2022-11-17 19:27 ` Björn Bidar
0 siblings, 0 replies; 3+ messages in thread
From: Björn Bidar @ 2022-11-17 19:27 UTC (permalink / raw)
To: TRS-80; +Cc: ding
TRS-80 <lists.trs-80@isnotmyreal.name> writes:
> My thoughts are that Gnus likely pre-dates `desktop-mode' and also works
> by way of some quite unique (archaic?) functionality. She's a strange
> (and wonderful!) beast, at least that's my current point of view.
>
> Anyway, I think that Gnus likely requires some special handling for your
> use-case. But maybe you figured that out by now.
I think this could be done by adding handlers for Gnus to
desktop-buffer-mode-handlers.
For example this is how it could be done for Elfeed:
;; Desktop Save
(defun elfeed-search-desktop-save (_desktop-dirname)
"Save the state of the current elfeed-search buffer so that it
may be restored as part of a saved desktop. Also save the state
of the db for when `desktop-auto-save-timeout' is enabled."
(elfeed-db-save)
elfeed-search-filter)
;;;###autoload
(defun elfeed-search-desktop-restore (_file-name _buffer-name search-filter)
"Restore the state of an elfeed-search buffer on desktop restore."
(elfeed)
(elfeed-search-set-filter search-filter)
(current-buffer))
;;;###autoload
(add-to-list 'desktop-buffer-mode-handlers
'(elfeed-search-mode . elfeed-search-desktop-restore))
Source:
https://github.com/groks/elfeed/commit/6f3d4fbd08cad4648f51bff1c74b533bc4177939
Of course doing that Gnus is probably a bit more complicated.
Br,
Björn
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-17 19:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 15:29 Starting gnus with desktop-mode Valtteri Vuorikoski
2022-11-16 4:30 ` TRS-80
2022-11-17 19:27 ` Björn Bidar
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).