From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46530 Path: main.gmane.org!not-for-mail From: Alex Schroeder Newsgroups: gmane.emacs.gnus.general Subject: finding the article buffer when splitting Date: Fri, 13 Sep 2002 18:18:01 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: <873csdrhhi.fsf_-_@emacswiki.org> References: <03bs7em0a4.fsf@msgid.viggen.net> <03y9ahlu15.fsf@msgid.viggen.net> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031933837 1157 127.0.0.1 (13 Sep 2002 16:17:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 13 Sep 2002 16:17:17 +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 17pt86-0000IQ-00 for ; Fri, 13 Sep 2002 18:17:15 +0200 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 17pt6l-0000qO-00; Fri, 13 Sep 2002 11:15:51 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 13 Sep 2002 11:16:28 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id LAA17329 for ; Fri, 13 Sep 2002 11:16:14 -0500 (CDT) Original-Received: (qmail 27575 invoked by alias); 13 Sep 2002 16:15:31 -0000 Original-Received: (qmail 27570 invoked from network); 13 Sep 2002 16:15:31 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 13 Sep 2002 16:15:31 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 17pti9-0001Kw-00 for ; Fri, 13 Sep 2002 18:54:29 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 33 Original-NNTP-Posting-Host: dclient217-162-239-98.hispeed.ch Original-X-Trace: quimby.gnus.org 1031936069 5141 217.162.239.98 (13 Sep 2002 16:54:29 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 13 Sep 2002 16:54:29 GMT X-Face: ^BC$`[IcggstLPyen&dqF+b2'zyK#r.mU*'Nms}@&4zw%SJ#5!/7SMVjBS7'lb;QK)|IPU5U'o1'522W4TyzB3Ab*IBo^iw]l4|kUbdZuUDO6=Um-.4IzhNiV'B"@K#jy_(wW|Zbk[34flKY^|PrQ?$u2\fKg^]AY>wOX#H32i User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.90 (i686-pc-linux-gnu) Cancel-Lock: sha1:lgGLob2BGjSpCko06AQRQouQ3Yo= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46530 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46530 jhbrown@ai.mit.edu (Jeremy H. Brown) writes: > (defadvice nnmail-article-group (around name-article-buffer (&rest args)) > "name the article buffer for use in fancy splits" > (let ((the-article-buffer (current-buffer))) > ad-do-it)) > > (ad-activate-regexp "name-article-buffer") Is anything like that going to be in Gnus? This seems to be really easy to implement. Otherwise, we might consider adding the following macro: (defmacro with-article-buffer (&rest body) "Make the article buffer current while executing BODY. This is useful when splitting mail with `nnmail-split-fancy'. The article buffer is stored either in `gnus-original-article-buffer' or `nnmail-article-buffer'." `(save-excursion (cond ((and (boundp 'gnus-original-article-buffer) (gnus-buffer-live-p gnus-original-article-buffer)) (set-buffer gnus-original-article-buffer) ,@body) ((and (boundp 'nnmail-article-buffer) (gnus-buffer-live-p nnmail-article-buffer)) (set-buffer nnmail-article-buffer) ,@body) (t (error "There is no article buffer available."))))) Alex. -- I will be in Istanbul next week.