From: Tino Calancha <f92capac@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Tino Calancha <f92capac@gmail.com>, 23823@debbugs.gnu.org
Subject: bug#23823: 25.0.95; Reset between highlight buffer/file comparisons
Date: Fri, 24 Jun 2016 22:13:25 +0900 (JST) [thread overview]
Message-ID: <alpine.DEB.2.20.1606242209320.2363@calancha-pc> (raw)
In-Reply-To: <837fdf2hgg.fsf@gnu.org>
On Fri, 24 Jun 2016, Eli Zaretskii wrote:
> But the function's doc string clearly makes that expected behavior:
>
> If the current buffer is visiting the file being compared against, it
> also will have its differences highlighted.
>
> The only way I can interpret that "also" part is that the changes
> against the file are highlighted _in_addition_ to the changes tracked
> by the mode. Your scenario just happens to produce a clash between
> these two sets of differences, and the result could be ambiguous. But
> what we get in fact doesn't seem unreasonable to me.
You convinced me: there is no need to reset those highlighted differences.
If the user want to do that he/she could toggle eaasily the mode before
calling the func. Adding a prefix argument to reset may cause accidentaly
lost all the tracked differences.
The comentary of this lib helps to understand the design intentions.
For example when it says:
;; You can "age" different sets of changes by using
;; `highlight-changes-rotate-faces'.
Each time the buffer is saved, the new differences get a different face.
Following example shows the point:
emacs -Q -eval "(progn (with-temp-file \"/tmp/foo\" (insert \"Hi i am foo\n\")) (find-file \"/tmp/foo\") (highlight-changes-mode 1) (add-hook 'write-file-functions 'highlight-changes-rotate-faces nil t))"
M-: (progn (goto-char (point-max)) (insert "Hi foo, i am bar.\n") (highlight-compare-with-file "/tmp/foo")) RET y y
M-: (progn (goto-char (point-max)) (insert "Nice to meet you foo.\n") (highlight-compare-with-file "/tmp/foo")) RET y y
M-: (progn (goto-char (point-max)) (insert "Nice to meet you too, bar.\n") (highlight-compare-with-file "/tmp/foo")) RET y y
;; If we reset the buffer on each func call we will loose all this
;; psicodelic color structure :-S
next prev parent reply other threads:[~2016-06-24 13:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 10:11 bug#23823: 25.0.95; Reset between highlight buffer/file comparisons Tino Calancha
[not found] ` <handler.23823.B.14665903065838.ack@debbugs.gnu.org>
2016-06-22 10:22 ` bug#23823: Acknowledgement (25.0.95; Reset between highlight buffer/file comparisons) Tino Calancha
2016-06-22 15:16 ` bug#23823: 25.0.95; Reset between highlight buffer/file comparisons Eli Zaretskii
2016-06-23 0:46 ` Tino Calancha
2016-06-23 15:24 ` Eli Zaretskii
2016-06-24 4:36 ` Tino Calancha
2016-06-24 7:07 ` Eli Zaretskii
2016-06-24 13:13 ` Tino Calancha [this message]
2019-06-25 12:25 ` Lars Ingebrigtsen
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=alpine.DEB.2.20.1606242209320.2363@calancha-pc \
--to=f92capac@gmail.com \
--cc=23823@debbugs.gnu.org \
--cc=eliz@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 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).