From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84796 Path: news.gmane.org!not-for-mail From: Christopher Culver Newsgroups: gmane.emacs.gnus.general Subject: Re: Hooks for moving an article and for setting it expirable Date: Wed, 20 Aug 2014 21:16:09 +0300 Message-ID: <87r40bdo2e.fsf@aura.christopherculver.com> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1408558662 24705 80.91.229.3 (20 Aug 2014 18:17:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Aug 2014 18:17:42 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33039@lists.math.uh.edu Wed Aug 20 20:17:35 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 1XKARw-000372-DO for ding-account@gmane.org; Wed, 20 Aug 2014 20:17:32 +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 1XKARI-0006WF-LN; Wed, 20 Aug 2014 13:16:52 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1XKARH-0006W5-Dy for ding@lists.math.uh.edu; Wed, 20 Aug 2014 13:16:51 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1XKARF-0001gT-Qc for ding@lists.math.uh.edu; Wed, 20 Aug 2014 13:16:50 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XKAQr-0001cc-Cw for ding@gnus.org; Wed, 20 Aug 2014 20:16:35 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XKAQq-0002Wj-0y for ding@gnus.org; Wed, 20 Aug 2014 20:16:24 +0200 Original-Received: from 188.24.91.206 ([188.24.91.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Aug 2014 20:16:24 +0200 Original-Received: from crculver by 188.24.91.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Aug 2014 20:16:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 188.24.91.206 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:1KDWaCMuifkdCTH+2UzldyEKXqA= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84796 Archived-At: Eric Abrahamsen writes: > In gnus-sum.el there are a series of `gnus-data-*' functions for > working with the data vector, there's a `gnus-data-number', for > instance. Of course, all that does is take the car of the vector! But > if you're doing more than that, it's probably better to use the > pre-made functions. How does one use that? To save the article number as a variable specific to the function I’m writing, I had (defvar the-article-number (aref data-header 0)), which works. However, changing that to (gnus-data-number data-header) gives an error. The problem now with my function is that gnus-article-move-hook is apparently called *after* the message has been totally moved from the group in question and deleted from the summary buffer. Without the article still present in the summary buffer, I cannot use the following functions that I had expected to: (gnus-summary-goto-subject the-article-number) (gnus-summary-save-in-pipe "my-piped-command" t) Trying to use those functions results in the following error message: No such file: /home/crculver/Mail/mail/misc/54433 No such article (may have expired or been canceled) 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? With any hooked function, there's a desire to have access to the message in question, since one might want to perform an action depending on its contents. I hope I haven’t run into a fundamental design limitation of Gnus here.