Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Chris Majewski <majewski@cs.ubc.ca>
Subject: Re: Starting shell scripts when fetching news/mail?
Date: 07 Oct 2002 13:46:38 -0700	[thread overview]
Message-ID: <ymhit0ej7td.fsf@okocim.cs.ubc.ca> (raw)
In-Reply-To: <853cri3te3.fsf@worldonline.dk>

Of possible relevance are the following lines from my .emacs

(custom-set-variables
 '(gnus-before-startup-hook (quote (my-pull-newsrc)))
 '(gnus-after-exiting-gnus-hook (quote (my-push-newsrc))))

(defun my-push-newsrc ()
  "Copy Gnus state to remote host"
  (interactive)
  (let ((this-buffer (current-buffer))
        (output-buffer (get-buffer "*rsync command output*")))
    (cond 
     ((yes-or-no-p (format "Push Gnus state to remote host? "))
      (switch-to-buffer output-buffer)
      (message "Copying files to remote host, please wait...")
      (call-process "/home/krzys/src/sh/push-newsrc" 
                    nil
                    "*rsync command output*"
                    1)
      (message "Done")
      (switch-to-buffer this-buffer)))))

(defun my-pull-newsrc ()
  "Copy Gnus state from remote host"
  (interactive)
  (let ((this-buffer (current-buffer))
        (output-buffer (get-buffer "*rsync command output*")))
    (cond 
     ((yes-or-no-p (format "Pull Gnus state from remote host? "))
      (switch-to-buffer output-buffer)
      (message "Copying files from remote host, please wait...")
      (call-process "/home/krzys/src/sh/pull-newsrc" 
                    nil
                    "*rsync command output*"
                    1)
      (message "Done")
      (switch-to-buffer this-buffer)))))


-chris

"Jeppe N. Madsen" <jeppenm@worldonline.dk> writes:

> Hi,
> 
> I've been running Gnus 5.8 for quite a while on W2k/Cygwin/Xemacs and
> now it's time to tweak the setup :-)
> 
> I'm using a number of foreign servers and one requires a ssh tunnel
> to connect. While it's not a big deal to open a shell and start a
> shell script it would be nice if it was possible for Gnus to
> automagically start this when fetching news. Is this possible? Or
> rather has anyone done this successfully and have some code to share?
> 
> I'm also using Gnus to read mail from a pop3 server. I've recently
> installed SpamAssassin/pop3proxy and while it works, again I need to
> fire up a shell to get it rolling. So the same question goes for
> fetching mail: is it possible to start a shell before fetching the
> mail?
> 
> rgds
> Jeppe


           reply	other threads:[~2002-10-07 20:46 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <853cri3te3.fsf@worldonline.dk>]

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=ymhit0ej7td.fsf@okocim.cs.ubc.ca \
    --to=majewski@cs.ubc.ca \
    /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).