From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de>
Subject: gnus-gcc-externalize-attachments: "query the user" option
Date: Wed, 31 Mar 2004 17:35:51 +0200 [thread overview]
Message-ID: <v9r7v9m3l4.fsf@marauder.physik.uni-ulm.de> (raw)
Hi,
Sometimes, I'd like to have the attachments included in Gcc and
sometimes not (I cannot give a rule based on group name). I'd like to
add a "query the user option when sending" option to
`gnus-gcc-externalize-attachments':
,----[ C-h v gnus-gcc-externalize-attachments RET ]
| gnus-gcc-externalize-attachments's value is ask
|
| Documentation:
| Should local-file attachments be included as external parts in Gcc copies?
| If it is `all', attach files as external parts;
| if a regexp and matches the Gcc group name, attach files as external parts;
| if `ask', query the user; if nil, attach files as normal parts.
|
| You can customize this variable.
|
| Defined in `gnus-msg'.
`----
I've implemented it, but the problem is, that I get asked on sending
for every message, even those that don't have attachments. How can I
test if there is an attachment?
--8<---------------cut here---------------start------------->8---
--- gnus-msg.el 4 Mar 2004 06:30:18 -0000 7.7
+++ gnus-msg.el 31 Mar 2004 15:31:28 -0000
@@ -1591,11 +1594,15 @@
(car method))))
(unless (gnus-request-group group nil method)
(gnus-request-create-group group method))
- (setq mml-externalize-attachments
- (if (stringp gnus-gcc-externalize-attachments)
- (string-match gnus-gcc-externalize-attachments group)
- gnus-gcc-externalize-attachments))
- (save-excursion
+ (setq
+ mml-externalize-attachments
+ (cond ((and (stringp gnus-gcc-externalize-attachments)
+ (string-match gnus-gcc-externalize-attachments group))
+ t)
+ ((eq gnus-gcc-externalize-attachments 'ask)
+ (gnus-y-or-n-p
+ "Externalize attachments in this message? "))
+ (t gnus-gcc-externalize-attachments)))
(nnheader-set-temp-buffer " *acc*")
(insert-buffer-substring cur)
(message-encode-message-body)
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
next reply other threads:[~2004-03-31 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-31 15:35 Reiner Steib [this message]
2004-05-16 14:00 ` 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=v9r7v9m3l4.fsf@marauder.physik.uni-ulm.de \
--to=4.uce.03.r.s@nurfuerspam.de \
--cc=reiner.steib@gmx.de \
/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).