Re: Gnus drafts setup issues

Martin Kjær Jørgensen <[email protected]>
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
On 03/11/26 14:56 PM, Óscar Fuentes wrote:
> Martin Kjær Jørgensen <[email protected]> writes:
>
>> On 03/11/26 10:29 AM, Óscar Fuentes wrote:
>>> Martin Kjær Jørgensen <[email protected]> writes:
>>>
>>>> Hey,
>>>>
>>>> I have problems saving draft emails when composing with gnus/message-mode.
>>>> When using C-x C-s or C-c C-d Emacs prompts me for a file path to save the
>>>> email. According to Gnus manual, email drafts should be saved to a directory
>>>> located at where nndraft-directory points to.
>>>>
>>>> nndraft-directory currently points to "/home/mkj/.emacs.d/gnus/mail/".
>>>>
>>>> Do I need to setup anything else in particular for drafts to work?
>>>
>>> The directory in nndraft-directory, does it exist?
>>
>> Seems like it, and more. tree output:
>>
>> .emacs.d/gnus/
>> └── news
>>     └── drafts
>>         ├── drafts
>>         └── queue
>>
>>>
>>> What's the command you execute to start composing the e-mail?
>>>
>>
>> After opening (gnus) I type "m" to start composing.
>>
>>> When you are composing the e-mail, what's the output of
>>>
>>> C-h k C-x C-s
>>>
>>
>> save-buffer is an interactive and natively compiled function defined
>> in files.el.gz.
>>
>> Signature
>> (save-buffer &optional ARG)
>>
>> Documentation
>> Save current buffer in visited file if modified.
>>
>> ...
>> ...
>>
>>> ?
>>>
>>> When you are composing the e-mail, what's the output of
>>>
>>> M-x describe-mode
>>
>>   Major mode message-mode
>>
>> The major mode is Message mode defined in message.el:
>>
>> Major mode for editing mail and news to be sent.
>> Like ‘text-mode’, but with these additional commands:
>>
>> ...
>> ...
>>
>>>
>>> ?
>>>
>
> When you are composing the e-mail, what's the result of
>
> M-: (buffer-file-name)

nil

>
> ?
>
> The output should contain the directory you configured on
> nndraft-directory.
>
> Also
>
> C-h f basic-save-buffer

basic-save-buffer is an interactive and natively compiled function
defined in files.el.gz.

Signature
(basic-save-buffer &optional CALLED-INTERACTIVELY)

Documentation
Save the current buffer in its visited file, if it has been modified.

The hooks write-contents-functions, local-write-file-hooks
and write-file-functions get a chance to do the job of saving;
if they do not, then the buffer is saved in the visited file in
the usual way.

Before and after saving the buffer, this function runs
before-save-hook and after-save-hook, respectively.

...
...
>
> and see if any of the hooks mentioned there contain anything. Please
> note that those You can do
>
> M-: write-contents-functions

nil

>
> while on the message buffer and so on for the rest.
>
> In my case, only write-contents-functions has a non-nil value:
>
>  (nndraft-generate-headers)
>
> which is the expected value.
>

Well, mine is not. So that needs to be setup by something.

-- 
/Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.