From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84825 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Hooks for moving an article and for setting it expirable Date: Wed, 27 Aug 2014 10:07:09 +0800 Message-ID: <87fvgi4rea.fsf@ericabrahamsen.net> References: <87silaykb6.fsf@aura.christopherculver.com> <87mwbflp13.fsf@ericabrahamsen.net> <87fvguzxke.fsf@aura.christopherculver.com> <87d2byoe97.fsf@ericabrahamsen.net> <87zjf1j4dt.fsf@aura.christopherculver.com> <87mwb1lvrz.fsf@ericabrahamsen.net> <87r40dhl7u.fsf@aura.christopherculver.com> <87iolphg68.fsf@aura.christopherculver.com> <8738ctl1n8.fsf@ericabrahamsen.net> <87r40bdo2e.fsf@aura.christopherculver.com> <87a96uy3kt.fsf@ericabrahamsen.net> <8738ci95fs.fsf@aura.christopherculver.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409105033 14259 80.91.229.3 (27 Aug 2014 02:03:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2014 02:03:53 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33068@lists.math.uh.edu Wed Aug 27 04:03:46 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XMSaN-0004mJ-IP for ding-account@gmane.org; Wed, 27 Aug 2014 04:03:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1XMSZk-0005dm-3e; Tue, 26 Aug 2014 21:03:04 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1XMSZi-0005dS-3L for ding@lists.math.uh.edu; Tue, 26 Aug 2014 21:03:02 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1XMSZf-0000gC-EQ for ding@lists.math.uh.edu; Tue, 26 Aug 2014 21:03:01 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XMSZd-0000j3-1K for ding@gnus.org; Wed, 27 Aug 2014 04:02:57 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XMSZc-0004Px-SC for ding@gnus.org; Wed, 27 Aug 2014 04:02:56 +0200 Original-Received: from 111.197.163.181 ([111.197.163.181]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Aug 2014 04:02:56 +0200 Original-Received: from eric by 111.197.163.181 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Aug 2014 04:02:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 111.197.163.181 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:oT+tgsQMW/d3rGhPJqHLg2OzWKk= X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.0001 Ham tokens: 0.000-539--4947h-0s--0d--H*u:Emacs, 0.000-38--348h-0s--0d--H*r:Debian, 0.000-2365--21743h-2s--0d--H*UA:Emacs, 0.000-10--83h-0s--0d--HX-Injected-Via-Gmane:gmane.org, 0.000-10--83h-0s--0d--H*r:sk:1AlnuQ- Spam tokens: 0.993-24150--948h-82431s--0d--HX-Spam-Relays-External:quimby.gnus.org, 0.993-30916--1293h-105786s--0d--H*RU:quimby.gnus.org, 0.993-29749--1248h-101803s--0d--HTo:D*gnus.org, 0.991-30649--1562h-105791s--0d--H*RT:80.91.231.51, 0.991-30649--1562h-105791s--0d--H*RT:quimby.gnus.org Autolearn status: no -1.0 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [80.91.229.3 listed in list.dnswl.org] 1.2 RCVD_NUMERIC_HELO Received: contains an IP address used for HELO 0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0001] 2.0 FSL_HELO_BARE_IP_2 FSL_HELO_BARE_IP_2 List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84825 Archived-At: Christopher Culver writes: > Eric Abrahamsen writes: >> Christopher Culver writes: >>> Does Gnus have a way of accessing messages in other groups than what >>> is visible in the summary buffer? Of course, the article number will >>> change in the group to which the message is moved. Or is there a way >>> to run the gnus-article-move-hook function *prior* to the moving of >>> the message? >> >> There are several dynamic variables bound during >> `gnus-summary-move-article' that you might be able to use. In the >> message moving loop, the variables to-group and to-article *ought* to be >> bound to the destination group, and the message's new article number in >> that group. Maybe try using those variables in your hook function to >> find the article at its new location? > > If the Gnus internals create a variable referring to the to-article, how > do I access it? Attempting to do perform an action with a variable > "to-article" produces the error: > > Symbol's value as variable is void: to-article Sorry, I wasn't looking closely enough at the code -- to-article is already out of scope by the time the hook is run. > So, the only variables I seem to be able to access are the ones passed > by gnus-summary-article-move-hook to the hooked function: (action > data-header from &optional to method). And here the value of "to" is > only the destination group, not the destination message. Yup, unfortunately I don't see any way of getting at the new article number, it's just not present. It would make a lot of sense to me to have that available to the hook functions, but it's not possible right now. There might be some objection to changing the calling signature of the hook functions, as well... Eric