Gnus development mailing list
 help / color / mirror / Atom feed
* Separating gnus-no-server and startup level
@ 2012-11-04  7:53 Jarmo Hurri
  0 siblings, 0 replies; only message in thread
From: Jarmo Hurri @ 2012-11-04  7:53 UTC (permalink / raw)
  To: ding


Greetings.

Because I occasionally need to start gnus without any connection to the
network, and because I can not tell which source would be my primary, I
have for some time already defined all of my groups by using secondary
select methods. As a consequence, I always start gnus by
(gnus-no-server).

I recently needed to change the levels of my groups so that my imaps are
level 1, nntps are level 2 and nnfolders are level 3. Everything else
worked just fine, except that I could not get my nnfolders to appear at
startup, which caused additional problems when sending messages (gnus
was unable to find the nnfolder where the Gcc was supposed to go).

So I tried this and that setting, until I tracked the "problem" to this
function:

;; --------------------------------------------------------------------
(defun gnus-no-server-1 (&optional arg slave)
  "Read network news.
If ARG is a positive number, Gnus will use that as the startup
level.  If ARG is nil, Gnus will be started at level 2
\(`gnus-level-default-subscribed' minus one).  If ARG is non-nil
and not a positive number, Gnus will prompt the user for the name
of an NNTP server to use.  As opposed to \\[gnus], this command
will not connect to the local server."
  (interactive "P")
  (let ((val (or arg (1- gnus-level-default-subscribed))))
    (gnus val t slave)
    (make-local-variable 'gnus-group-use-permanent-levels)
    (setq gnus-group-use-permanent-levels val)))
;; --------------------------------------------------------------------

So gnus-no-server starts gnus at level 2, and that is why I do not see
my nnfolders. The binding of no-server and startup level seems to be for
historical reasons; it seems that a large number of users are used to
reading their mail this way:
http://comments.gmane.org/gmane.emacs.gnus.general/11479

The problem with the only current working "solution" - setting
gnus-level-default-subscribed - is that, first, it messes the value of
that variable and, second, gnus-group-use-permanent-levels is still set,
which affects the visibility of groups.

I think that there should be a way to specify that the starting level
and starting without a server are independent of each other.

[One way out would be to define a function / key that calls
gnus-no-server with argument 3. This, however, does not work for me,
because I also launch gnus-no-server directly from org-mode (they were
kind enough to accept a patch for doing this); this is done by a direct
call to gnus-no-server, without any arguments.]

I suggest two changes:

1. Since gnus-no-server needs to be started at level 2 for legacy
   reasons, but there seems to be more than one person who would want it
   to start with the default level setup, could we not have a boolean
   variable for this?  Something like

   gnus-no-server-startup-level-default-subscribed-minus-1

   (or something more concise) whose default value would be t for legacy
   reasons. Setting this to nil would mean that gnus-no-server would not
   enforce a startup level, nor would it set
   gnus-group-use-permanent-levels. This would imply minor changes in
   gnus-no-server-1.

2. Future generations might appreciate it if someone would add a little
   warning text about gnus-no-server in the manual in section "Group
   Levels", where the display of groups is described otherwise.

If you accept these ideas, I can make a patch for them. (I have FSF
assigment for Emacs.)

All the best.

--

Jarmo




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-04  7:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-04  7:53 Separating gnus-no-server and startup level Jarmo Hurri

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).