all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: 15494@debbugs.gnu.org
Subject: bug#15494: Improved patch
Date: Mon, 30 Sep 2013 00:52:14 -0700	[thread overview]
Message-ID: <87zjqu691t.fsf@secretsauce.net> (raw)
In-Reply-To: <871u467oev.fsf@secretsauce.net>

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

I'm attaching a smaller patch that solves this in a somewhat cleaner
way.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-TRAMP-processes-no-longer-delete-their-buffer-conten.patch --]
[-- Type: text/x-diff, Size: 1177 bytes --]

From 5fd5f6f5fed3d5736c7a4267d2487c2dd2861d08 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima@secretsauce.net>
Date: Mon, 30 Sep 2013 00:30:28 -0700
Subject: [PATCH] TRAMP processes no longer delete their buffer contents after
 (point)

---
 lisp/net/tramp-sh.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 4bc836b..81f0c97 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2724,7 +2724,7 @@ the result will be a local, non-Tramp, filename."
 		;; `verify-visited-file-modtime'.
 		(let ((buffer-undo-list t)
 		      (buffer-read-only nil)
-		      (mark (point)))
+		      (point-prompt-start (point-max)))
 		  (clear-visited-file-modtime)
 		  (narrow-to-region (point-max) (point-max))
 		  ;; We call `tramp-maybe-open-connection', in order
@@ -2732,7 +2732,7 @@ the result will be a local, non-Tramp, filename."
 		  (catch 'suppress
 		    (tramp-maybe-open-connection v)
 		    (widen)
-		    (delete-region mark (point))
+		    (delete-region point-prompt-start (point))
 		    (narrow-to-region (point-max) (point-max))
 		    ;; Now do it.
 		    (if command
-- 
1.8.3.2


  reply	other threads:[~2013-09-30  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30  7:35 bug#15494: [PATCH] 24.3.50; Processes running under TRAMP can't cleanly write to the middle of a buffer Dima Kogan
2013-09-30  7:52 ` Dima Kogan [this message]
2016-02-24  4:07 ` Lars Ingebrigtsen
2016-02-24  6:55   ` Michael Albinus

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=87zjqu691t.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=15494@debbugs.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.