[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
elisp question
From: |
Mike Ballard |
Subject: |
elisp question |
Date: |
Wed, 20 Aug 2003 07:37:40 GMT |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Hi -
I don't know much about elisp but was able to piece together a little
snippet that pretty much does what I want. And that's to determine if a
post is to Usenet and write a copy to a file.
The problem is if I post again to the same group (w/o restarting Gnus) I
get the mb msg '<file> has changed on disk - really edit the buffer?' I'd
like to eliminate that (I can post to other groups fine so long as I don't
try more than one post to any group during a single Gnus session).
If there was some way to add code which re-reads the disk file before it's
written to a second time that (apparently) would fix it. Or there's
probably a better way that I have no idea about. (The "touch" is in there
in case the file doesn't already exist and I wonder if it's the problem?
I tried using file-exists-p but have sort of been going in circles
(backwards) without success).
Can someone tell me how to alter the code below either by re-reading the
disk file before it's written again or if "touch" is the problem maybe
someone could tell me how to use file-exists-p? I think I'd still need
the "touch" (or something) for the occasions when the file does not yet
exist.
(start-process-shell-command "foo" "bar"
"/bin/touch" (format "/dd/Gnus/posts/%s.posts" group))
(if (not (message-news-p))
"nnfolder:../mail/mail_cc"
(format "nnfolder:../posts/%s.posts" group)))
Mike
--
mike.ballard--at--earthlink.net
"Roses are red, violets are blue,
I'm schizophrenic and so am I"
- elisp question,
Mike Ballard <=