Gnus development mailing list
 help / color / mirror / Atom feed
From: sigurd@12move.de (Karl Pflästerer)
Subject: Proposed patch (was: Better definition for `gnus-article-refer-article')
Date: Fri, 21 Feb 2003 18:59:59 +0100	[thread overview]
Message-ID: <m3of55tt40.fsf@hamster.pflaesterer.de> (raw)
In-Reply-To: <m3smujums4.fsf@hamster.pflaesterer.de>

[-- Attachment #1: Type: text/plain, Size: 140 bytes --]

On Thu, 20 Feb 2003, Karl Pflästerer <- sigurd@12move.de wrote:

As noone yells I think I'll propose a patch for `gnus-art.el'. Here it
is:

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch for gnus-art.el --]
[-- Type: text/x-patch, Size: 1273 bytes --]

Index: gnus-art.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v
retrieving revision 6.298
diff -u -r6.298 gnus-art.el
--- gnus-art.el	21 Feb 2003 13:35:05 -0000	6.298
+++ gnus-art.el	21 Feb 2003 18:09:13 -0000
@@ -4772,15 +4772,15 @@
 (defun gnus-article-refer-article ()
   "Read article specified by message-id around point."
   (interactive)
-  (let ((point (point)))
-    (search-forward ">" nil t)		;Move point to end of "<....>".
-    (if (re-search-backward "\\(<[^<> \t\n]+>\\)" nil t)
-	(let ((message-id (gnus-replace-in-string (match-string 1) "<news:" "<" )))
-	  (goto-char point)
-	  (set-buffer gnus-summary-buffer)
-	  (gnus-summary-refer-article message-id))
-      (goto-char (point))
-      (error "No references around point"))))
+  (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")))))
 
 (defun gnus-article-show-summary ()
   "Reconfigure windows to show summary buffer."

[-- Attachment #3: Type: text/plain, Size: 325 bytes --]


Please tell me if you also need something for the changelog.

bye
   KP

-- 
Der wahre Weltuntergang ist die Vernichtung des Geistes, der andere hängt von
dem gleichgiltigen Versuch ab, ob nach der Vernichtung des Geistes noch eine
Welt bestehen kann.
                   Karl Kraus 'Untergang der Welt durch schwarze Magie'

  reply	other threads:[~2003-02-21 17:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-19 21:41 Better definition for `gnus-article-refer-article' Karl Pflästerer
2003-02-20 10:06 ` Kai Großjohann
2003-02-20 13:08   ` Karl Pflästerer
2003-02-21 17:59     ` Karl Pflästerer [this message]
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=m3of55tt40.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).