info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Article buffer, C-c C-f doesn't work, though it's reported in C-h b


From: Emanuel Berg
Subject: Re: Article buffer, C-c C-f doesn't work, though it's reported in C-h b
Date: Thu, 25 Sep 2014 20:57:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Brady Trainor <algebrat@uw.edu> writes:

> C-c C-f is not bound in Article buffer

Then it is only confusing that it turns up on `C-h b'
from an article.

> (so `G G' in Group buffer to search).

What? :)

> (eval-after-load "gnus-art" '(define-key
> gnus-article-mode-map "\C-c\C-f" "Som"))

Minor issue - if you use Gnus every day, I don't see
any advantage of putting it on hold like that. Instead,

(require 'gnus)
(require 'gnus-art)

; other Gnus and article setup/configuration/extenstion

(let ((the-map gnus-article-mode-map))
  (define-key the-map "\C-c\C-f" 'gnus-summary-mail-forward)
  ; more keybindings for `the-map'
  )

Major issue - Why bind one key sequence to another key
sequence? Instead, bind it to gnus-summary-mail-forward
as in my example!

The reason why it is done like that (the "Som" hack) is
that eval-after-load only mentions gnus-art - i.e.,
when gnus-art is loaded, gnus-summary-mail-forward may
not be, which will be an error.

So to solve both those issues at once, just load Gnus
in your init files and set it up safe-and-sound with no
worries.

> (defun gnus-article-mail-forward (&optional arg
> post) "Invoke `gnus-summary-mail-forward' from the
> article buffer." (interactive "P")
> (gnus-article-check-buffer) (with-current-buffer
> gnus-article-current-summary
> (gnus-summary-mail-forward arg post)))

OK, so that is an interface to
gnus-summary-mail-forward which takes into account that
it is invoked from an article. What I can see, it
worked fine just to bind it to
`gnus-summary-mail-forward', but those checks and
balances obviously do something - something useful...

> (eval-after-load "gnus-art" '(define-key
> gnus-article-mode-map "\C-c\C-f"
> gnus-article-mail-forward))

Indeed, as that defun is made available (in some init
file, again) it can be put explicitly in the binding.
However I still like my method more - load everything
first thing. But yes, the above solution should be
equivalent in all that matters...

-- 
underground experts united


reply via email to

[Prev in Thread] Current Thread [Next in Thread]