Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Gnus] Summary buffer: simplicity itself

32 views
Skip to first unread message

ernobe

unread,
May 12, 2017, 12:28:58 AM5/12/17
to

For those who would like to try out the Gnus newsreader
(http://www.gnus.org) here is part of my configuration file for the summary buffer,
the window where the threaded topics appear:

(custom-set-variables
'(gnus-sum-thread-tree-false-root nil)
'(gnus-sum-thread-tree-indent " ")
'(gnus-sum-thread-tree-leaf-with-other " ")
'(gnus-sum-thread-tree-root nil)
'(gnus-sum-thread-tree-single-indent nil)
'(gnus-sum-thread-tree-single-leaf " ")
'(gnus-sum-thread-tree-vertical " |")
'(gnus-summary-line-format "%[%U%R%2i %d%] %B %(%f%)%*
"))

On Linux it looks great in the console, with the following settings.
The default settings for the graphic interface are OK.

(custom-set-faces
'(default ((t (:inherit nil :stipple nil :background "black" :foreground "goldenrod1" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight semi-bold :height 113 :width normal :foundry "unknown" :family "FreeMono"))))
'(gnus-summary-high-unread ((t (:foreground "green"))))
'(gnus-summary-low-read ((t (:foreground "magenta"))))
'(gnus-summary-normal-read ((t (:foreground "red"))))
'(gnus-summary-selected ((t (:background "yellow"))))
'(gnus-summary-normal-unread ((t (:foreground "white"))))
'(mode-line ((t (:foreground "green"))))
'(mode-line-inactive ((t (:foreground "white")))))

Here are some other settings to tweek the defaults. (You can add these
to "custom-set-variables" above).

'(gnus-always-force-window-configuration t)
'(gnus-ancient-mark 32)
'(gnus-article-mode-line-format "U%U %S" )
'(gnus-summary-mode-line-format "U%U %S" )
'(gnus-summary-thread-gathering-function (quote gnus-gather-threads-by-references))
'(gnus-thread-hide-subtree t)
'(gnus-thread-sort-functions (quote gnus-thread-sort-by-most-recent-date))
'(gnus-treat-hide-citation t)
'(gnus-unread-mark 42)

The window layout:

(gnus-add-configuration
'(article
(summary 1.0 point)
(article 1.0)))
(setq gnus-parameters
'((".*"
(display . all))))

This will create separate buffers for the article and the summary.
To navigate between them I use F1 and F2. Pressing return twice in the
summary will open a minibuffer with the article. All previous settings
can go in a file that is called from emacs with the -l option.

Keys F1 thru F12 in the main emacs configuration file, .emacs follows:

