* bug#74364: Bug?
@ 2024-11-15 4:53 Tatsu Takamaro
2024-11-15 7:18 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 18+ messages in thread
From: Tatsu Takamaro @ 2024-11-15 4:53 UTC (permalink / raw)
To: 74364
[-- Attachment #1: Type: text/plain, Size: 989 bytes --]
Hello! I'm new user. Just read the Manual. And I'd like to report a bug
or ask a question (if it's not a bug). So, as it said in the Manual, the
TUTORIAL file that I read is just a copy of the original, so I can
change it freely. But. When I change it, and then triing to leave Emacs
(Ctrl + x + c), I got this message.
Error on exit:
tutorial--saved-file: Wrong type argument: stringp, nil
The debugger says:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
file-name-extension(nil)
tutorial--saved-file()
tutorial--save-on-kill()
run-hook-with-args-until-failure(tutorial--save-on-kill)
save-buffers-kill-emacs(nil)
save-buffers-kill-terminal(nil)
funcall-interactively(save-buffers-kill-terminal nil)
command-execute(save-buffers-kill-terminal)
The error appears only when you try to exit and the TUTORIAL file is
modified. At the same time, Emacs allows saving the TUTORIAL file by
Ctrl + x + s during operation.
Regards, Tony.
[-- Attachment #2: Type: text/html, Size: 1383 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-15 4:53 bug#74364: Bug? Tatsu Takamaro
@ 2024-11-15 7:18 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <3ffa9049-44a1-8a88-69aa-6a7b1d5dabee@gmail.com>
0 siblings, 1 reply; 18+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-15 7:18 UTC (permalink / raw)
To: Tatsu Takamaro; +Cc: 74364
Tatsu Takamaro <tatsu.takamaro@gmail.com> writes:
> Hello! I'm new user. Just read the Manual. And I'd like to report a
> bug or ask a question (if it's not a bug). So, as it said in the
> Manual, the TUTORIAL file that I read is just a copy of the original,
> so I can change it freely. But. When I change it, and then triing to
> leave Emacs (Ctrl + x + c), I got this message.
>
> Error on exit:
> tutorial--saved-file: Wrong type argument: stringp, nil
Hi,
It seems like a bug but I cannot reproduce it. Could you try the same
starting from emacs -Q?
--
Manuel Giraud
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
[not found] ` <3ffa9049-44a1-8a88-69aa-6a7b1d5dabee@gmail.com>
@ 2024-11-18 9:10 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-19 8:50 ` Tatsu Takamaro
0 siblings, 1 reply; 18+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-18 9:10 UTC (permalink / raw)
To: Tatsu Takamaro; +Cc: 74364
Tatsu Takamaro <tatsu.takamaro@gmail.com> writes:
> Yes, with a -q key Emacs starts in a default view, and I still get the
> same error, and all other behaviour is the same.
[ Could you please keep the bug tracker as recipient of your message by
doing a "reply to all" ]
From the TUTORIAL buffer, what the key sequence "C-h v tutorial--lang
<RET>" gives you?
--
Manuel Giraud
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-18 9:10 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-19 8:50 ` Tatsu Takamaro
2024-11-19 14:23 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 18+ messages in thread
From: Tatsu Takamaro @ 2024-11-19 8:50 UTC (permalink / raw)
To: Manuel Giraud; +Cc: 74364
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
tutorial--lang is a variable defined in ‘tutorial.el’.
Its value is "English"
Local in buffer TUTORIAL; global value is nil
Tutorial language.
Automatically becomes buffer-local when set.
пн, 18.11.2024 12:10, Manuel Giraud пишет:
> Tatsu Takamaro<tatsu.takamaro@gmail.com> writes:
>
>> Yes, with a -q key Emacs starts in a default view, and I still get the
>> same error, and all other behaviour is the same.
> [ Could you please keep the bug tracker as recipient of your message by
> doing a "reply to all" ]
>
> >From the TUTORIAL buffer, what the key sequence "C-h v tutorial--lang
> <RET>" gives you?
[-- Attachment #2: Type: text/html, Size: 1340 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-19 8:50 ` Tatsu Takamaro
@ 2024-11-19 14:23 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-23 6:44 ` Tatsu Takamaro
0 siblings, 1 reply; 18+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-19 14:23 UTC (permalink / raw)
To: Tatsu Takamaro; +Cc: 74364
Tatsu Takamaro <tatsu.takamaro@gmail.com> writes:
> tutorial--lang is a variable defined in ‘tutorial.el’.
>
> Its value is "English"
> Local in buffer TUTORIAL; global value is nil
>
> Tutorial language.
>
> Automatically becomes buffer-local when set.
Thanks, this seems normal. Which version of emacs are you running?
What gives "M-: (emacs-build-description)"?
--
Manuel Giraud
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-19 14:23 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-23 6:44 ` Tatsu Takamaro
2024-11-23 10:50 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 18+ messages in thread
From: Tatsu Takamaro @ 2024-11-23 6:44 UTC (permalink / raw)
To: Manuel Giraud; +Cc: 74364
[-- Attachment #1: Type: text/plain, Size: 829 bytes --]
In GNU Emacs 29.4 (build 2, x86_64-w64-mingw32) of 2024-07-05 built on
AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.19045
System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.5131)
Configured using:
'configure --with-modules --without-dbus
--with-native-compilation=aot --without-compress-install
--with-sqlite3 --with-tree-sitter CFLAGS=-O2'
вт, 19.11.2024 17:23, Manuel Giraud пишет:
> Tatsu Takamaro<tatsu.takamaro@gmail.com> writes:
>
>> tutorial--lang is a variable defined in ‘tutorial.el’.
>>
>> Its value is "English"
>> Local in buffer TUTORIAL; global value is nil
>>
>> Tutorial language.
>>
>> Automatically becomes buffer-local when set.
> Thanks, this seems normal. Which version of emacs are you running?
> What gives "M-: (emacs-build-description)"?
[-- Attachment #2: Type: text/html, Size: 1555 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-23 6:44 ` Tatsu Takamaro
@ 2024-11-23 10:50 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-25 8:21 ` Tatsu Takamaro
0 siblings, 1 reply; 18+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-23 10:50 UTC (permalink / raw)
To: Tatsu Takamaro; +Cc: 74364
Tatsu Takamaro <tatsu.takamaro@gmail.com> writes:
> In GNU Emacs 29.4 (build 2, x86_64-w64-mingw32) of 2024-07-05 built on
> AVALON
> Windowing system distributor 'Microsoft Corp.', version 10.0.19045
> System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.5131)
I just tried to reproduce it with Emacs 29.4 (not on windows though) and
I was not able to get the same error as you.
What is strange is that there is only one call to `file-name-extension'
in `tutorial--saved-file' and at this point, as you've seen,
`tutorial--lang' is set to something meaningful (not nil).
--
Manuel Giraud
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-23 10:50 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-25 8:21 ` Tatsu Takamaro
2024-11-25 19:10 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 18+ messages in thread
From: Tatsu Takamaro @ 2024-11-25 8:21 UTC (permalink / raw)
To: Manuel Giraud; +Cc: 74364
[-- Attachment #1: Type: text/plain, Size: 1942 bytes --]
Well, it's not a big problem though. But I can describe my actions as an
algorithm for you to make it easier to reproduce the bug:
1. I start Emacs, it starts with my minor custom changes that I added to
.emacs file.
2. Open an Emacs Tutorial with a mouse click and answer Yes to load my
remembered position.
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).
5. Minibuffer shows me message "Wrote c:\...path...TUTORIAL"
6. I Press C-x-c to exit. It shows "Save your position in the
tutorial?". Answer Yes (y).
7. Minibuffer shows "Wrong type argument: stringp, nil". And doesn't quit!
8. Then I press C-x-c again, but now I choose No (n). And Emacs exits.
Tutorial file is not saved (I can see it by opening it again and check)!
So, here is how it is going on. But note, that if I skip the 4-th item
(don't press C-x-s to save) and press C-x-c right after changing the
Tutorial (addding a new line), Emacs quits normally and the Tutorial
file is being saved! So, I guess it is a C-x-s function that triggers
problem.
Hope it will help you cathing the bug.
сб, 23.11.2024 13:50, Manuel Giraud пишет:
> Tatsu Takamaro<tatsu.takamaro@gmail.com> writes:
>
>> In GNU Emacs 29.4 (build 2, x86_64-w64-mingw32) of 2024-07-05 built on
>> AVALON
>> Windowing system distributor 'Microsoft Corp.', version 10.0.19045
>> System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.5131)
> I just tried to reproduce it with Emacs 29.4 (not on windows though) and
> I was not able to get the same error as you.
>
> What is strange is that there is only one call to `file-name-extension'
> in `tutorial--saved-file' and at this point, as you've seen,
> `tutorial--lang' is set to something meaningful (not nil).
[-- Attachment #2: Type: text/html, Size: 3274 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-25 8:21 ` Tatsu Takamaro
@ 2024-11-25 19:10 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-26 12:51 ` Eli Zaretskii
[not found] ` <ab77c50d-6db1-b143-78cf-191c19585280@gmail.com>
0 siblings, 2 replies; 18+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-25 19:10 UTC (permalink / raw)
To: Tatsu Takamaro; +Cc: 74364
Tatsu Takamaro <tatsu.takamaro@gmail.com> 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?
--
Manuel Giraud
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-25 19:10 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-26 12:51 ` Eli Zaretskii
2024-11-26 18:43 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <ab77c50d-6db1-b143-78cf-191c19585280@gmail.com>
1 sibling, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2024-11-26 12:51 UTC (permalink / raw)
To: Manuel Giraud; +Cc: 74364, tatsu.takamaro
> Cc: 74364@debbugs.gnu.org
> 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" <bug-gnu-emacs@gnu.org>
>
> Tatsu Takamaro <tatsu.takamaro@gmail.com> 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.
Users are supposed to save tutorial by killing the buffer or exiting
Emacs, in which case Emacs saves the tutorial state as it should be.
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.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
[not found] ` <ab77c50d-6db1-b143-78cf-191c19585280@gmail.com>
@ 2024-11-26 13:11 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 18+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-26 13:11 UTC (permalink / raw)
To: Tatsu Takamaro; +Cc: 74364
Tatsu Takamaro <tatsu.takamaro@gmail.com> writes:
>> 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?
Please keep the bug tracker mail address in your replies. As a rule of
thumb, you should always use « Reply to all » when interacting here.
> Well, for I'm new to Emacs, I can't say what is better. I'm glad you
> found the issue. Now it's up to you to decide what to do with it. I
> can just mention that in the Tutorial text there is a "task" for a
> reader to do C-x-s. An attentive and thorough learner, who does all
> the "homework", would do that C-x-s and in some time he would want to
> exit Emacs. Thus he would apparently face the bug. As I did.
Thanks. I think I'll have to look into the tutorial to see how what is
instructed there lead to this behaviour. Maybe it will give us a hint
of what should be done.
> Thank you for help and kindness! Emacs is great. The more I learn it
> the more I see it.
>
> P.S. Remapping keys is a too difficult topic to learn though, there
> are questions. I'll ask them a bit later.
Of course but I thought more about a remapping that should be done by
default in the tutorial.
--
Manuel Giraud
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-26 12:51 ` Eli Zaretskii
@ 2024-11-26 18:43 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-27 14:16 ` Tatsu Takamaro
2024-11-27 14:18 ` Eli Zaretskii
0 siblings, 2 replies; 18+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-26 18:43 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74364, tatsu.takamaro
Eli Zaretskii <eliz@gnu.org> writes:
>> Cc: 74364@debbugs.gnu.org
>> 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" <bug-gnu-emacs@gnu.org>
>>
>> Tatsu Takamaro <tatsu.takamaro@gmail.com> 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.
--
Manuel Giraud
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-26 18:43 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-27 14:16 ` Tatsu Takamaro
2024-11-27 14:18 ` Eli Zaretskii
1 sibling, 0 replies; 18+ messages in thread
From: Tatsu Takamaro @ 2024-11-27 14:16 UTC (permalink / raw)
To: Manuel Giraud, Eli Zaretskii; +Cc: 74364
[-- Attachment #1: Type: text/plain, Size: 2615 bytes --]
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<eliz@gnu.org> writes:
>
>>> Cc:74364@debbugs.gnu.org
>>> 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"<bug-gnu-emacs@gnu.org>
>>>
>>> Tatsu Takamaro<tatsu.takamaro@gmail.com> 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.
[-- Attachment #2: Type: text/html, Size: 4247 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-26 18:43 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-27 14:16 ` Tatsu Takamaro
@ 2024-11-27 14:18 ` Eli Zaretskii
2024-11-29 15:46 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2024-11-27 14:18 UTC (permalink / raw)
To: Manuel Giraud; +Cc: 74364, tatsu.takamaro
> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: tatsu.takamaro@gmail.com, 74364@debbugs.gnu.org
> Date: Tue, 26 Nov 2024 19:43:04 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > 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.
Please do, and thanks.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-27 14:18 ` Eli Zaretskii
@ 2024-11-29 15:46 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-30 11:05 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-29 15:46 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74364, tatsu.takamaro
[-- Attachment #1: Type: text/plain, Size: 946 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>> Cc: tatsu.takamaro@gmail.com, 74364@debbugs.gnu.org
>> Date: Tue, 26 Nov 2024 19:43:04 +0100
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> > 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.
>
> Please do, and thanks.
What about this? I have mimic it after your patch dec2ac0c657. I've
tested it lightly and it seems to work as expected:
- The user can save the TUTORIAL to a file
- Trying to kill Emacs will ask if the user wants to
save his progression.
- The progression is correctly saved.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-exiting-Emacs-after-saving-a-tutorial.patch --]
[-- Type: text/x-patch, Size: 1220 bytes --]
From 407fbd578a171dbd746d6ee62d8c1e40c772978e Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Fri, 29 Nov 2024 16:35:47 +0100
Subject: [PATCH] Fix exiting Emacs after saving a tutorial
* lisp/tutorial.el (tutorial--lang)
(tutorial--point-before-chkeys): Add both variables as
permanent-local, so that saving the tutorial to some file
doesn't kill these buffer-local variables. Otherwise, trying to
exit Emacs after saving the tutorial will signal an error,
because 'tutorial--lang' is nil. (Bug#74364)
---
lisp/tutorial.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index d754db238de..86537d995fe 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -650,7 +650,12 @@ tutorial--remove-remarks
(delete-region prop-start prop-end))))))
(defvar tutorial--starting-point)
+
+;; For when the user saves the TUTORIAL to a file.
(put 'tutorial--starting-point 'permanent-local t)
+(put 'tutorial--lang 'permanent-local t)
+(put 'tutorial--point-before-chkeys 'permanent-local t)
+
(defun tutorial--save-on-kill ()
"Query the user about saving the tutorial when killing Emacs."
(when (buffer-live-p tutorial--buffer)
--
2.47.0
[-- Attachment #3: Type: text/plain, Size: 18 bytes --]
--
Manuel Giraud
^ permalink raw reply related [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-29 15:46 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-30 11:05 ` Eli Zaretskii
2024-11-30 14:44 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2024-11-30 11:05 UTC (permalink / raw)
To: Manuel Giraud; +Cc: 74364, tatsu.takamaro
> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: tatsu.takamaro@gmail.com, 74364@debbugs.gnu.org
> Date: Fri, 29 Nov 2024 16:46:55 +0100
>
> What about this? I have mimic it after your patch dec2ac0c657. I've
> tested it lightly and it seems to work as expected:
>
> - The user can save the TUTORIAL to a file
>
> - Trying to kill Emacs will ask if the user wants to
> save his progression.
>
> - The progression is correctly saved.
Fine by me, please install on master, and thanks.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-30 11:05 ` Eli Zaretskii
@ 2024-11-30 14:44 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-30 15:37 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-30 14:44 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74364, tatsu.takamaro
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>> Cc: tatsu.takamaro@gmail.com, 74364@debbugs.gnu.org
>> Date: Fri, 29 Nov 2024 16:46:55 +0100
>>
>> What about this? I have mimic it after your patch dec2ac0c657. I've
>> tested it lightly and it seems to work as expected:
>>
>> - The user can save the TUTORIAL to a file
>>
>> - Trying to kill Emacs will ask if the user wants to
>> save his progression.
>>
>> - The progression is correctly saved.
>
> Fine by me, please install on master, and thanks.
Ok but I don't have permissions to commit.
--
Manuel Giraud
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#74364: Bug?
2024-11-30 14:44 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-30 15:37 ` Eli Zaretskii
0 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2024-11-30 15:37 UTC (permalink / raw)
To: Manuel Giraud; +Cc: 74364-done, tatsu.takamaro
> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: tatsu.takamaro@gmail.com, 74364@debbugs.gnu.org
> Date: Sat, 30 Nov 2024 15:44:29 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Manuel Giraud <manuel@ledu-giraud.fr>
> >> Cc: tatsu.takamaro@gmail.com, 74364@debbugs.gnu.org
> >> Date: Fri, 29 Nov 2024 16:46:55 +0100
> >>
> >> What about this? I have mimic it after your patch dec2ac0c657. I've
> >> tested it lightly and it seems to work as expected:
> >>
> >> - The user can save the TUTORIAL to a file
> >>
> >> - Trying to kill Emacs will ask if the user wants to
> >> save his progression.
> >>
> >> - The progression is correctly saved.
> >
> > Fine by me, please install on master, and thanks.
>
> Ok but I don't have permissions to commit.
Thanks, installed on master, and closing the bug.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2024-11-30 15:37 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-15 4:53 bug#74364: Bug? Tatsu Takamaro
2024-11-15 7:18 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <3ffa9049-44a1-8a88-69aa-6a7b1d5dabee@gmail.com>
2024-11-18 9:10 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-19 8:50 ` Tatsu Takamaro
2024-11-19 14:23 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-23 6:44 ` Tatsu Takamaro
2024-11-23 10:50 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-25 8:21 ` Tatsu Takamaro
2024-11-25 19:10 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-26 12:51 ` Eli Zaretskii
2024-11-26 18:43 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-27 14:16 ` Tatsu Takamaro
2024-11-27 14:18 ` Eli Zaretskii
2024-11-29 15:46 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-30 11:05 ` Eli Zaretskii
2024-11-30 14:44 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-30 15:37 ` Eli Zaretskii
[not found] ` <ab77c50d-6db1-b143-78cf-191c19585280@gmail.com>
2024-11-26 13:11 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.