[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: insert-file-contents and format-decode
From: |
Richard Stallman |
Subject: |
Re: insert-file-contents and format-decode |
Date: |
Sat, 30 Jun 2007 20:30:30 -0400 |
I currently run this in `insert-file-contents' once around the entire
call sequence for `format-decode' and `after-insert-file-functions'.
That is the right way.
Do we want undo boundaries before and/or after the insertion?
An editing primitive such as `Finsert_file_contents' should not make
any undo boundaries. An undo boundary is made by the main editor loop
and by an explicit call to `undo-boundary'.
I suppose we do not want to disable the hooks for the "non-insert-file"
case, for example, interactive uses of `format-decode-region'. Hence,
your suggestion to handle undo in `insert-file-contents' implies that we
have to disable these hooks in `insert-file-contents' too.
Right.
Finally, I'm completely uncertain what to do about `format-insert-file':
That function explicitly prompts for a format and does `format-decode'
after inserting the file and running any `after-insert-file-functions'.
Shall we treat this is as a sequence of
(insert-file-contents filename nil beg end)
(let ((format-alist nil))
(format-decode-region (point) (+ (point) size) format))
with _two_ `buffer-undo-list' entries and `after-change-functions'
calls?
No, I suggest making just one undo entry for the insertion
of the decoded text. Just as `insert-file-contents' would do.
- Re: insert-file-contents and format-decode, (continued)
- Re: insert-file-contents and format-decode, martin rudalics, 2007/06/19
- Re: insert-file-contents and format-decode, Richard Stallman, 2007/06/23
- Re: insert-file-contents and format-decode, Richard Stallman, 2007/06/23
- Re: insert-file-contents and format-decode, martin rudalics, 2007/06/24
- Re: insert-file-contents and format-decode, Richard Stallman, 2007/06/25
- Re: insert-file-contents and format-decode, martin rudalics, 2007/06/26
- Re: insert-file-contents and format-decode, Richard Stallman, 2007/06/26
- Re: insert-file-contents and format-decode, martin rudalics, 2007/06/27
- Re: insert-file-contents and format-decode, Richard Stallman, 2007/06/27
- Re: insert-file-contents and format-decode, martin rudalics, 2007/06/30
- Re: insert-file-contents and format-decode,
Richard Stallman <=
- Re: insert-file-contents and format-decode, Richard Stallman, 2007/06/26
- Re: insert-file-contents and format-decode, martin rudalics, 2007/06/27
- Re: insert-file-contents and format-decode, Richard Stallman, 2007/06/27
- Re: insert-file-contents and format-decode, martin rudalics, 2007/06/30
- Re: insert-file-contents and format-decode, Richard Stallman, 2007/06/30