Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: info-gnus-english@gnu.org
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	[thread overview]
Message-ID: <87k34ro7e7.fsf@debian.uxu> (raw)
In-Reply-To: <mailman.9535.1411612827.1147.info-gnus-english@gnu.org>

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

  parent reply	other threads:[~2014-09-25 18:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.9530.1411603532.1147.info-gnus-english@gnu.org>
2014-09-25  0:48 ` Emanuel Berg
2014-09-25  2:09   ` Brady Trainor
     [not found]   ` <mailman.9535.1411612827.1147.info-gnus-english@gnu.org>
2014-09-25 18:57     ` Emanuel Berg [this message]
2014-09-25 19:13     ` Emanuel Berg
2014-09-24 23:30 Brady Trainor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k34ro7e7.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).