我想一次将所有附件保存到电子邮件中。因此,我将 gnus-summary-save-parts-default-mime 设置为“.* /.*”。但是,当使用“X m”时,我不仅获得所有附件,还获得名为“[email protected]/INBOX.2393.1"(指我正在阅读电子邮件的帐户),其中包含我收到的电子邮件的签名。如何排除这种“类型”的文件保存在“X m”上?换句话说:如何为 gnus-summary-save-parts-default-mime 指定正确的正则表达式以防止保存此文件?
I would like to save all attachments to an email at once. I therefore set gnus-summary-save-parts-default-mime to ".* /.*". However, when using "X m", I not only get all attachments, but also a file named "[email protected]/INBOX.2393.1" (referring to the account I'm reading emails from) which contains the signature of the email I received. How can I exclude files of this "type" from being saved on "X m"? In other words: How can I specify the correct regexp for gnus-summary-save-parts-default-mime to prevent this file from being saved, too?
发布评论
评论(1)
这个
defadvice
将通过排除任何没有文件名的部分来完成您目前想要的操作(在本例中,文章本身就是如此):我正在使用 Gnus v5.13;如果您也使用相同或相似的版本,请告诉我此修改版本的
gnus-summary-save-parts-1
是否适合您;您需要将gnus-summary-save-parts-exclude-article
设置为t
。如果它对你有用,我将向 Gnus 项目提交一个补丁。请注意,可以使用上面的
defadvice
OR 使用下面的代码,但不要同时使用两者。 defadvice 是一个简单的快速修复方法,您可以暂时使用。下面的代码我将作为 Gnus 项目的补丁提交,我在这里仅包含此代码供您测试,看看它是否适用于您的系统(如果您也使用 Gnus v5.13)。如果他们接受这个补丁并将其作为未来版本的一部分,那么您将不需要上面的defadvice
;相反,您只需自定义gnus-summary-save-parts-exclude-article
变量即可。This
defadvice
will do what you want for the moment by excluding any parts that do not have filenames (in this case that is true of the article itself):I am using Gnus v5.13; if you're also using the same or similar version, let me know if this modified version of
gnus-summary-save-parts-1
works for you; you will want to setgnus-summary-save-parts-exclude-article
tot
. If it works for you, I will submit a patch for it to the Gnus projects.Note, either use the above
defadvice
OR use the code below, but do not use both together. The defadvice is an easy quick fix that you can use for the moment. The code below I will submit as a patch to the Gnus project and I only included this here for you to test to see if it works on your system if you are also using Gnus v5.13. If they accept this patch and make it part of a future release then you will not need thedefadvice
above; instead you'll just be able to customize thegnus-summary-save-parts-exclude-article
variable.