From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#17544: 24.3; [PATCH] Improved diff-mode navigation/manipulation Date: Sat, 19 Nov 2016 21:37:20 -0500 Message-ID: <87zikukhb3.fsf@users.sourceforge.net> References: <87ha4jgw53.fsf@secretsauce.net> <87si0ion1c.fsf@gnus.org> <87k2et8hr4.fsf@secretsauce.net> <83a8fpe1dr.fsf@gnu.org> <87h99w8ynv.fsf@secretsauce.net> <87k2es9weh.fsf@users.sourceforge.net> <87oa4018r3.fsf@secretsauce.net> <87twdi6rm9.fsf@secretsauce.net> <87h997nkqp.fsf@secretsauce.net> <874m44tmge.fsf@users.sourceforge.net> <87h983rg9c.fsf@secretsauce.net> <87mvhvsrta.fsf@users.sourceforge.net> <87wpgge0kl.fsf@secretsauce.net> <87twb9l8qi.fsf@users.sourceforge.net> <878tsihhhl.fsf@secretsauce.net> <87lgwilo8c.fsf@users.sourceforge.net> <871syah6p9.fsf@secretsauce.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1479609439 1919 195.159.176.226 (20 Nov 2016 02:37:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 20 Nov 2016 02:37:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: Andreas Schwab , 17544@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 20 03:37:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8I0I-0007NY-5c for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Nov 2016 03:37:14 +0100 Original-Received: from localhost ([::1]:43427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8I0I-0001vi-EL for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Nov 2016 21:37:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8I0A-0001v9-1K for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 21:37:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8I06-0005DS-Tn for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 21:37:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48292) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c8I06-0005DO-QV for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 21:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c8I06-0006JO-Cw for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 21:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Nov 2016 02:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17544 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 17544-submit@debbugs.gnu.org id=B17544.147960939724227 (code B ref 17544); Sun, 20 Nov 2016 02:37:02 +0000 Original-Received: (at 17544) by debbugs.gnu.org; 20 Nov 2016 02:36:37 +0000 Original-Received: from localhost ([127.0.0.1]:35458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8Hzh-0006Ig-El for submit@debbugs.gnu.org; Sat, 19 Nov 2016 21:36:37 -0500 Original-Received: from mail-io0-f194.google.com ([209.85.223.194]:33895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8Hzf-0006IQ-V7 for 17544@debbugs.gnu.org; Sat, 19 Nov 2016 21:36:36 -0500 Original-Received: by mail-io0-f194.google.com with SMTP id n13so2515444ioe.1 for <17544@debbugs.gnu.org>; Sat, 19 Nov 2016 18:36:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=AZC9S0TiSqmBat9Pk3g1vU6ZH1g+vzUuS/2/dhoZny4=; b=QD6MiNFl47tcUrM2htL7t/XgYqAUnRM5RHjJB5Th+O2LPeyKTKXb4TuadX4qhgL53/ bCUm2Fw9hcg7SKrAAG1nrhnIQKbeQdm/1ZhHy8pwtvC04ZRqh4NQp38fXWs06aw0e+ty 0k6m5hiLHWlfb/JfzUDVyxZFMgDhDZuAmwp05zmpwgksYfAC4AE2YT1drhbiBEqo8Cbw CdNEYValgoUUhPt5Ane/VYcW14fCbT+MS5bSk8YWQmmdAL01v/TndyJDpC6uIMUD7Rf1 F8YKCwd4Bsmc8rw/W7T1mIHwpYj46Fe/WlUsS3apy3IDFJWRKgqKAdybgkPL80T1WbxV OKlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=AZC9S0TiSqmBat9Pk3g1vU6ZH1g+vzUuS/2/dhoZny4=; b=k2uUexcIyh5dlrLkgqJKnB8wv08IymAujTyewDySsWfv6bVhZBt8MbRVz6k7pHa1ia OJiw8dWa4DoYfGNzPDMVApmk6Lh4LBu3sKTH6YRxRB9Sm8pTApd5YLuP1BtMlWI9JaIV rcLA/vhvj0UtTlu+I7GowsDL+KFpkFG+POWL6X6j18zECfz0lMvfcSFLerj5r48EK+Nr v0Wx/ii8swWRvn0XzphDunlIw4975SSWU0XHlGTkvqEYnvi/aY96pvMuYEup1V/OfhkU 5Nqzgy7zURJEpCQU89Um8xpUx2NRZsfe8y7XUEPFKz6S60pY5Z7F9umdGbSsBsYzhT32 KhqQ== X-Gm-Message-State: AKaTC02kuQm5cfBtZRmzzzQuvnNzr5HWPPlyAh4PiV0SXCMl136q0ut7ycFjLZJkorYdPg== X-Received: by 10.107.7.27 with SMTP id 27mr5283187ioh.130.1479609390362; Sat, 19 Nov 2016 18:36:30 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 197sm5749825iou.42.2016.11.19.18.36.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Nov 2016 18:36:29 -0800 (PST) In-Reply-To: <871syah6p9.fsf@secretsauce.net> (Dima Kogan's message of "Thu, 17 Nov 2016 00:05:38 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125890 Archived-At: Dima Kogan 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.