[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: insert-file-contents and format-decode
From: |
martin rudalics |
Subject: |
Re: insert-file-contents and format-decode |
Date: |
Wed, 27 Jun 2007 08:34:00 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> > Is your suggestion to fix this by disabling the modification hooks in
> > Finsert_file_contents around the call to `format-decode'?
>
> Either in Finsert_file_contents or within `format-decode'.
>
> I think it is ok to disable them unconditionally inside `format-decode'.
> Decoding is sufficiently low level that it probably makes no sense
> to expect them to run these hooks.
>
> Then Finsert_file_contents can run the hooks just once for the
> (decoded) text that is ultimately inserted.
Agreed.
>
> I'm not sure what to do with `after-insert-file-functions' though. The
> current documentation suggests that these are handled the same way as
> the `format-decode' based functions. If you want to keep the current
> behavior for them, this should be documented throughly. That means, the
> documentation should say that functions in `after-insert-file-functions'
> have to take care of narrowing, `buffer-undo-list', after-change hooks,
> and the like.
>
> With the current plan, they don't have to deal with undo or change
> hooks.
We have a plan for dealing with functions called by `format-decode'. We
do not have a plan yet for dealing with `after-insert-file-functions'.
Shall we treat functions there the same way we treat functions called by
`format-decode'? If so we would have to deal with this right in
`Finsert_file_contents'. Or shall we keep things as they are? In this
case the documentation should say the things mentioned above.
> How do they have "take care of" narrowing?
When I insert the contents of a file with `visit-flag' nil the buffer
should be reasonably narrowed to work only on the inserted text as in
`decode-coding-inserted-region'. Currently, neither `format-alist' nor
`after-insert-file-functions' handling provides such a service. The
functions there are supposed to do the narrowing themselves.
- Re: insert-file-contents and format-decode, (continued)
- 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, 2007/06/30
- Re: insert-file-contents and format-decode, Richard Stallman, 2007/06/26
- Re: insert-file-contents and format-decode,
martin rudalics <=
- 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