Variable: feedmail-queue-buffer-file-name
feedmail-queue-buffer-file-name is a variable defined in
feedmail.el.gz.
Value
nil
Documentation
If non-nil, has the value normally expected of buffer-file-name(var)/buffer-file-name(fun).
You are not intended to set this to something in your configuration. Rather,
you might programmatically set it to something via a hook or function
advice or whatever. You might like to do this if you are using a mail
composition program that eventually uses sendmail.el's mail-send
function to process the message. If there is a filename associated
with the message buffer, mail-send will ask you for confirmation.
There's no trivial way to avoid it. It's unwise to just set the value
of buffer-file-name(var)/buffer-file-name(fun) to nil because that will defeat feedmail's file
management features. Instead, arrange for this variable to be set to
the value of buffer-file-name(var)/buffer-file-name(fun) before setting that to nil. An easy way
to do that would be with an advice on mail-send.
feedmail will pretend that buffer-file-name(var)/buffer-file-name(fun), if nil, has the value
assigned of feedmail-queue-buffer-file-name and carry out its normal
activities. feedmail does not restore the non-nil value of
buffer-file-name(var)/buffer-file-name(fun). For safe bookkeeping, the user should ensure that
feedmail-queue-buffer-file-name is restored to nil.
Example advice for mail-send:
(advice-add 'mail-send :around #'my-feedmail-mail-send-advice)
(defun my-feedmail-mail-send-advice (orig-fun &rest args)
(let ((feedmail-queue-buffer-file-name buffer-file-name)
(buffer-file-name nil))
(apply orig-fun args)))
Source Code
;; Defined in /usr/src/emacs/lisp/mail/feedmail.el.gz
(defvar feedmail-queue-buffer-file-name nil
"If non-nil, has the value normally expected of `buffer-file-name'.
You are not intended to set this to something in your configuration. Rather,
you might programmatically set it to something via a hook or function
advice or whatever. You might like to do this if you are using a mail
composition program that eventually uses sendmail.el's `mail-send'
function to process the message. If there is a filename associated
with the message buffer, `mail-send' will ask you for confirmation.
There's no trivial way to avoid it. It's unwise to just set the value
of `buffer-file-name' to nil because that will defeat feedmail's file
management features. Instead, arrange for this variable to be set to
the value of `buffer-file-name' before setting that to nil. An easy way
to do that would be with an advice on `mail-send'.
feedmail will pretend that `buffer-file-name', if nil, has the value
assigned of `feedmail-queue-buffer-file-name' and carry out its normal
activities. feedmail does not restore the non-nil value of
`buffer-file-name'. For safe bookkeeping, the user should ensure that
feedmail-queue-buffer-file-name is restored to nil.
Example advice for mail-send:
(advice-add \\='mail-send :around #\\='my-feedmail-mail-send-advice)
(defun my-feedmail-mail-send-advice (orig-fun &rest args)
(let ((feedmail-queue-buffer-file-name buffer-file-name)
(buffer-file-name nil))
(apply orig-fun args)))")