GNU bug report logs - #17544
24.3; [PATCH] Improved diff-mode navigation/manipulation

Previous Next

Package: emacs;

Reported by: Dima Kogan <lists <at> dima.secretsauce.net>

Date: Wed, 21 May 2014 15:00:05 UTC

Severity: normal

Tags: patch

Found in version 24.3

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


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

From: npostavs <at> users.sourceforge.net
To: Dima Kogan <dima <at> secretsauce.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Andreas Schwab <schwab <at> linux-m68k.org>,
 17544 <at> debbugs.gnu.org
Subject: Re: bug#17544: 24.3;
 [PATCH] Improved diff-mode navigation/manipulation
Date: Sat, 19 Nov 2016 21:37:20 -0500
Dima Kogan <dima <at> secretsauce.net> writes:

> +(defun diff--wrap-navigation (skip-hunk-start
> +                              what orig
> +                              header-re goto-start-func count)
> +  "I override the default diff-{hunk,file}-{next,prev}
> +implementation by skipping any lines that are associated with

The first line of a docstring should be a single sentence.

> +this hunk/file but precede the hunk-start marker. For instance, a

> +If a point is on 'index', then the point is considered to be in
> +this first hunk. Here I move the point to the @@... marker before

Double space end of sentence.  No need to mention "I" here, it should be
phrased imperatively, as in "Override the default...", and "Move the point...".

> +executing the default diff-hunk-next/prev implementation to move
> +to the NEXT marker"

End sentences with a period.

> +      ;; I trap the error

End sentences with a period, no need to mention "I".

> +;; Here the outer diff-hunk-next has skip-hunk-start set to t, but the
> +;; inner one does not, which breaks the loop

> +(defun diff-hunk-prev (&optional count skip-hunk-start)
> +  "Go to the previous COUNT'th hunk"

> +(defun diff-hunk-next (&optional count skip-hunk-start)
> +  "Go to the next COUNT'th hunk"

> +(defun diff-file-prev (&optional count skip-hunk-start)
> +  "Go to the previous COUNT'th file"

> +(defun diff-file-next (&optional count skip-hunk-start)
> +  "Go to the next COUNT'th file"

> +	    ;; There's no next hunk, so just take the one we have

End sentences with a period.

> +	    (t (list beg end))))))
> +      ;; applying hunks too.  See http://debbugs.gnu.org/17544

>> Also, I believe usual comment style is to use "we" not "I", and you
>> didn't end the last sentence with a period.
>
> Changed the I/we. I'm omitting the trailing . on purpose to make sure it
> doesn't get confused with the URL.

I suggest ";; applying hunks too (see http://debbugs.gnu.org/17544).",
referencing the bug with "Bug #17544" instead of a full URL could also
work.




This bug report was last modified 8 years and 180 days ago.

Previous Next


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