GNU bug report logs - #6005
M-k removes the wrong hunk in diff-mode

Previous Next

Package: emacs;

Reported by: Dan Nicolaescu <dann <at> gnu.org>

Date: Thu, 22 Apr 2010 17:03:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6005 in the body.
You can then email your comments to 6005 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6005; Package emacs. (Thu, 22 Apr 2010 17:03:03 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dan Nicolaescu <dann <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: M-k removes the wrong hunk in diff-mode
Date: Thu, 22 Apr 2010 13:02:31 -0400
Given this diff:


=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog      2010-04-22 11:21:39 +0000
+++ lisp/ChangeLog      2010-04-22 12:07:37 +0000
@@ -1,3 +1,15 @@
+2010-04-22  Michael Albinus  <michael.albinus <at> gmx.de>
+
+       Synchronize with Tramp repository.
+
+       * net/tramp.el (with-connection-property, tramp-completion-mode-p)
+       (tramp-action-process-alive, tramp-action-out-of-band)
+       (tramp-check-for-regexp, tramp-file-name-p, tramp-equal-remote)
+       (tramp-exists-file-name-handler): Fix docstring.
+       (with-progress-reporter): New defmacro.
+       (tramp-do-copy-or-rename-file, tramp-handle-dired-compress-file)
+       (tramp-maybe-open-connection): Use it.
+
 2010-04-22  Noah Lavine  <noah549 <at> gmail.com>  (tiny change)
 
        Detect ssh 'ControlMaster' argument automatically in some cases.

=== modified file 'lisp/net/tramp.el'
--- lisp/net/tramp.el   2010-04-22 11:21:39 +0000
+++ lisp/net/tramp.el   2010-04-22 12:07:37 +0000
@@ -2240,7 +2240,7 @@ FILE must be a local file name on a conn
 (font-lock-add-keywords 'emacs-lisp-mode '("\\<with-file-property\\>"))
 
 (defmacro with-connection-property (key property &rest body)
-  "Checks in Tramp for property PROPERTY, otherwise executes BODY and set."
+  "Check in Tramp for property PROPERTY, otherwise executes BODY and set."
   `(let ((value (tramp-get-connection-property ,key ,property 'undef)))
     (when (eq value 'undef)
       ;; We cannot pass ,@body as parameter to


If the point is on any of the 
=== modified file 'lisp/net/tramp.el'
--- lisp/net/tramp.el   2010-04-22 11:21:39 +0000
+++ lisp/net/tramp.el   2010-04-22 12:07:37 +0000

pressing M-k will remove the lisp/ChangeLog hunk above (and not remove the 
=== modified file 'lisp/ChangeLog'
line.
This is not right, M-k should either remove the first hunk in
lisp/net/tramp.el in this example, or just do nothing and advance the point to the start of the next hunk.
(So that pressing M-k M-k M-k ... will end up doing the right thing).







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6005; Package emacs. (Thu, 26 Apr 2012 08:04:02 GMT) Full text and rfc822 format available.

Message #6 received at 6005 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Dan Nicolaescu <dann <at> gnu.org>
Cc: 6005 <at> debbugs.gnu.org
Subject: Re: bug#6005: M-k removes the wrong hunk in diff-mode
Date: Thu, 26 Apr 2012 16:02:07 +0800
Dan Nicolaescu <dann <at> gnu.org> writes:

> If the point is on any of the 
> === modified file 'lisp/net/tramp.el'
> --- lisp/net/tramp.el   2010-04-22 11:21:39 +0000
> +++ lisp/net/tramp.el   2010-04-22 12:07:37 +0000
>
> pressing M-k will remove the lisp/ChangeLog hunk above (and not remove
> the === modified file 'lisp/ChangeLog' line).

Fixed in trunk.




bug closed, send any further explanations to 6005 <at> debbugs.gnu.org and Dan Nicolaescu <dann <at> gnu.org> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 26 Apr 2012 08:04:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 May 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 349 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.