unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: mh-e-devel@lists.sourceforge.net, emacs-devel@gnu.org
Subject: Re: problem with mh-e and 2002-08-20 change to font-core.el
Date: Mon, 26 Aug 2002 16:18:38 -0500 (CDT)	[thread overview]
Message-ID: <200208262118.QAA16553@eel.dms.auburn.edu> (raw)
In-Reply-To: <200208260738.g7Q7c8S23362@localhost.localdomain> (y@mit.edu)

Chad wrote:

   It seems that this change:

   2002-08-20  Richard M. Stallman  <rms@gnu.org>

	   * font-core.el (font-lock-change-mode): New function.
	   (font-lock-mode): Use font-lock-change-mode instead of
	   font-lock-unfontify-buffer.
	   (font-lock-maximum-size, font-lock-verbose): Add defvars.

   Causes a problem with mh-e (if the mh-show buffer enables font-lock,
   such as with global-font-lock-mode).  Specifically, this change causes
   any visited message buffer to be marked as modified when mh-e attempts
   to display the second (and subsequent) message in a folder, and so
   triggers mh-e's ``Message 920 modified; flush changes? (yes or no) ''
   behavior.  I've temporarily backed out this change in my local emacs to
   verify that the problem goes away.

   It seems that this change (removing the properties) is a good change,
   and I recall it being discussed on emacs-devel, but I only lightly
   skimmed the discussion, and I don't have any strong ideas about how to
   resolve this conflict.

   chad

I believe that the fundamental problem underlying this is that
changing text properties marks the buffer as being changed.  From a
"philosophical" perspective, this actually makes sense since text
properties are considered part of the text.  From a practical
perspective (which, in my opinion, is the only really relevant
perspective) however, it leads to very strange behavior.  This was
already true before Richard's change.  All Richard's change did was
provide some additional instances of such strange behavior.

Do:

emacs-21.3.50 -q --eval '(blink-cursor-mode 0)'

(The last command line argument has nothing to do with the problem,
but it prevents serious damage to the nervous system.)

Visit some file in fundamental-mode.  (The last specification is
probably irrelevant.)

Do:

M-: (put-text-property 1 10 'face '((:background "orange")))

The buffer is now modified.

First inconsistency: Do:

M-x revert-buffer

The buffer is now marked unmodified, but the orange background is
still there.

Redo:

M-: (put-text-property 1 10 'face '((:background "orange")))

This is not redundant (although I personally believe it should be),
the buffer is once again considered modified.

C-x C-c.

We get amply warned about the changed buffer.

Ignore all warnings and exit, without "saving" the buffer.

Start Emacs again and visit the file again.  There reportedly are
saved changes which we should consider recovering. There is indeed an
auto-save file, but diff shows it is identical to the actual file.
Moreover, there is no trace of the orange background.

All of this behavior actually would make sense if text properties were
saved to file.  For instance, in that case revert-buffer would erase
the orange background.

However, write-region-annotate-functions is still nil and
after-insert-file-functions only contains
after-insert-file-set-buffer-file-coding-system, which, in as far has
I can tell, has nothing to do with saving and restoring text
properties.  If text properties would be saved to file, then maybe
the behavior reported by Chad would no longer be a bug either.  (I can
not tell, since I do not use mh-e.)

Is somebody actually working on saving text properties to file?
Would such a feature be optional or non-optional?

Sincerely,

Luc.

  reply	other threads:[~2002-08-26 21:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-26  7:38 problem with mh-e and 2002-08-20 change to font-core.el y
2002-08-26 21:18 ` Luc Teirlinck [this message]
2002-08-26 23:23   ` Luc Teirlinck
2002-08-26 23:57     ` Luc Teirlinck
2002-08-27 19:05   ` Richard Stallman
2002-08-28  5:51     ` chad
2002-08-28 23:32       ` Richard Stallman
2002-09-27 17:35         ` Bill Wohler
2002-08-26 21:51 ` Richard Stallman
2002-08-26 22:09   ` Stefan Monnier
2002-08-28  6:53     ` Richard Stallman
2002-08-28 13:55       ` Stefan Monnier
2002-08-28 23:33         ` Richard Stallman
2002-08-29 15:25           ` Stefan Monnier
2002-08-30  6:09             ` Richard Stallman
2002-08-30 13:42               ` Stefan Monnier
2002-09-01 13:15                 ` Richard Stallman
2002-09-02 17:05                   ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=200208262118.QAA16553@eel.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    --cc=mh-e-devel@lists.sourceforge.net \
    /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 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).