From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/50196 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Better definition for `gnus-article-refer-article' Date: Thu, 20 Feb 2003 11:06:52 +0100 Organization: University of Duisburg, Germany Sender: owner-ding@hpc.uh.edu Message-ID: <84isvfe05f.fsf@lucy.is.informatik.uni-duisburg.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1045735710 19411 80.91.224.249 (20 Feb 2003 10:08:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2003 10:08:30 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18lncz-00052x-00 for ; Thu, 20 Feb 2003 11:08:29 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18lncd-0000Kx-00; Thu, 20 Feb 2003 04:08:07 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 20 Feb 2003 04:09:06 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id EAA22873 for ; Thu, 20 Feb 2003 04:08:54 -0600 (CST) Original-Received: (qmail 20530 invoked by alias); 20 Feb 2003 10:07:50 -0000 Original-Received: (qmail 20525 invoked from network); 20 Feb 2003 10:07:50 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by 66.230.238.6 with SMTP; 20 Feb 2003 10:07:50 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 18lnpk-0006g4-00 for ; Thu, 20 Feb 2003 11:21:40 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 30 Original-NNTP-Posting-Host: lucy.is.informatik.uni-duisburg.de Original-X-Trace: quimby.gnus.org 1045736500 25070 134.91.35.216 (20 Feb 2003 10:21:40 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 20 Feb 2003 10:21:40 GMT User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 Cancel-Lock: sha1:dcsvHsvaLzvxl1fKmpWbxmIImUU= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:50196 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:50196 sigurd@12move.de (Karl Pflästerer) writes: > I noticed that the buttons react at the moment smarter if you press them > at a message-id in the article buffer than `gnus-article-refer-article'. > I looked at the definition for that function and wrote it a bit > different. What do you mean? IMO I must have forgotten something because > it seems to easy. I don't think it's necessary to check if we have a > message-id around point because a user would only use that function for > a message-id. > > (defun gnus-article-refer-article () > "Read article specified by message-id around point." > (interactive) > (let ((point (point)) message-id) > (re-search-backward " (cond ((re-search-forward gnus-button-mid-or-mail-regexp nil t) > (setq message-id (concat "<" (match-string 0) ">")) > (goto-char point) > (set-buffer gnus-summary-buffer) > (gnus-summary-refer-article message-id)) > (t > (goto-char point) > (error "No references around point"))))) In principle, it's a good idea. There could be a problem, though. Have you tried it on buttons looking like ? I think it might set message-id to something like <> -- one set of angle brackets too many. -- A preposition is not a good thing to end a sentence with.