(global-set-key (kbd "<f1>") 'switch-to-prev-buffer)
(global-set-key (kbd "<f2>") 'switch-to-next-buffer)
(global-set-key (kbd "<f3>") 'other-window)
(global-set-key (kbd "<f4>") 'query-replace)
(global-set-key (kbd "<f5>") 'set-mark-command)
(global-set-key (kbd "<f6>") 'yank)
(global-set-key (kbd "<f7>") 'copy-region-as-kill)
(global-set-key (kbd "<f8>") 'kill-region)
(global-set-key (kbd "<f9>") 'kill-this-buffer)
(global-set-key (kbd "<f10>") 'find-file)
(global-set-key (kbd "<f11>") 'write-file)
(global-set-key (kbd "<f12>") 'my-kill-emacs)

F3 will switch between the summary and the article if they are in the
same window. F9 will kill buffers so you can switch directly between
the summary and article buffers (when they are separate windows). F12
kills emacs immediately unless you've edited something in a buffer (it
will ask to save it before exiting). It calls the my-kill-emacs
function, also in .emacs:

(defun my-kill-emacs ()
"save some buffers, then exit unconditionally"
(interactive)
(save-some-buffers nil t)
(kill-emacs))

For getting news and posting, I use slrnpull. So I have Gnus set up as
an offline newsreader. I've tried Gnus Agent, but haven't yet figured
out how to make it strictly a news fetcher-poster, without having it
connect to the net from Gnus.


--
https://archive.org/services/purl/bahai

ernobe

unread,
May 15, 2017, 11:53:54 AM5/15/17
to
ernobe <ern...@yahoo.com> writes:

> For those who would like to try out the Gnus newsreader
> (http://www.gnus.org) here is part of my configuration file for the summary buffer,
> the window where the threaded topics appear:
>
> (custom-set-variables
> '(gnus-sum-thread-tree-false-root nil)
> '(gnus-sum-thread-tree-indent " ")
> '(gnus-sum-thread-tree-leaf-with-other " ")
> '(gnus-sum-thread-tree-root nil)
> '(gnus-sum-thread-tree-single-indent nil)
> '(gnus-sum-thread-tree-single-leaf " ")
> '(gnus-sum-thread-tree-vertical " |")
> '(gnus-summary-line-format "%[%U%R%2i %d%] %B %(%f%)%*
> "))

If you want to have two extra spaces between the subject and the author,
and an extra space between the subject and everything before it, change
the above lines:

'(gnus-sum-thread-tree-leaf-with-other "")
'(gnus-sum-thread-tree-single-leaf "")
'(gnus-summary-line-format "%[%U%R%2i %d%] %B %(%f%)%*
"))


> On Linux it looks great in the console, with the following settings.
> The default settings for the graphic interface are OK.
>
> (custom-set-faces
> '(default ((t (:inherit nil :stipple nil :background "black" :foreground "goldenrod1" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight semi-bold :height 113 :width normal :foundry "unknown" :family "FreeMono"))))
> '(gnus-summary-high-unread ((t (:foreground "green"))))
> '(gnus-summary-low-read ((t (:foreground "magenta"))))
> '(gnus-summary-normal-read ((t (:foreground "red"))))
> '(gnus-summary-selected ((t (:background "yellow"))))
> '(gnus-summary-normal-unread ((t (:foreground "white"))))
> '(mode-line ((t (:foreground "green"))))
> '(mode-line-inactive ((t (:foreground "white")))))

To display the ancient low scored articles you'll need a brighter color:

'(gnus-summary-low-ancient ((t (:foreground "yellow"))))


> Here are some other settings to tweek the defaults. (You can add these
> to "custom-set-variables" above).
>
> '(gnus-always-force-window-configuration t)
> '(gnus-ancient-mark 32)
> '(gnus-article-mode-line-format "U%U %S" )
> '(gnus-summary-mode-line-format "U%U %S" )
> '(gnus-summary-thread-gathering-function (quote gnus-gather-threads-by-references))
> '(gnus-thread-hide-subtree t)
> '(gnus-thread-sort-functions (quote gnus-thread-sort-by-most-recent-date))
> '(gnus-treat-hide-citation t)
> '(gnus-unread-mark 42)
>

To not spend too much resources displaying news you aren't interested in
anyway, you can change the display (see below) and add the following to
the above:

'(gnus-fetch-old-headers t)


> The window layout:
>
> (gnus-add-configuration
> '(article
> (summary 1.0 point)
> (article 1.0)))
> (setq gnus-parameters
> '((".*"
> (display . all))))
>

The display can be changed to avoid getting all the news in large
groups:

(display . default)



--
https://archive.org/services/purl/bahai

ernobe

unread,
May 21, 2017, 9:38:37 PM5/21/17
to
ernobe <ern...@yahoo.com> writes:

> ernobe <ern...@yahoo.com> writes:
>
>> For those who would like to try out the Gnus newsreader
>> (http://www.gnus.org) here is part of my configuration file for the summary buffer,
>> the window where the threaded topics appear:
>>
>> (custom-set-variables
>> '(gnus-sum-thread-tree-false-root nil)
>> '(gnus-sum-thread-tree-indent " ")
>> '(gnus-sum-thread-tree-leaf-with-other " ")
>> '(gnus-sum-thread-tree-root nil)
>> '(gnus-sum-thread-tree-single-indent nil)
>> '(gnus-sum-thread-tree-single-leaf " ")
>> '(gnus-sum-thread-tree-vertical " |")
>> '(gnus-summary-line-format "%[%U%R%2i %d%] %B %(%f%)%*
>> "))
>
> If you want to have two extra spaces between the subject and the author,
> and an extra space between the subject and everything before it, change
> the above lines:
>
> '(gnus-sum-thread-tree-leaf-with-other "")
> '(gnus-sum-thread-tree-single-leaf "")
> '(gnus-summary-line-format "%[%U%R%2i %d%] %B %(%f%)%*
> "))

For even better visuals of the connections, try

'(gnus-summary-line-format "%[%U%R%2i%] %B |_%(%f%)%*
")

Also, I was able to get the Agent working offline. For some reason
setting the gnus-select-method to nntp doesn't work. The only thing
that does it for me is setting gnus-nntp-server, gnus-agent, and calling
gnus with gnus-unplugged:

(setq gnus-nntp-server "news.eternal-september.org")
(setq gnus-agent t)
(gnus-unplugged)


--
https://archive.org/services/purl/bahai

ernobe

unread,
Jun 6, 2017, 8:20:33 PM6/6/17
to
ernobe <ern...@yahoo.com> writes:

>
> Also, I was able to get the Agent working offline. For some reason
> setting the gnus-select-method to nntp doesn't work. The only thing
> that does it for me is setting gnus-nntp-server, gnus-agent, and calling
> gnus with gnus-unplugged:
>
> (setq gnus-nntp-server "news.eternal-september.org")
> (setq gnus-agent t)
> (gnus-unplugged)

Apparently my problem was with the .newsrc and .newsrc.eld files.
I started with new ones and was able to set gnus-select-method to nntp and
work offline.


--
https://archive.org/services/purl/bahai
0 new messages