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: [R.Ekker@ai.rug.nl: highlight-changes-rotate-faces sets buffer modified flag]
Date: Wed, 09 May 2007 08:44:15 +0200	[thread overview]
Message-ID: <46416DBF.4020506@gmx.at> (raw)
In-Reply-To: <E1HlU7S-0000fM-MQ@fencepost.gnu.org>

 > I don't know how to use this feature, but looking at the code suggests
 > that this bug still exists.  Can anyone verify that?
 >
 > It should be pretty easy to prevent this code from changing the
 > modified flag (and perhaps bind buffer-undo-list to t).  I am not sure
 > where the change should be made, though.  Would someone familiar with
 > this package please take a look and DTRT?

At second sight I would _not_ change the code at all.

(1) With the current code the first undo after saving a buffer would
undo the change done by `highlight-changes-rotate-faces' and incorrectly
make the buffer appear modified.  Changing the code by resetting the
buffer-modified flag and _not_ let-binding `buffer-undo-list' wouldn't
ameliorate anything here.

(2) Suppose I reset the buffer-modified flag and bind `buffer-undo-list'
to t as in my patch.  In this case I would not be able to undo the
change caused by `highlight-changes-rotate-faces' and end up with quite
confusing colors after an arbitrary sequence of undos and saves.

`highlight-changes-rotate-faces' is supposed to run by a hook within
code that resets the buffer-modified flag.  We could say so in the
doc-string of that function to avoid confusion for the case that the
function is called interactively (the OP's problem, IIUC).

The problem described in (1) could be probably resolved by setting undo
boundaries around the last "real" buffer change(s) and the subsequent
color rotation but I doubt that it's worth the trouble.

  parent reply	other threads:[~2007-05-09  6:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08 18:09 [R.Ekker@ai.rug.nl: highlight-changes-rotate-faces sets buffer modified flag] Richard Stallman
2007-05-08 22:00 ` martin rudalics
2007-05-09 14:26   ` Stefan Monnier
2007-05-09 18:05     ` martin rudalics
2007-05-09 19:24       ` Stefan Monnier
2007-05-09 21:27         ` martin rudalics
2007-05-09 21:34   ` Richard Stallman
2007-05-09 21:58     ` martin rudalics
2007-05-09  6:44 ` martin rudalics [this message]
2007-05-09 21:34   ` Richard Stallman
2007-05-09 21:59     ` martin rudalics
2007-05-11  7:44       ` Richard Stallman
2007-05-11  9:11         ` martin rudalics
2007-05-13 17:37           ` Richard Stallman
2007-05-14  9:03             ` martin rudalics
2007-05-15  9:46               ` Richard Stallman
2007-05-16  5:59                 ` martin rudalics
2007-05-16 14:32                   ` 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=46416DBF.4020506@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.