unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 34720@debbugs.gnu.org, dunni@gnu.org
Subject: bug#34720: 26.1; Reverting a GPG buffer moves all markers to the end of the file
Date: Tue, 27 Aug 2019 13:20:24 +0300	[thread overview]
Message-ID: <83ef16ewpj.fsf@gnu.org> (raw)
In-Reply-To: <8736hn2clq.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue,  27 Aug 2019 11:15:29 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 34720@debbugs.gnu.org,  dunni@gnu.org
> Date: Tue, 27 Aug 2019 11:15:29 +0200
> 
> The reason the other markers magically survive Finsert_file_contents is
> because that function takes care not to replace any text in the buffer
> that's identical to the text already there?  So the text isn't deleted,
> the markers stay where they are, and everything works nice.

Right.

> So the fix here is to make epa follow the same logic, perhaps?  That is,
> first get the text we're supposed to insert, then compare with the data
> in the buffer, and only start replacing at the point where we find the
> first difference?

You want to replace the insert-file-contents with custom-tailored Lisp
code?  Even if possible and efficient enough, this would be a
specialized solution for only a single use case.  Right?  Other use
cases, with other insert-file-contents handlers, will each one have to
have their separate custom solutions, right?  All that just to keep
markers intact?





  reply	other threads:[~2019-08-27 10:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03 15:28 bug#34720: 26.1; Reverting a GPG buffer moves all markers to the end of the file Ian Dunn
2019-07-09 16:33 ` Lars Ingebrigtsen
2019-08-26  7:20   ` Lars Ingebrigtsen
2019-08-26  7:59     ` Eli Zaretskii
2019-08-26  8:14       ` Lars Ingebrigtsen
2019-08-26  9:42         ` Eli Zaretskii
2019-08-27  7:14           ` Lars Ingebrigtsen
2019-08-27  8:00             ` Eli Zaretskii
2019-08-27  8:23               ` Lars Ingebrigtsen
2019-08-27  8:41                 ` Eli Zaretskii
2019-08-27  9:05                   ` Lars Ingebrigtsen
2019-08-27  9:17                     ` Eli Zaretskii
2019-08-27  9:15                   ` Lars Ingebrigtsen
2019-08-27 10:20                     ` Eli Zaretskii [this message]
2019-08-30  9:48                       ` Lars Ingebrigtsen
2019-08-30 10:21                         ` Lars Ingebrigtsen
2019-08-30 12:19                         ` Eli Zaretskii
2019-08-27  8:37               ` 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=83ef16ewpj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34720@debbugs.gnu.org \
    --cc=dunni@gnu.org \
    --cc=larsi@gnus.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).