From: sigurd@12move.de (Karl Pflästerer)
Subject: Re: Better definition for `gnus-article-refer-article'
Date: Thu, 20 Feb 2003 14:08:43 +0100 [thread overview]
Message-ID: <m3smujums4.fsf@hamster.pflaesterer.de> (raw)
In-Reply-To: <84isvfe05f.fsf@lucy.is.informatik.uni-duisburg.de>
Kai Großjohann <- kai.grossjohann@uni-duisburg.de wrote:
> In principle, it's a good idea. There could be a problem, though.
> Have you tried it on buttons looking like <foo@bar.baz>? I think it
Yes.
> might set message-id to something like <<foo@bar.baz>> -- one set of
> angle brackets too many.
No that doesn't happen. I have another IMO better definition of the
function here. I think it is enough to search on the line where point
is.
(defun gnus-article-refer-article ()
"Read article specified by message-id around point."
(interactive)
(save-excursion
(re-search-backward "<?news:\\|<" (point-at-bol) t)
(cond ((re-search-forward
gnus-button-mid-or-mail-regexp (point-at-eol) t)
(let ((msg-id (concat "<" (match-string 0) ">")))
(set-buffer gnus-summary-buffer)
(gnus-summary-refer-article msg-id)))
(t
(error "No references around point")))))
A check for already existing angle brackets would be possible but IMO it
is not necessary. I tried some message ids and saw no expresssion where
there brackets get caught by `match-string'.
bye
KP
--
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe;
All mimsy were the borogoves,
And the mome raths outgrabe. "Lewis Carroll" "Jabberwocky"
next prev parent reply other threads:[~2003-02-20 13:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-19 21:41 Karl Pflästerer
2003-02-20 10:06 ` Kai Großjohann
2003-02-20 13:08 ` Karl Pflästerer [this message]
2003-02-21 17:59 ` Proposed patch (was: Better definition for `gnus-article-refer-article') Karl Pflästerer
2003-02-21 21:12 ` Proposed patch Kai Großjohann
2003-02-21 21:58 ` Karl Pflästerer
2003-03-01 22:48 ` Jesper Harder
2003-02-21 22:02 ` Karl Pflästerer
2003-02-22 10:38 ` Kai Großjohann
2003-02-22 13:31 ` Kai Großjohann
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=m3smujums4.fsf@hamster.pflaesterer.de \
--to=sigurd@12move.de \
/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).