unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* [Gnus] Summary buffer: simplicity itself
@ 2017-05-12  4:26 ernobe
  2017-05-12 10:26 ` Emanuel Berg
  2017-05-15 15:53 ` ernobe
  0 siblings, 2 replies; 5+ messages in thread
From: ernobe @ 2017-05-12  4:26 UTC (permalink / raw)
  To: help-gnu-emacs


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


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

* Re: [Gnus] Summary buffer: simplicity itself
  2017-05-12  4:26 [Gnus] Summary buffer: simplicity itself ernobe
@ 2017-05-12 10:26 ` Emanuel Berg
  2017-05-15 15:53 ` ernobe
  1 sibling, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2017-05-12 10:26 UTC (permalink / raw)
  To: help-gnu-emacs

ernobe wrote:

> For those who would like to try out the Gnus
> newsreader (http://www.gnus.org) here is part
> of my configuration file [ ... cut several
> pages of configs ]

I wonder if this really is a good speech to
groom people into Gnus...? :)

> On Linux it looks great in the console

You got a screenshot? Here is my Gnus
Group buffer [1] and more Gnus dumps and
source [2].

Here is some Elisp to take console dumps from
Emacs:

    (defun dump (file)
      (interactive "s Description: ")
      (message nil)
      (shell-command (format "sudo fbgrab ~/%s.png" file)))

(The third line is the most important.)

fbgrab(1) is probably in your repos, at least
if you use Debian or one of the derivatives...

> This will create separate buffers for the
> article and the summary. To navigate between
> them I use F1 and F2.

F1 and F2 work in the console according to
showkey(1) but they are nonresponsive in
a console Emacs without rewiring. Perhaps your
are in a terminal emulator in X with
'enacs --nw'? Actually it is much the same.
Anyhow the function kyes are not good.
Especially for routine tasks. Too far from
typing position which is asdf (left) and jkl;
(right). Minimal reach, no reset.

OK, so then, in X you can use gnome-screenshot
and many other tools. (You don't need Gnome to
use it.)

> (global-set-key (kbd "<f1>")
> 'switch-to-prev-buffer)

You can write that as:

    (global-set-key [f1] #'switch-to-prev-buffer)

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

I have something like that as well [3]:

    (defun mute-kill-warnings ()
      (dolist (p (process-list))
        (set-process-query-on-exit-flag p nil) ))

    (defun kill-everything ()
      (gnus-kill-if-runs)
      (mute-kill-warnings) )

    (defun emacs-quit-no-confirm ()
      (interactive)
      (kill-everything)
      (save-buffers-kill-terminal t) ) ; silently save ... kill
    (defalias 'quit       'emacs-quit-no-confirm)
    (defalias 'quit-emacs 'emacs-quit-no-confirm)
    (defalias 'emacs-quit 'emacs-quit-no-confirm)

    (define-key (current-global-map)
      [remap save-buffers-kill-terminal] #'emacs-quit-no-confirm)

[1] http://user.it.uu.se/~embe8573/figures/gnus/gnus-group.png
[2] http://user.it.uu.se/~embe8573/gnus/index.html
[3] http://user.it.uu.se/~embe8573/conf/emacs-init/quit.el

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: [Gnus] Summary buffer: simplicity itself
  2017-05-12  4:26 [Gnus] Summary buffer: simplicity itself ernobe
  2017-05-12 10:26 ` Emanuel Berg
@ 2017-05-15 15:53 ` ernobe
  2017-05-22  1:37   ` ernobe
  1 sibling, 1 reply; 5+ messages in thread
From: ernobe @ 2017-05-15 15:53 UTC (permalink / raw)
  To: help-gnu-emacs

ernobe <ernobe@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


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

* Re: [Gnus] Summary buffer: simplicity itself
  2017-05-15 15:53 ` ernobe
@ 2017-05-22  1:37   ` ernobe
  2017-06-06 18:02     ` ernobe
  0 siblings, 1 reply; 5+ messages in thread
From: ernobe @ 2017-05-22  1:37 UTC (permalink / raw)
  To: help-gnu-emacs

ernobe <ernobe@yahoo.com> writes:

> ernobe <ernobe@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


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

* Re: [Gnus] Summary buffer: simplicity itself
  2017-05-22  1:37   ` ernobe
@ 2017-06-06 18:02     ` ernobe
  0 siblings, 0 replies; 5+ messages in thread
From: ernobe @ 2017-06-06 18:02 UTC (permalink / raw)
  To: help-gnu-emacs

ernobe <ernobe@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


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

end of thread, other threads:[~2017-06-06 18:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-12  4:26 [Gnus] Summary buffer: simplicity itself ernobe
2017-05-12 10:26 ` Emanuel Berg
2017-05-15 15:53 ` ernobe
2017-05-22  1:37   ` ernobe
2017-06-06 18:02     ` ernobe

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