* bug#18633: 24.3; `customize-save-customized' should be handled as a transaction
@ 2014-10-05 14:18 Matúš Goljer
2020-12-04 11:15 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Matúš Goljer @ 2014-10-05 14:18 UTC (permalink / raw)
To: 18633
If `customize-save-customized' is issued (through M-x or any other way,
such as C-x C-s in customize buffer), and during the run of the function
"exit" is called (e.g. using C-g), the routine writes garbage into the
`custom-set-variables' form in `custom-file'.
We should first construct the form in a temporary buffer and then write
it at once into the output file. Another (simpler) solution is to use
`atomic-change-group' from subr.el
Had I not kept the file under git, I would've lost most of my settings.
It seems like a good idea to handle a critical operation like this
atomically.
Cheers.
--
Best regards,
Matúš Goljer
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#18633: 24.3; `customize-save-customized' should be handled as a transaction
2014-10-05 14:18 bug#18633: 24.3; `customize-save-customized' should be handled as a transaction Matúš Goljer
@ 2020-12-04 11:15 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-04 11:15 UTC (permalink / raw)
To: Matúš Goljer; +Cc: 18633
Matúš Goljer <matus.goljer@gmail.com> writes:
> We should first construct the form in a temporary buffer and then write
> it at once into the output file. Another (simpler) solution is to use
> `atomic-change-group' from subr.el
(This bug report unfortunately got no response at the time.)
I've now done the latter in Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-04 11:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-05 14:18 bug#18633: 24.3; `customize-save-customized' should be handled as a transaction Matúš Goljer
2020-12-04 11:15 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).