Gnus development mailing list
 help / color / mirror / Atom feed
From: Andrew J Cosgriff <ajc@bing.wattle.id.au>
Subject: Re: gnus-summary-save-article help
Date: 03 Dec 1999 10:29:39 +1100	[thread overview]
Message-ID: <1yiu2g9b18.fsf@earthling.aia.aig.com.au> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of "Wed, 01 Dec 1999 19:46:34 GMT"

Lars Magne Ingebrigtsen wrote :

> Andrew J Cosgriff <ajc@bing.wattle.id.au> writes:
> 
> > Then I caught the feeping creature disease and figured it'd be
> > nice to save the current Gnus article, although I never quite got
> > it to work properly - when (gnus-summary-article-subject) gets
> > called it seems to return the subject line of the last article in
> > the summary buffer, rather than the one I'm actually looking at.
> > Help !
> 
> That function can only be called in the summary buffer.
> 
> Instead, use `(cdr gnus-article-current)', which, when in the article
> buffer, will give you the current article number.

Hmm a `(mail-header-subject gnus-current-headers)' seems to do the
right thing.

ie.

(defun gnus-summary-save-article-pilot (&optional arg)
  "Save the current article to a memo on your Palm device.
If N is a positive number, save the N next articles.
If N is a negative number, save the N previous articles.
If N is nil and any articles have been marked with the process mark,
save those articles instead."
  (interactive "P")
  (let ((gnus-default-article-saver 'gnus-summary-save-in-pilot-memo))
    (gnus-summary-save-article arg)))

(defun gnus-summary-save-in-pilot-memo (&optional filename)
  "Save this article to a memo on your Palm device.
Optional argument FILENAME specifies file name."
  (gnus-eval-in-buffer-window gnus-save-article-buffer
    (save-buffer-to-pilot (read-string "memo title: " (mail-header-subject gnus-current-headers)))))

Is that, like, a good way to do it ?

Thanks heeps,
 Cos.
-- 
Andrew J Cosgriff <ajc@bing.wattle.id.au> exterminate all rational thought !
                       star convenience alien pizza loss


  reply	other threads:[~1999-12-02 23:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-24  0:31 Andrew J Cosgriff
1999-11-24  1:45 ` Taso N. Devetzis
1999-11-24  2:01   ` Andrew J Cosgriff
1999-12-01 19:50 ` Lars Magne Ingebrigtsen
1999-12-02 23:29   ` Andrew J Cosgriff [this message]
1999-12-03  0:23     ` Lars Magne Ingebrigtsen

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=1yiu2g9b18.fsf@earthling.aia.aig.com.au \
    --to=ajc@bing.wattle.id.au \
    /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).