unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: Dima Kogan <dima@secretsauce.net>
Cc: Andreas Schwab <schwab@linux-m68k.org>, 17544@debbugs.gnu.org
Subject: bug#17544: 24.3; [PATCH] Improved diff-mode navigation/manipulation
Date: Sat, 19 Nov 2016 21:37:20 -0500	[thread overview]
Message-ID: <87zikukhb3.fsf@users.sourceforge.net> (raw)
In-Reply-To: <871syah6p9.fsf@secretsauce.net> (Dima Kogan's message of "Thu, 17 Nov 2016 00:05:38 -0800")

Dima Kogan <dima@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.





  reply	other threads:[~2016-11-20  2:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 12:21 bug#17544: 24.3; [PATCH] Improved diff-mode navigation/manipulation Dima Kogan
2016-02-24  2:33 ` Lars Ingebrigtsen
2016-09-03  9:17   ` Dima Kogan
2016-09-03 10:14     ` Eli Zaretskii
2016-09-03 21:24       ` Dima Kogan
2016-09-04  3:27         ` npostavs
2016-09-07  7:14           ` Dima Kogan
2016-09-14 22:31             ` Dima Kogan
2016-09-23  7:22               ` Dima Kogan
2016-10-22 15:47                 ` npostavs
2016-10-23  1:44                   ` Dima Kogan
2016-10-23  2:49                     ` npostavs
2016-11-07  2:26                       ` Dima Kogan
2016-11-15  3:31                         ` npostavs
2016-11-17  4:15                           ` Dima Kogan
2016-11-17  4:33                             ` npostavs
2016-11-17  8:05                               ` Dima Kogan
2016-11-20  2:37                                 ` npostavs [this message]
2016-11-21  7:23                                   ` Dima Kogan
2016-11-23  0:42                                     ` npostavs
2016-11-23 21:11                                       ` Dima Kogan
2016-11-29  4:10                                         ` npostavs
2016-09-13  3:56           ` Dima Kogan
2016-09-03 11:05 ` Andreas Schwab

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=87zikukhb3.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=17544@debbugs.gnu.org \
    --cc=dima@secretsauce.net \
    --cc=schwab@linux-m68k.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).