From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#25105: M-p in diff-mode jumps too far Date: Wed, 18 Jan 2017 15:11:16 +0900 (JST) Message-ID: References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> <87fuknzem8.fsf@users.sourceforge.net> <87d1frzcil.fsf_-_@users.sourceforge.net> <877f5yza02.fsf@users.sourceforge.net> <9dba6552-cd54-c6f0-18de-6822d43b0944@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1484719951 7136 195.159.176.226 (18 Jan 2017 06:12:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2017 06:12:31 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Tino Calancha , npostavs@users.sourceforge.net, Mark Oteiza , Stefan Monnier , 25105@debbugs.gnu.org, Dima Kogan To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 18 07:12:27 2017 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 1cTjTl-0000WU-N0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jan 2017 07:12:17 +0100 Original-Received: from localhost ([::1]:39437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTjTo-0007a6-32 for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jan 2017 01:12:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTjTd-0007YV-M7 for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2017 01:12:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTjTW-0004R7-2i for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2017 01:12:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTjTV-0004Qz-Ud for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2017 01:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cTjTV-0006AL-ML for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2017 01:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jan 2017 06:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25105 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 25105-submit@debbugs.gnu.org id=B25105.148471989023662 (code B ref 25105); Wed, 18 Jan 2017 06:12:01 +0000 Original-Received: (at 25105) by debbugs.gnu.org; 18 Jan 2017 06:11:30 +0000 Original-Received: from localhost ([127.0.0.1]:34265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTjSz-00069a-Ob for submit@debbugs.gnu.org; Wed, 18 Jan 2017 01:11:29 -0500 Original-Received: from mail-pg0-f65.google.com ([74.125.83.65]:36791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTjSx-00069N-F5 for 25105@debbugs.gnu.org; Wed, 18 Jan 2017 01:11:27 -0500 Original-Received: by mail-pg0-f65.google.com with SMTP id 75so489394pgf.3 for <25105@debbugs.gnu.org>; Tue, 17 Jan 2017 22:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=9MP6E/rYN2+zH1MZVrCPpj4yE4gwmTRwjz/515EvYtI=; b=mF9QTwWLzvjrbFaYc31zE4cXdmMbK4p1uSatdppM+MZh8FV7B/N/tUYz/r/Qc0iRMH AAoWSckR+4r4T3l6zEh51DsruR5pAMrazKIO6SHRNdZ+K04EqqKtwWShDeWeksvm/Xzo KWbGgiai3zhtKSpssmymUTsUzeIDlXHhKI7F/HEMuSCB7otf7+0eiU4cuGwkyKnBf5B6 dGYIFS+1V8c95kqaD43ldUXs5dlcLAVYEpzhFeiC7q2sE0lmdsYOleZATTIgNclSUsef aNrZhws3dqZb27t6yp8GREFsOriLNUtayWqftTxiA7FSoERtyI8HQJq/0HTNE1Z4ZaiV wD9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=9MP6E/rYN2+zH1MZVrCPpj4yE4gwmTRwjz/515EvYtI=; b=s+4sMgE9rjcxGuwOmetGjDv8Yqzr6qBAkaV7e0MmKYbq1afRgQUBnFuDMRZAJuNQj+ UBlsQ3igLneRHX5AM2sj4BGJQ9dYUjKrBR3rUdW+YozMbqmc0ci8IcA3tTOGA7pKmIo6 y7yGlxuOjX1Hj53uU98zcVX5G5XrH8FKsQgk7jByaU9b4/AO52mjP71JX6iWTcK2Ye78 8MAiiIfN3rpbJBwIDbCc5O8ViuRnBNApNAF+keEae3xxd57Yvd4PM2RL4JbId/bc2MQy pqS1NdT2EpLJptAUK9cSla3ZirvvySKTpfwWv4Pn0HwBdx1Vdq1RPn6R4+GM9XqOeMJf pC4A== X-Gm-Message-State: AIkVDXI6XeTzgHsJks5iLwsQ91tR39iSoE/9bMSGXHu9uLoI/XBZGvZujF8PTHaO+blLWA== X-Received: by 10.84.128.66 with SMTP id 60mr2680082pla.34.1484719881410; Tue, 17 Jan 2017 22:11:21 -0800 (PST) Original-Received: from calancha-pc (33.94.100.220.dy.bbexcite.jp. [220.100.94.33]) by smtp.gmail.com with ESMTPSA id h4sm45694503pfk.96.2017.01.17.22.11.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 22:11:20 -0800 (PST) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <9dba6552-cd54-c6f0-18de-6822d43b0944@yandex.ru> 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:128198 Archived-At: On Wed, 18 Jan 2017, Dmitry Gutov wrote: > On 16.01.2017 09:26, Tino Calancha wrote: > >> OK, below is my draft for the second commit. >> Please don't hesitate to send me comments to make it more clear or/and >> fix some broken grammar. > > Here's a fresh idea. If we're not going to worry about (not) showing Dima's > commit message in the generated change log, maybe the new message should talk > about tweaking the code, and not retell the original message. > > Or the users will read it twice, basically. But only those users that read > change logs, of course. OK, it's reasonable. See my new draft for commit 0beb7d2968ab76878eb3be26f2d749977fdcaa2f in branch scratch/calancha-revert-2c8a7e5: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Make diff-apply-hunk independent of point within a diff header Make diff-apply-hunk and diff-hunk-kill independent of the point position in a diff header (Bug#17544). This change allows to apply hunks in order. It also makes possible to press M-k repeatedly to kill hunks in the order they appear in the buffer. * lisp/vc/diff-mode.el (diff-file-junk-re): Move definition before it's used. (diff--at-diff-header-p): New predicate; return non-nil when point is inside a hunk header, a file header, or within a line matching diff-file-junk-re. (diff-beginning-of-hunk): Use it. Check if the point is inside a diff header, in the middle of a hunk, or before the first hunk. (diff-apply-hunk): Call diff-beginning-of-hunk with non-nil arg before apply the hunk. (diff-hunk-kill, diff-file-kill): Call diff-beginning-of-hunk with non-nil arg after kill the hunks. (diff-post-command-hook): Call diff-beginning-of-hunk with non-nil argument. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;