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: bug#25400: bug#25105: bug#25400: M-p in diff-mode jumps too far Date: Fri, 13 Jan 2017 15:26:44 +0900 (JST) Message-ID: References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> <87fuknzem8.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1484288838 15254 195.159.176.226 (13 Jan 2017 06:27:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2017 06:27:18 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Tino Calancha , Mark Oteiza , Stefan Monnier , Dmitry Gutov , 25105@debbugs.gnu.org, Dima Kogan To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 13 07:27:11 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 1cRvKP-0003IP-Vo for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jan 2017 07:27:10 +0100 Original-Received: from localhost ([::1]:39251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRvKU-00052l-Ds for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jan 2017 01:27:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRvKN-00052O-D3 for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2017 01:27:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRvKI-0001MO-HT for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2017 01:27:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36611) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRvKI-0001MI-DX for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2017 01:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cRvKI-0006E6-2Y for bug-gnu-emacs@gnu.org; Fri, 13 Jan 2017 01:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jan 2017 06:27:02 +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.148428881523922 (code B ref 25105); Fri, 13 Jan 2017 06:27:02 +0000 Original-Received: (at 25105) by debbugs.gnu.org; 13 Jan 2017 06:26:55 +0000 Original-Received: from localhost ([127.0.0.1]:52010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRvKB-0006Dl-Ja for submit@debbugs.gnu.org; Fri, 13 Jan 2017 01:26:55 -0500 Original-Received: from mail-pf0-f194.google.com ([209.85.192.194]:33528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRvKA-0006DU-2D for 25105@debbugs.gnu.org; Fri, 13 Jan 2017 01:26:54 -0500 Original-Received: by mail-pf0-f194.google.com with SMTP id 127so6880752pfg.0 for <25105@debbugs.gnu.org>; Thu, 12 Jan 2017 22:26:53 -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=Rm4RIuQrraAsDroOKUOJREwM6khYsgNn+csRgdGkRXQ=; b=IIXbxxtGtXmMoZA+6K/ZeK+vBebi2wKuL1+RzouG5KeGpolpNsfmhc1QdB/Z488z0b lM58v31HQaZYRUMxGnRrad1fAd+aZ82sSBp8lTuxAs8Lxov/G5T50R66cLRbt+MxzH9v CSn5lBb02EGpFnJyB+scmJLfiZvIBPdAVCpqdmjIC5NdlvrN0TX3J3IgPVKmjTaT56Cs H7iZRVYGk1YVrwyUJtMYKoYVzpFNtlGZv0qFtq9NbQjh5Waj1uisqfzI0aISVh9f+wbz EwL+kyD/Iln+VMJvZsQcVrqqstyxsZn5oMABPQ6l8vfSKpzSKWjD2LUFIxKs0DMHEWjM RPXg== 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=Rm4RIuQrraAsDroOKUOJREwM6khYsgNn+csRgdGkRXQ=; b=WxbmblvPinIOt7sSgwKMdHsQ2IbYWDNVP4JyOTdRmBeal4OHEv/USvHrWXKyH5ApFP qDgTgzdLzUWcOCfRxclETZR3ADl9YtQq37jqCkQZKNVqBcgt6gjdGJ/E50PjR4kibyR+ TJseEYEBL9GnY90SuSKNRN0DlD+XF6hp52WXJ0CwM2xxhzRU1CLKjVqpvMfdsUI4z5fw eEXET/kCL4f6w0K42VvdhX0L8dkVaNKg19ABTXA/sYXhP0zFfddMdpXeyO71MEOfhSvm MlPeQT19xRSVlD/NeUV43+WM6z/bQc3ROWPYEMtgnekAi13OulNqPbhxXXDePBanDCmN oQFQ== X-Gm-Message-State: AIkVDXKivNSo7loLh8im0/9oIEEfHNsV63TBzk+nyr+rr+Bt0mZ2WhRXDF+f29HJIkGx+g== X-Received: by 10.84.151.69 with SMTP id i63mr27420538pli.122.1484288808206; Thu, 12 Jan 2017 22:26:48 -0800 (PST) Original-Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id s64sm9529843pfe.27.2017.01.12.22.26.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 22:26:47 -0800 (PST) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <87fuknzem8.fsf@users.sourceforge.net> 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:128055 Archived-At: On Fri, 13 Jan 2017, npostavs@users.sourceforge.net wrote: > merge 25400 25105 > tags 25400 patch > quit > > I merged the bugs, and dropped #25400 from the cc list, because I'm > getting duplicate emails everytime. Thank you. Sorry for the duplicated e-mails :-( > While I'm on a meta topic, sorry > for being hasty with merging the original patch that changed diff > movement like that. I didn't fully grasp it, nor tested like I should > have done. No problem. Indeed you are helping a lot with the bugs. Thank you very much. >> ;; then, second commit (0beb7d2968ab76878eb3be26f2d749977fdcaa2f) >> ;; add my fix for Bug#17544. > > I think the commit summary could be a bit friendlier, otherwise it looks > good to me. Thanks. I agree: if i read my own commit after some months, probably i will not fully understand it. I propose following more verbose one: Fix Bug#17544 * 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.