all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: insert-file-contents and format-decode
Date: Wed, 27 Jun 2007 08:34:00 +0200	[thread overview]
Message-ID: <468204D8.8010700@gmx.at> (raw)
In-Reply-To: <E1I3Jpk-0002Ym-0J@fencepost.gnu.org>

 >      > 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.

  reply	other threads:[~2007-06-27  6:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06 14:06 insert-file-contents and format-decode martin rudalics
2007-06-08  7:12 ` Richard Stallman
2007-06-17 13:34   ` martin rudalics
2007-06-18 21:31     ` Richard Stallman
2007-06-19  7:50       ` martin rudalics
2007-06-23 18:26         ` Richard Stallman
2007-06-23 18:26         ` Richard Stallman
2007-06-24 10:30           ` martin rudalics
2007-06-25 13:19             ` Richard Stallman
2007-06-26  6:54               ` martin rudalics
2007-06-26 22:48                 ` Richard Stallman
2007-06-27  6:33                   ` martin rudalics
2007-06-27 19:50                     ` Richard Stallman
2007-06-30 11:11                       ` martin rudalics
2007-07-01  0:30                         ` Richard Stallman
2007-07-02  8:14                           ` martin rudalics
2007-07-03  4:24                             ` Richard Stallman
2007-07-03  6:47                               ` martin rudalics
2007-07-04  3:43                                 ` Richard Stallman
2007-06-26 22:48                 ` Richard Stallman
2007-06-27  6:34                   ` martin rudalics [this message]
2007-06-27 23:43                     ` Richard Stallman
2007-06-30 11:32                       ` martin rudalics
2007-07-01  0:30                         ` Richard Stallman
2007-07-02  8:27                           ` martin rudalics
2007-07-03  4:24                             ` Richard Stallman
2007-07-03  6:43                               ` martin rudalics
2007-08-06 14:22                                 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=468204D8.8010700@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.