Subject: bug#74364: Bug?

From: Tatsu Takamaro <[email-masked]>
Date: Wed, 27 Nov 2024 17:16:03 +0300

I never use (in other situations and letters) the Reply to all button, 
so I may sometimes forget to press it instead of a usual answer. Sorry. 
But I'm trying ^_^

 >>Saving TUTORIAL is a strange thing to do. What is the purpose?

I suppose there are two main reasons:

1. Correcting mistakes. Eg. I saw "vv" on a new line where it was not 
supposed to be. Or there was a mistake in a "homework" section in the 
command, I don't remember where exectly.

2. Making notes for oneself. To explain something better (more clear to 
an exact learner).

*3. Or maybe even to argue. If I see some information which I completely 
disagree with, but I don't want to disturb the support team or waste 
time, I could just write a couple of sentences right in the Tutorial, 
kindof a comment, - and feel better ^_^

вт, 26.11.2024 21:43, Manuel Giraud пишет:
> Eli Zaretskii<[email-masked]>  writes:
>
>>> Cc:[email-masked]
>>> Date: Mon, 25 Nov 2024 20:10:49 +0100
>>> From:  Manuel Giraud via "Bug reports for GNU Emacs,
>>>   the Swiss army knife of text editors"<[email-masked]>
>>>
>>> Tatsu Takamaro<[email-masked]>  writes:
>>>
>>> [...]
>>>
>>> Ok, now your recipe is more precise and I can reproduce it.
>>>
>>>> 3. Put some changes into the Tutorial. Say, just add a new line.
>>>>
>>>> 4. Press C-x-s to save. Emacs asks me to write a filename, I write
>>>> TUTORIAL, because the full path is alredy shown. Then Emacs asks me
>>>> whether I want to overwrite the file. I anser Yes (type y).
>>> After this 'C-x C-s', you have saved the content of the (modified)
>>> TUTORIAL into a file named "TUTORIAL" somewhere on your hard drive.
>>> Now, in this buffer, `tutorial--lang' is set to nil (which cause the
>>> error you saw) and Emacs still wants to save your progression in the
>>> tutorial and that's why it asks the question when you tried to quit.
>>>
>>> This is indeed a bug but maybe saving the TUTORIAL buffer is not
>>> supported.  Or we should remap `save-buffer' to save tutorial
>>> progression here?
>> Saving TUTORIAL is a strange thing to do.  What is the purpose?  The
>> file produced that way cannot be used as a tutorial, AFAIU, because
>> Emacs doesn't let users specify the tutorial's file name.
> It seems that at some point of the tutorial, the user is expected to do
> it.
>
> [...]
>
>> So my suggestion would be to modify tutorial--save-tutorial and
>> tutorial--save-on-kill such that of tutorial--lang is nil, they will
>> do nothing.  Because there's no point of trying to save the tutorial
>> in that case.
> I could try to come up with a patch like this.