From unknown Sat Aug 09 13:07:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25105 <25105@debbugs.gnu.org> To: bug#25105 <25105@debbugs.gnu.org> Subject: Status: 26.0.50; diff navigation is broken Reply-To: bug#25105 <25105@debbugs.gnu.org> Date: Sat, 09 Aug 2025 20:07:56 +0000 retitle 25105 26.0.50; diff navigation is broken reassign 25105 emacs submitter 25105 Mark Oteiza severity 25105 normal tag 25105 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 04 10:13:30 2016 Received: (at submit) by debbugs.gnu.org; 4 Dec 2016 15:13:30 +0000 Received: from localhost ([127.0.0.1]:56088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDYTp-000146-VZ for submit@debbugs.gnu.org; Sun, 04 Dec 2016 10:13:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDYTo-00013t-Uo for submit@debbugs.gnu.org; Sun, 04 Dec 2016 10:13:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDYTi-0008LG-Qo for submit@debbugs.gnu.org; Sun, 04 Dec 2016 10:13:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52239) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cDYTi-0008L6-Nd for submit@debbugs.gnu.org; Sun, 04 Dec 2016 10:13:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDYTh-0002yx-Mr for bug-gnu-emacs@gnu.org; Sun, 04 Dec 2016 10:13:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDYTe-0008JD-J7 for bug-gnu-emacs@gnu.org; Sun, 04 Dec 2016 10:13:21 -0500 Received: from mail-qt0-x231.google.com ([2607:f8b0:400d:c0d::231]:35412) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cDYTe-0008IQ-C5 for bug-gnu-emacs@gnu.org; Sun, 04 Dec 2016 10:13:18 -0500 Received: by mail-qt0-x231.google.com with SMTP id c47so293432441qtc.2 for ; Sun, 04 Dec 2016 07:13:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=MGFLmHvQxMPrdaH8uL1nybrx4F/Cp9fH12V6VQT0A+c=; b=ygn8BoSwrzuPSEa/mx17Ve/rdT02exptGL5//KmHB4yQlffcuHkCAgaVuZCa5M2496 rrE47sgmY7JHkRHQwGR5L3FgVsT35q01RCAtxcEoC4Ml+sGro8WRhPAFUivXtO4oZoLN A5ezlpM22//fgVlpSg9o/oN94qj7ZSek0eG25PEWovmHZ4AlHaM6Ir4vZpWtfeHSvVKy i4L+AathAdFJBLUEP5FYXyumutWAKzsSlS2wV/PVbceHvmXJ358a0yRN+siBHUA0/8MC r1MSU7fOgvgTqoki6hNE1ug1B9C/Dz+H9E57y6BDzC4aBNsBRa1G4KxXPYybRFqUVh3U W6CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=MGFLmHvQxMPrdaH8uL1nybrx4F/Cp9fH12V6VQT0A+c=; b=doCt1zbLu5V1T+EbGZEIaEusiC1XJPiEXquSUexpw4SLsoKq20qhNKV2dCvu80zcJf Iwwa8fk7FIsLsSpXFv1RoTLCcn9UHpiy5T9Mlz0saK8Vg1fjdPEg4LzVHdrPJbGW0UTi RN085tZgqabgWJh/POM3a6tIgR24vBe1t887stmpyuHzpvanQ719E/JILIGwhHHlyOFZ HnnjkCiCmIOqiMYxNHNyQNgpj19lajjfU0hyXhDKCCuEz3i0FxpZkJRXLCQvHE8JBv22 qKP72ixAigV3MwKXjaM2ubd9xcQuC8Y4MUtBweBMNUdJ3pVXvGv+dghJBIQaZYxLMfxe gQWw== X-Gm-Message-State: AKaTC013EacCw5CrhDaPUMtFLt/NwxqCNtHGi66xzbJKCpKu2aqrvHDm+WT/HfJVc4BEPNSP X-Received: by 10.237.55.129 with SMTP id j1mr51498707qtb.133.1480864396342; Sun, 04 Dec 2016 07:13:16 -0800 (PST) Received: from holos.localdomain ([69.250.222.218]) by smtp.gmail.com with ESMTPSA id d15sm7304786qkb.10.2016.12.04.07.13.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Dec 2016 07:13:15 -0800 (PST) Received: by holos.localdomain (Postfix, from userid 1000) id AC0D960D63; Sun, 4 Dec 2016 10:13:14 -0500 (EST) From: Mark Oteiza To: bug-gnu-emacs@gnu.org Subject: 26.0.50; diff navigation is broken Date: Sun, 04 Dec 2016 10:13:14 -0500 Message-ID: <87h96jn2wl.fsf@udel.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) I am guessing this is a consequence of bug#17544. From -Q: 1. Do C-x v d RET =3D in a repository with a bunch of worktree changes 2. Hit n. Point is now at the top of the SECOND hunk 3. Go to end of buffer. 4. Hit p. Point is now at the top of the PENULTIMATE hunk Further, from -Q: 1. Find a file generated by git format-patch. I had on hand the v2 patches from bug#24966. 2. Hit M-n. Emacs complains "Can=E2=80=99t find the beginning of the file" These are all regressions from Emacs 25.1 In GNU Emacs 26.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bar= s) of 2016-12-04 built on logos Repository revision: 35a86f0b6fe5634e94212964657c538739743d72 Configured using: 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --without-gconf --with-modules --with-x-toolkit=3Dlucid 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -p= ipe -fstack-protector-strong -g -fvar-tracking-assignments -g -fvar-tracking-assignments' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 MODULES LIBSYSTEMD Important settings: value of $LC_COLLATE: C value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 04 10:26:14 2016 Received: (at 25105) by debbugs.gnu.org; 4 Dec 2016 15:26:14 +0000 Received: from localhost ([127.0.0.1]:56093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDYgA-0001NJ-5F for submit@debbugs.gnu.org; Sun, 04 Dec 2016 10:26:14 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:35935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDYg8-0001N5-Up for 25105@debbugs.gnu.org; Sun, 04 Dec 2016 10:26:13 -0500 Received: by mail-io0-f195.google.com with SMTP id s82so17435196ioi.3 for <25105@debbugs.gnu.org>; Sun, 04 Dec 2016 07:26:12 -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=Iv9wcH0RuKdztDS//f74DsdWhzmzy5N5+bKLiPyHNHE=; b=jh3sdZOtKhWLMBsM4AP/MdaG601vTmrEz/QanEpeTXnRVU9wsX0Om5ZlFWCNtdkhvU c9rCSmbUR4RfO9bYjLAS0qbFIMAzNEuMXtPtJx0VP3lo08icSlCt1Lj77a2peE0CnwpP k9oBY15DCjMvfKW8CXYrUSOuN95ekCGiCsR/lNTDOsqx0fCEC1wpOogFmCv9wi7OX32i TIqpMPwgxpJJrPW1sa6tNJhKza0sflyKILfBfRrTZa4mv8uMPf564R3eT5fKO1oeXxmi HVvnlUU561xoxDsySTXX1quoTcCkqVFpW1zmvIM7m2v5mv7w6/XV5vEYaoYAW/Xkkm68 z0tA== 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=Iv9wcH0RuKdztDS//f74DsdWhzmzy5N5+bKLiPyHNHE=; b=moxYL6XMXtVGFpoUR3AgZooglWTKihb6o/0LNNiA/8gTXuBDk7OTz54WzMOlbm4DNf E4hLzLQQpELjpCK5tss3sn4gDOEdXjsACC4Ikr/mgLSAkoPEDR5SKboZhQbO+kxAoCu6 5HPYnTsbwiPGH5mwA4CGYj1NuW3qIQM5/m+ixBWi4NAHlW2JBtCIwII5WSD8o11jJUz1 Jh5AlOXpO5ERnYwkafi0lKBkh0T/EYp5E8fUYyAsUyT4r8iRAis7Jdr5VxYnMA/d2knP dxBjx3boLPaStAN13sFRgx6Vs3VwyQje8fGra4lztL8yx8phcfHqEotoW0zFeqe6df/1 6g6Q== X-Gm-Message-State: AKaTC00TmQ5ic6t66am944qAGx2bMkc2rVZFTjQ40WcOS++5FkOD4uA34bSY2camuLZsJw== X-Received: by 10.36.189.201 with SMTP id x192mr4940746ite.114.1480865167208; Sun, 04 Dec 2016 07:26:07 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id n206sm5223358itg.1.2016.12.04.07.26.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 Dec 2016 07:26:06 -0800 (PST) From: npostavs@users.sourceforge.net To: Dima Kogan Subject: Re: bug#25105: 26.0.50; diff navigation is broken References: <87h96jn2wl.fsf@udel.edu> Date: Sun, 04 Dec 2016 10:27:05 -0500 In-Reply-To: <87h96jn2wl.fsf@udel.edu> (Mark Oteiza's message of "Sun, 04 Dec 2016 10:13:14 -0500") Message-ID: <87shq3g1fa.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Mark Oteiza writes: > I am guessing this is a consequence of bug#17544. From -Q: Yes, probably. There were some other problems pointed out at: http://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00738.html Dima, any ideas? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 04 22:15:31 2016 Received: (at control) by debbugs.gnu.org; 5 Dec 2016 03:15:31 +0000 Received: from localhost ([127.0.0.1]:56306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDjkY-0000re-QQ for submit@debbugs.gnu.org; Sun, 04 Dec 2016 22:15:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDjkX-0000rR-C4 for control@debbugs.gnu.org; Sun, 04 Dec 2016 22:15:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDjkR-0005TY-FT for control@debbugs.gnu.org; Sun, 04 Dec 2016 22:15:24 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDjkR-0005TU-C4 for control@debbugs.gnu.org; Sun, 04 Dec 2016 22:15:23 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cDjkQ-0002nD-JJ for control@debbugs.gnu.org; Sun, 04 Dec 2016 22:15:22 -0500 Subject: control message for bug 24655 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Sun, 04 Dec 2016 22:15:22 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.9 (-------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.9 (-------) block 24655 by 25105 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 05 10:38:48 2016 Received: (at 25105) by debbugs.gnu.org; 5 Dec 2016 15:38:48 +0000 Received: from localhost ([127.0.0.1]:57077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDvLs-0001uh-Ap for submit@debbugs.gnu.org; Mon, 05 Dec 2016 10:38:48 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:46693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDvLp-0001uY-Fh for 25105@debbugs.gnu.org; Mon, 05 Dec 2016 10:38:46 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D578D206D8; Mon, 5 Dec 2016 10:38:44 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 05 Dec 2016 10:38:44 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=iH9/N+s5MS3VqRVqpfkrKY+d9WE=; b=fq6Cqy OizLazHO/moZC0S7sZtCql32hqal3Djdf+znjGjS1zmeucwT8EvayMtQ2m9R+ATx OKgED19bsaVtr7ZbiksQC0RujbBe8crylDGimLaK6UbPAvydC3g2d/U1FxTDkF2H vASDmnemR6KDbLQ/UBNHUzUW3QkjLuqwAHJD8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=iH9/N+s5MS3VqR VqpfkrKY+d9WE=; b=b0Nvpcr8VoDM8VtNZN9j9sE2HW1fB+poaPOnX2L2mRgzqK yx/AwL+w4/ggjbElVRlZLWg2rKjvuuuMIA8fN5zRS+En3G31nPA8x7gLauOq1L3V C1PWXwSha9zjGKJsgxQN/cdF+XCY/hUXi0uoQaJIzpGuDNM8x9gr8UCke5AJc= X-ME-Sender: X-Sasl-enc: CLNsI7Sx0ad6E+Sdz9+Zi70qoomYBaiHOIhpbPFK8dbw 1480952324 Received: from scrawny (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 8DD957EF1F; Mon, 5 Dec 2016 10:38:44 -0500 (EST) Received: from dima by scrawny with local (Exim 4.87) (envelope-from ) id 1cDvLn-0000Cb-Ap; Mon, 05 Dec 2016 07:38:43 -0800 References: <87h96jn2wl.fsf@udel.edu> <87shq3g1fa.fsf@users.sourceforge.net> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan To: npostavs@users.sourceforge.net Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-reply-to: <87shq3g1fa.fsf@users.sourceforge.net> Date: Mon, 05 Dec 2016 07:38:43 -0800 Message-ID: <87a8cafksc.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) npostavs@users.sourceforge.net writes: > Mark Oteiza writes: > >> I am guessing this is a consequence of bug#17544. From -Q: > > Yes, probably. There were some other problems pointed out at: > http://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00738.html Hi. These are intentional. Justification: When you're at the beginning of the buffer, you're logically already at the first hunk. A justification of THIS is that if you try to apply the hunk at point from beginning-of-buffer (C-c C-a) then the first hunk is applied, and the point moves to the second hunk. This is the behavior both before and after my changes. I think the changes make diff-mode more consistent. If you disagree, let's move the discussion to emacs-devel. dima From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 05 10:53:52 2016 Received: (at 25105) by debbugs.gnu.org; 5 Dec 2016 15:53:52 +0000 Received: from localhost ([127.0.0.1]:57105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDvaS-0002HW-EO for submit@debbugs.gnu.org; Mon, 05 Dec 2016 10:53:52 -0500 Received: from mail-wj0-f195.google.com ([209.85.210.195]:35923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDvaQ-0002HJ-Ik for 25105@debbugs.gnu.org; Mon, 05 Dec 2016 10:53:51 -0500 Received: by mail-wj0-f195.google.com with SMTP id j10so12600624wjb.3 for <25105@debbugs.gnu.org>; Mon, 05 Dec 2016 07:53:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=B4EfhbmLW1kZcQFDGCUPtlL0sYzruRtCCzaA5JCUKL0=; b=cJVW+lpTJro6v1nSrsqhOpUePVczzrGCjhri9o4r/9+kH+0Zmpjx6iwS5Rjizkx5p0 vsDBeyYNVOHfegjIMbjH+xgS2ZbN6bocTn+ARziRB3iBnsEMmcPC7F51LtChxO2LkrOd cD9vcRMbQLao8zRIuNtDuOkW0dcMgDaU8w2r/krDzD1KcP0FPikoD0+wExb+kLWzvF3S 6vJCRfhqSWWJoqJvpJ11OKNDWDdSJVFEWKWBp0J0CDf65kDhoAlns3qQVjxngLCuIWmN HLtGAaQk1cBGJ27hNqxwNbcUrytWUew3s7DJ/Aia7DmqHVTjJ32KoU3azmD3/7ThfiHF PrlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=B4EfhbmLW1kZcQFDGCUPtlL0sYzruRtCCzaA5JCUKL0=; b=md6T3Yvom++qm+1KSzbWpbIvzdQI1xGqqtrM7ZRiO/fxwxhRT3LfSYkzDl3u6g4kA+ UVr1ebQWEag1sga+PdZoXfysSvzBXpzfzcyv3IFG8C0U4LYM5d6SJUTJJSXb7+015ZYB IwVfIabTQx+sp0Z2/5+ufBx9vaupE2r2IpOHvgL4YWIQ0m5RUhCwSG8A8GWAmX1EDyIl fI9ByNGSeky5aRs+EM2tTQfp73Fm7CtUlqbe7qOOx3JOPmRzMDku5sTQJNIgR83kWCJ+ afRvUdCjlWudWmM7WdQP6w99Ijsg/r10pnYcZpymmjshhKnGHTJSZVQ7OE8z93YpdWOO s/Bg== X-Gm-Message-State: AKaTC01Hx1lGhUaVmO2ouPyEZzA4uZLU+yFW/iS4ksBX4/2AywiI4s2kohmBAr2SXNvuLw== X-Received: by 10.194.173.73 with SMTP id bi9mr50131799wjc.120.1480953224541; Mon, 05 Dec 2016 07:53:44 -0800 (PST) Received: from [192.168.0.133] ([212.50.99.193]) by smtp.googlemail.com with ESMTPSA id 135sm757806wmh.14.2016.12.05.07.53.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2016 07:53:43 -0800 (PST) Subject: Re: bug#25105: 26.0.50; diff navigation is broken To: Dima Kogan , npostavs@users.sourceforge.net References: <87h96jn2wl.fsf@udel.edu> <87shq3g1fa.fsf@users.sourceforge.net> <87a8cafksc.fsf@secretsauce.net> From: Dmitry Gutov Message-ID: Date: Mon, 5 Dec 2016 17:53:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 MIME-Version: 1.0 In-Reply-To: <87a8cafksc.fsf@secretsauce.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 05.12.2016 17:38, Dima Kogan wrote: > Hi. These are intentional. Justification: Which are intentional? I've described some legitimate problems in the emacs-devel email. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 05 11:33:43 2016 Received: (at 25105) by debbugs.gnu.org; 5 Dec 2016 16:33:43 +0000 Received: from localhost ([127.0.0.1]:57162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDwD1-0003FI-CN for submit@debbugs.gnu.org; Mon, 05 Dec 2016 11:33:43 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:44961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDwCz-0003FA-6z for 25105@debbugs.gnu.org; Mon, 05 Dec 2016 11:33:41 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 27E2C20727; Mon, 5 Dec 2016 11:33:39 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 05 Dec 2016 11:33:39 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Oba XqRTx2E3wNL23stMdY+xHqqQ=; b=A0zsj+Q6FmEj+dQKi0ZK6zPC6BdtTFAThyT swPtlw4+F/lQXnKqtSbIBVL9ox7aG4vpQpTgApd134IVLWlgKvIjNRhe1AkZDfKl LZPdBUuUP6/ahs24cfDJMbyX2B9Piynwx0jmBGWCnimuiixPKwfFEW7QDUU8njUX bKSwr8Fs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=ObaXqRTx2E3wNL23stMdY+xHqqQ=; b=fc3Phjhm7TmdUx0sG4ny rRp2F/G7OHxpqr0ky0ozKBm/bGWCmxKeI+bC3vEI7JQJBcaPB6K8DlRWRZ8elels 0KviSgLVJpgkhMuEjJWKTlOBE1ISt6+ZD+xgyWsiniSsDal1eDkGedjOKE/7F9Gu CD2DGwM2Q3xKblEKoFTNodU= X-ME-Sender: X-Sasl-enc: KmrNrn4qYfl7a+zFhUmkHqYTxLUqjv7HGK20dOCSjTfX 1480955616 Received: from [22.165.224.90] (unknown [172.56.38.138]) by mail.messagingengine.com (Postfix) with ESMTPA id AC5147E8C2; Mon, 5 Dec 2016 11:33:34 -0500 (EST) User-Agent: K-9 Mail for Android In-Reply-To: References: <87h96jn2wl.fsf@udel.edu> <87shq3g1fa.fsf@users.sourceforge.net> <87a8cafksc.fsf@secretsauce.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: bug#25105: 26.0.50; diff navigation is broken From: Dima Kogan Date: Mon, 05 Dec 2016 08:33:28 -0800 To: Dmitry Gutov ,npostavs@users.sourceforge.net Message-ID: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On December 5, 2016 7:53:41 AM PST, Dmitry Gutov wrote: >On 05.12.2016 17:38, Dima Kogan wrote: > >> Hi. These are intentional. Justification: > >Which are intentional? I've described some legitimate problems in the >emacs-devel email. Sorry I wasn't clear. The points in the bug report were intentional. The auto-refinement breakage you described on the list was not, and I'll look at fixing it later today or tomorrow. My mail farted, and the message to the list to that effect apparently didn't make it From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 05 11:55:50 2016 Received: (at 25105) by debbugs.gnu.org; 5 Dec 2016 16:55:50 +0000 Received: from localhost ([127.0.0.1]:57195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDwYQ-0003l4-3t for submit@debbugs.gnu.org; Mon, 05 Dec 2016 11:55:50 -0500 Received: from mail-qk0-f169.google.com ([209.85.220.169]:36699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDwYO-0003kq-H8 for 25105@debbugs.gnu.org; Mon, 05 Dec 2016 11:55:49 -0500 Received: by mail-qk0-f169.google.com with SMTP id n21so352311190qka.3 for <25105@debbugs.gnu.org>; Mon, 05 Dec 2016 08:55:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=soNCSDyapjC2JmUzfzHNcg9S2P5/CBbhDXgaHe3ucho=; b=IaT7H34N5pozWCsGV7uZB00Uxyr7qWhVc66cXGPb8D2jFnSgb0Fc0PNKNy6I3B1WCa Twca/ufc9NCTUzTHIWhQyz83FF5xMUAbp3TuHAIrqauEYOIUyM7Nnwzs8rJHXIPGKZD2 AarQVEW+wY6uhZW4UpecVWpDXiwXpxCDMjMW3KlKEbdXrkYOT45YyBSAAaCoIVYN1gMt +J5vXZ7w7crohEb1jzL6eiUJCvJKQ4sMwzO02bqQatYb0moWvLntZjnOGDBUiBzG1P+D +b+vFwC9sBoUEmT+qfl51lk/MBqu32//tYUJt3WFqnvFLJb5XJcdgs5QRFt3RvuQrOYR p9Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=soNCSDyapjC2JmUzfzHNcg9S2P5/CBbhDXgaHe3ucho=; b=Ic2aTD6OTSTiDFUfQ1K7/XS8+L6WnVIMRDgvV7Uqd9RWLWx0hygiYm+ijXqfCdpLCD A+sJe1MC2UuI8DlFUP94/8T0JuikrIyGGzGB3Z1O2TP1gcwckxz1L/+xNV93g+f1+Vi7 xBbCwiIUDx0XznIozEP/thDDnTN8Ea64rEF7al+QXHz2Y1pm6iPrMDkWcd9aZiXbRf6k YOlhRkYICnOR0/lZmpaJxQnQCMHitGr/HZc2RZS49BvkBN4eCDBKRYU19QWToK/52Q6b Y+bxNsuGVyMnSyp1lIigILRAUEUUlt5OJroAPr5D4xxPnwSkFf82d23nTF7jOSHj8Ise c+fQ== X-Gm-Message-State: AKaTC015Om42u87/rAcqOU3m7bowEUq3kart4zYtDAy+jJfTHrqCYKqkp9RmcJrjbvOBJGyv X-Received: by 10.55.170.131 with SMTP id t125mr50415708qke.15.1480956942789; Mon, 05 Dec 2016 08:55:42 -0800 (PST) Received: from holos.localdomain ([69.250.222.218]) by smtp.gmail.com with ESMTPSA id i19sm9853732qte.8.2016.12.05.08.55.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2016 08:55:41 -0800 (PST) Received: by holos.localdomain (Postfix, from userid 1000) id EB93760D63; Mon, 5 Dec 2016 11:55:40 -0500 (EST) Date: Mon, 5 Dec 2016 11:55:40 -0500 From: Mark Oteiza To: Dima Kogan Subject: Re: bug#25105: 26.0.50; diff navigation is broken Message-ID: <20161205165540.GA19421@holos.localdomain> References: <87h96jn2wl.fsf@udel.edu> <87shq3g1fa.fsf@users.sourceforge.net> <87a8cafksc.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1+65 (d6c10244793f) (2016-10-04) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, npostavs@users.sourceforge.net, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 05/12/16 at 08:33am, Dima Kogan wrote: > On December 5, 2016 7:53:41 AM PST, Dmitry Gutov > wrote: > >On 05.12.2016 17:38, Dima Kogan wrote: > > > >> Hi. These are intentional. Justification: > > > >Which are intentional? I've described some legitimate problems in the > >emacs-devel email. > > Sorry I wasn't clear. The points in the bug report were intentional. > The auto-refinement breakage you described on the list was not, and > I'll look at fixing it later today or tomorrow. My mail farted, and > the message to the list to that effect apparently didn't make it I find it very hard to believe that the behavior in the second recipe is intentional. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 05 12:49:17 2016 Received: (at 25105) by debbugs.gnu.org; 5 Dec 2016 17:49:17 +0000 Received: from localhost ([127.0.0.1]:57235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDxO9-00053E-G0 for submit@debbugs.gnu.org; Mon, 05 Dec 2016 12:49:17 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:55891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDxO7-000536-Bd for 25105@debbugs.gnu.org; Mon, 05 Dec 2016 12:49:15 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CF25D20826; Mon, 5 Dec 2016 12:49:14 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 05 Dec 2016 12:49:14 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=AlasXutWs+D09Ku6RxHthcNg82E=; b=oJrVPJ pFK33nwuyOAQDKOA+EIrX314c43p8LXFOwetrzc8wBb57l+p6oB/8E0IgyEmFyD8 5Tyvb2KeMBrG6j2TzQ6pPAxOdW1MOQ+L5DD/d284TIbsx//NwUBMLdyY6LT/Obl3 b3re2i4W1zbi1OV9+j6b318n8LtJ2f3oCuvuc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=AlasXutWs+D09K u6RxHthcNg82E=; b=ZJRKqM8g4p7S1btxrBCoHC7NPtY6to7qLIqHrhRkUJkzU+ IeeOo2+hJ1mruzCyem1vMJTAaZnATWAeaEijnllIt79+7JqpRG7YzfK/48CGnwgx NCTE1/duPz6ugc9QojRGKISi+5p5c3ACzBmXHNj2I+EdOO+bwkQwni0TwvNdE= X-ME-Sender: X-Sasl-enc: QXQV7FNbKuxyaRVtNEtrgSUJZnmannTjFYNeNhEPV9Ef 1480960154 Received: from shorty.local (unknown [128.149.110.210]) by mail.messagingengine.com (Postfix) with ESMTPA id 850B47E7A5; Mon, 5 Dec 2016 12:49:14 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.87) (envelope-from ) id 1cDxO5-0002vT-Ba; Mon, 05 Dec 2016 09:49:13 -0800 References: <87h96jn2wl.fsf@udel.edu> <87shq3g1fa.fsf@users.sourceforge.net> <87a8cafksc.fsf@secretsauce.net> <20161205165540.GA19421@holos.localdomain> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan To: Mark Oteiza Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-reply-to: <20161205165540.GA19421@holos.localdomain> Date: Mon, 05 Dec 2016 09:49:13 -0800 Message-ID: <87r35muuzq.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, npostavs@users.sourceforge.net, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Mark Oteiza writes: > I find it very hard to believe that the behavior in the second recipe > is intentional. I missed that part of the bug report. Sorry about that. That is a bug that I haven't seen at all earlier. Will look at fixing it today or tomorrow. Thanks for reporting. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 07 02:29:08 2016 Received: (at 25105) by debbugs.gnu.org; 7 Dec 2016 07:29:09 +0000 Received: from localhost ([127.0.0.1]:58776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEWf6-0001pM-OL for submit@debbugs.gnu.org; Wed, 07 Dec 2016 02:29:08 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:45589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEWf4-0001pE-LW for 25105@debbugs.gnu.org; Wed, 07 Dec 2016 02:29:07 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 21A9B208EF; Wed, 7 Dec 2016 02:29:06 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 07 Dec 2016 02:29:06 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=fMunbGB+qZeZnHylsiZK7wGTIGA=; b=n2GSPd Bj/hrpvmABqVXH+p8+NnfjGAZPtLTPXjPo1l/mz1T5CakoO7lNbagBDc4RMQ72Ol HGcZVD8YUZT8tsFfTT6+lCdAWshz2Oq8tUE1UUAVBqIw8V0yPh2wyN4w8YN/ER/0 envnqGkqQbPSfVckbzJeqL9xpFPGk3DiJeVr0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=fMunbGB+qZeZnH ylsiZK7wGTIGA=; b=hK3hPLE0cyb26x6u2qWVVe5a/KJ6XcRNnZac1P+SN/pFJ6 G8+keKpaynEWl1InwzoQFJoASFrGgRvFZirn8HpcyJu7Ez442MTCi2zPZvfNciOX zzdgt4IUcUqDicMJOeBX19TIzS7Bl7+OyK1AQELZiv1BDi1QLf4BKbptHO8Mk= X-ME-Sender: X-Sasl-enc: NNyrNK0+xJB+VU9U1VEyHT5FKfC37U+C5pB+gMqzr1rl 1481095745 Received: from scrawny (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 8DA497EC40; Wed, 7 Dec 2016 02:29:05 -0500 (EST) Received: from dima by scrawny with local (Exim 4.87) (envelope-from ) id 1cEWf2-0007Gk-7P; Tue, 06 Dec 2016 23:29:04 -0800 References: <874m2q1oca.fsf@gmail.com> <878trtoluv.fsf@udel.edu> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan To: Mark Oteiza Subject: Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation In-reply-to: <878trtoluv.fsf@udel.edu> Date: Tue, 06 Dec 2016 23:29:04 -0800 Message-ID: <874m2gfb9b.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, emacs-devel@gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Mark Oteiza writes: > Fixing C-c C-a to DTRT is great, thanks, but I don't think the > off-by-one navigation changes to "n" and "p" (diff-hunk-next, > diff-hunk-prev) make sense. While it may have made fixing the issues > mentioned in the commit message easier, the changes to what "n" and "p" > do at the beginning and end of a diff are not documented, and I didn't > see any discussion of it in the associated bug. > > I contend that the new behavior is inconsistent with the behavior of > other outline/thing-with-headers type things in Emacs. outline-mode, > org-mode, and rst-mode are the first ones that come to mind. Can you give a specific example of interaction in any of these modes that is analogous to the off-by-one behavior you're referring to? The fundamental question is what hunk diff-mode should think the point is looking at, when it is in some non-diff message above the first hunk. The answer I chose for the new navigation logic is "first hunk". You could also choose "invalid hunk, not a hunk at all", which would imply that C-c C-a and M-ret and such shouldn't work there. Better suggestions welcome. > It's also not clear how the introduced oddity with auto-refine is going > to be resolved, unless a way is found to autorefine the first hunk > without there being any user interaction. Then opening a diff has > inconsistent auto-refining from the start. I don't use auto-refinement, so didn't notice the breakage. Will look at it in a bit. In the meantime, I'm attaching a patch to address the 2nd point in the bug report (25105). This serves to treat the junk before the first hunk (i.e. commit message from 'git format-patch') as a file header. Looks reasonable? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=diff-mode-handle-initial-junk.patch diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 5b48c8d..41476bd 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -768,7 +768,7 @@ diff-beginning-of-file-and-junk (setq prevfile nextfile)) (if (and previndex (numberp prevfile) (< previndex prevfile)) (setq prevfile previndex)) - (if (and (numberp prevfile) (<= prevfile start)) + (if (numberp prevfile) (progn (goto-char prevfile) ;; Now skip backward over the leading junk we may have before the --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 25 01:57:11 2016 Received: (at 25105) by debbugs.gnu.org; 25 Dec 2016 06:57:11 +0000 Received: from localhost ([127.0.0.1]:54265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cL2k3-0006yP-IR for submit@debbugs.gnu.org; Sun, 25 Dec 2016 01:57:11 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:32912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cL2k1-0006yH-Cu for 25105@debbugs.gnu.org; Sun, 25 Dec 2016 01:57:10 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 13975205DE; Sun, 25 Dec 2016 01:57:09 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 25 Dec 2016 01:57:09 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=SICCd67p4AZpu2P81+H5oRfIYaU=; b=EE7CSZ r/tqBI8GwekJLNBlkZFrlYYTzmpv9fORPw9iEAgKRdh5yStMh80sn7DxKMiCz7YE dWe3nJJ4q+2JkhPdnjm+a5PEaK2RC1Vl27u3B8r61sXA9/D7lN5wD//WxqlO8GmY OcLgbRbCMK8BNNqk35bOas7UsvrcV+QiXXzI4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=SICCd67p4AZpu2 P81+H5oRfIYaU=; b=sV1h2J2CuzSwWLcfYPpLUUzvslXEdj4KqXK1KUoxaOkKC4 cafFPNo3SGiKwavYQDDUGiqIKz/AloeFbYgjj9NjZ8/EkOm7GQFJVRYZmV1NDhU7 HehTBqmsF5Zd6rYBpg/Q3lwXf9d3EpgJMgY+ErkQdgvzBTnnOcTdLnWKzObLU= X-ME-Sender: X-Sasl-enc: /AYaXTm71RE0P+Ajb4HfCHxyW8dANIFJuB3x59i9Fyhk 1482649028 Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id BA5C524240; Sun, 25 Dec 2016 01:57:08 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.87) (envelope-from ) id 1cL2jz-0003o4-Ac; Sat, 24 Dec 2016 22:57:07 -0800 References: <87h96jn2wl.fsf@udel.edu> <87shq3g1fa.fsf@users.sourceforge.net> <87a8cafksc.fsf@secretsauce.net> <20161205165540.GA19421@holos.localdomain> <87r35muuzq.fsf@secretsauce.net> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan To: Mark Oteiza Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-reply-to: <87r35muuzq.fsf@secretsauce.net> Date: Sat, 24 Dec 2016 22:57:07 -0800 Message-ID: <87h95sebss.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, npostavs@users.sourceforge.net, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Dima Kogan writes: > Mark Oteiza writes: > >> I find it very hard to believe that the behavior in the second recipe >> is intentional. > > I missed that part of the bug report. Sorry about that. That is a bug > that I haven't seen at all earlier. Will look at fixing it today or > tomorrow. Thanks for reporting. I pushed the fix to this. What do yall want to do about the other logic? Are any of yall planning to revisit this? If not, let's close this bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 25 08:54:40 2016 Received: (at 25105) by debbugs.gnu.org; 25 Dec 2016 13:54:40 +0000 Received: from localhost ([127.0.0.1]:54430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cL9G4-0004S2-14 for submit@debbugs.gnu.org; Sun, 25 Dec 2016 08:54:40 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:36295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cL9G3-0004Rp-9P for 25105@debbugs.gnu.org; Sun, 25 Dec 2016 08:54:39 -0500 Received: by mail-qk0-f194.google.com with SMTP id h201so22381925qke.3 for <25105@debbugs.gnu.org>; Sun, 25 Dec 2016 05:54:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=38rcsfK0pqMmVSe3MYuguJZLB7v7fZDaV1KJqqBNkM0=; b=P+829u9BUfqhi3gskGwLh9Irof3AS7m3QA6SrNt3SmMTXJ59ztKw9jMpqGi15lkV3h j5taaJ3OWuRrLzI0a/FNu2tFoIjKfiB2ZGvS5rTkUPD8K2Pe1WFYeZE0KmXxRWMevYa9 ie8HBXlx7q6PiO649DCWvuGVeH6ZkDdrJOuNegkBBc7GAKD1B1O5AeZh73qjy542mQLg XArp3csOt5jkZbwxvTsUsr+36idMBU+YcIxuweuogJpsQZZKiO+Ar1wHJXMdmjQCIkCM dLGT6Caw/DV9ctULNwXMJYaye2KEkGy+uPslA7cBSYRuzpcojOrx+rS/HFYq4FtZOqqh mWBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=38rcsfK0pqMmVSe3MYuguJZLB7v7fZDaV1KJqqBNkM0=; b=gXY28dRk0kMf7sIXu3YPrXsUaitwZ32Vf70IfIn+cqCam/lzWqwtEj8gP5s8yI9CfT RY4umbdRvJINO7OrN4aCFfjkR43zS3P2tDzdHVjICTtDKdmF9Zob9WfaE0UrmZmigEIJ FDTgx+cITJYU0F7yDkm7WJ0Vl6r2NWSXBEZzFC6kjZs5LFeDEBmDgRMbRnw3yZtmQcNN 2K47zm0qLkMjlFIprSx+G1B1jATSo+k9FkSRihB3lgchMR6cMSO+pNCGHhjR9LuaIPwh kUhC4o1a9n4WG33tGGeV5XY/RgWFv6l1h40T/GJqdX0uxWjYOOjSYZ0pIXYea5tv5DFh yqfg== X-Gm-Message-State: AIkVDXLOIxXNxkhwh7COAVtiZ8iC3fW0BaA+iSzmHoFgt/jT9EPssU+0tag1BrqRsrt7GpvP X-Received: by 10.55.109.133 with SMTP id i127mr25325603qkc.295.1482674073793; Sun, 25 Dec 2016 05:54:33 -0800 (PST) Received: from holos.localdomain ([69.250.222.218]) by smtp.gmail.com with ESMTPSA id c198sm24316601qka.48.2016.12.25.05.54.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Dec 2016 05:54:32 -0800 (PST) Received: by holos.localdomain (Postfix, from userid 1000) id 10D7266143; Sun, 25 Dec 2016 08:54:32 -0500 (EST) Date: Sun, 25 Dec 2016 08:54:32 -0500 From: Mark Oteiza To: Dima Kogan Subject: Re: bug#25105: 26.0.50; diff navigation is broken Message-ID: <20161225135432.GA1083@holos.localdomain> References: <87h96jn2wl.fsf@udel.edu> <87shq3g1fa.fsf@users.sourceforge.net> <87a8cafksc.fsf@secretsauce.net> <20161205165540.GA19421@holos.localdomain> <87r35muuzq.fsf@secretsauce.net> <87h95sebss.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h95sebss.fsf@secretsauce.net> User-Agent: Mutt/1.7.2+8 (b112fd7061fb) (2016-11-26) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, npostavs@users.sourceforge.net, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 24/12/16 at 10:57pm, Dima Kogan wrote: > Dima Kogan writes: > > > Mark Oteiza writes: > > > >> I find it very hard to believe that the behavior in the second recipe > >> is intentional. > > > > I missed that part of the bug report. Sorry about that. That is a bug > > that I haven't seen at all earlier. Will look at fixing it today or > > tomorrow. Thanks for reporting. > > I pushed the fix to this. What do yall want to do about the other logic? > Are any of yall planning to revisit this? If not, let's close this bug. I will be revisiting this, just haven't gotten around to it. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 20:14:38 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 01:14:38 +0000 Received: from localhost ([127.0.0.1]:44151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPJ78-0003Bx-Aw for submit@debbugs.gnu.org; Thu, 05 Jan 2017 20:14:38 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPJ76-0003Bl-SH for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 20:14:37 -0500 Received: by mail-pg0-f66.google.com with SMTP id g1so42276025pgn.0 for <25105@debbugs.gnu.org>; Thu, 05 Jan 2017 17:14:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version; bh=5SW8GyIs30lUoCa6XKhxtYgOAReyTylnIDOKRr+UjDc=; b=dUkZqGCkwwiFEdXHYYVMNMUaNh3LG9Nv0FF3bFsxAp3bEzfUq+eqsgLipccUpjovZu bMBeL39gTJm0pjAUvxSMNRO7uaSf4lpqiwLhzouW3dIUyLdkmcYCS3HWi+wpGB2XF5ZW +ZXKVi7XplP43yQelZWX2r1OBOZHhvcAppTXNR7nr37BpRMYsKjUuKb/LgVZY3SSSmK5 4Ot9JprcRp6FpMAvppoh6EmvQtI9s2cgyh2x6MyuNnweP71MOH+0icVX6lfLfAankzjO SAW1aYkwyln2wH5okV0K0TSg9OEhOmVcJw7EIaT3GuYlcZbh2gqGilJoKqs/IHmFea2a vNcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=5SW8GyIs30lUoCa6XKhxtYgOAReyTylnIDOKRr+UjDc=; b=qNfkHAjlAyDGmC4PjQNIcNqMdhh2ny4xg05PyVWu5LzQRj7EVGfE1o1ZbfWp0xOIr3 bLOTfo1+Dkh7oDPDuZXg/RvB8YtwFEoCbkD18lPnFxB1lg8CZjN9tmCwK5Ym/MciCEzd 7Rys8vOHngHv9Vy7dfcGjZWJXynsdEwCFx+qsnpqIrb/JCa9rjnEibLaz/MnByg3D3i2 hW3TIjM4RZOchCJRg+IvWNC8Wz6CQfyzivVaZ4QTFfD/123TFtM24a027PhaGiRzh7um tPzoRLP9ZrQy84r5MX0YRUIImfP2AYk/Yy3+31jnf8DgC8xi5UVlMqOQMBawgDwe7Wa7 VKxw== X-Gm-Message-State: AIkVDXKvuxdVgKql3hIj2HX2nbGE22aMT9KOGCwoZ8xjaEUDADggxXDn+aef3fJkqZvkrQ== X-Received: by 10.99.6.140 with SMTP id 134mr129569157pgg.53.1483665270998; Thu, 05 Jan 2017 17:14:30 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id o77sm10385275pfk.7.2017.01.05.17.14.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jan 2017 17:14:30 -0800 (PST) From: Tino Calancha To: Dima Kogan Subject: bug#25105: 26.0.50; diff navigation is broken Date: Fri, 06 Jan 2017 10:14:25 +0900 Message-ID: <87inpt6lce.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org, Dmitry Gutov , tino.calancha@gmail.com, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Mark Oteiza writes: > I am guessing this is a consequence of bug#17544. From -Q: > > 1. Do C-x v d RET = in a repository with a bunch of worktree changes > 2. Hit n. Point is now at the top of the SECOND hunk > 3. Go to end of buffer. > 4. Hit p. Point is now at the top of the PENULTIMATE hunk FWIW, to me this behaviour is very annoying and it has being around already a while without a fix (4 months). I would propose to revert the commit causing this misbehaviour. Then, once the patch is mature enough, it can be pushed again without affecting users. Dima Kogan writes: > I pushed the fix to this. What do yall want to do about the other logic? If for 'the other logic' you mean Mark's recipe above, then what i want is: above recipe behaves exactly as it does in Emacs-25; that behaviour is very convenient to read diffs. Tino From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 20:20:51 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 01:20:51 +0000 Received: from localhost ([127.0.0.1]:44161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPJD9-0003Me-5j for submit@debbugs.gnu.org; Thu, 05 Jan 2017 20:20:51 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:44755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPJD7-0003MW-T5 for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 20:20:50 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 398B020CAA; Thu, 5 Jan 2017 20:20:49 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 05 Jan 2017 20:20:49 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=M8TA+FOiFb2/wzeFcFG/DT5nvzc=; b=FeePz+ g4WQlcdDe0nHs/ShQhux2JiVn8NL675AxjpLRpGXyiyzuL5ZxO6NpbMIbFuIvk9v M9PVHU00vv4F+gfd5DZCV/ydSYUpiHisip5ZSMaEwfOMiLCkhKfrsrG16a4Xd/KA /ljJO+nxvp9/3ldJYmX4dnR9SHEwDSs7mH+U0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=M8TA+FOiFb2/wz eFcFG/DT5nvzc=; b=ADKrIXt6t7aDOB1Fo2pongr2A3mIjJjzJ7Nf3jFt5h7a+X 5jWAR7qmiLapVWf7QrtCeydOOsLqeCE5+BIgHS8i+OajeM8EA+keGJOw3pSat5tU +C4uvPqJ4Aar/FQTqg8+VWky21hTIMmivblxRGLlIwKDldp42LvtZ0Vpfrvmc= X-ME-Sender: X-Sasl-enc: XW1PvK4NumUaJfjuBfrZK7EM4tKP7u0oK/ilQXjEvgTQ 1483665648 Received: from shorty.local (unknown [128.149.110.210]) by mail.messagingengine.com (Postfix) with ESMTPA id E576F24789; Thu, 5 Jan 2017 20:20:48 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.88) (envelope-from ) id 1cPJD5-0001y8-QN; Thu, 05 Jan 2017 17:20:47 -0800 References: <87inpt6lce.fsf@gmail.com> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan To: Tino Calancha Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-reply-to: <87inpt6lce.fsf@gmail.com> Date: Thu, 05 Jan 2017 17:20:47 -0800 Message-ID: <87tw9dc7bk.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org, Dmitry Gutov , npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Tino Calancha writes: > Mark Oteiza writes: > >> I am guessing this is a consequence of bug#17544. From -Q: >> >> 1. Do C-x v d RET = in a repository with a bunch of worktree changes >> 2. Hit n. Point is now at the top of the SECOND hunk >> 3. Go to end of buffer. >> 4. Hit p. Point is now at the top of the PENULTIMATE hunk > FWIW, to me this behaviour is very annoying and it has being > around already a while without a fix (4 months). > I would propose to revert the commit causing this misbehaviour. > Then, once the patch is mature enough, it can be pushed again without > affecting users. Hi. This isn't a misbehavior, it's the whole point of the patch. We can argue about whether it's an improvement or not, but if this is a "bug", then the solution is a full revert. The behavior I want is to always have a consistent idea of which hunk we are currently on. In the recipe above, between steps 1 and 2 the point is at bob. Both before and after the patch, the codes agree that we are on the hunk 1. When you press 'n', I thus argue you should end up at hunk 2. Similary, when you press C-c C-a; it should apply the first hunk, and move to the second. And so on. What would you like? From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 20:27:25 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 01:27:25 +0000 Received: from localhost ([127.0.0.1]:44175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPJJV-0003Xw-Cc for submit@debbugs.gnu.org; Thu, 05 Jan 2017 20:27:25 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:40754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPJJT-0003Xm-Kl for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 20:27:23 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6BEA5209EE; Thu, 5 Jan 2017 20:27:23 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 05 Jan 2017 20:27:23 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=ByqaEQ048aWv9NO6MyyPVh4gb8o=; b=bz3Uv8 WpvEyCNvdB8uvU4B9cvX/7VkNd+yeQ4hIMabBw8Mk6gJ6VBVNc+l+lyviS9iQi+7 lZZX2zZ/oxaXt2yUOg1KWKAjcRmrXFMoP1o9XRCSj90dtZAspdojnrEn5/OWJX+A 979mjMsC7zx3tMUVOe6w2dNOSupxubNBzZgU8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ByqaEQ048aWv9N O6MyyPVh4gb8o=; b=AtzDddwL4ijFrJdjwMQVTSUJP35gAUSnAneycSrkt63g1q ldtTGTPoo/Iu0BeOgtwWXqdpCAITPSnjD6tZ/4lje6MJZCYjudfc3jl8e/o8Gf9L 29OiOO3jcZdo1Nwqxb5Vth2kb8AD40MXQC7VI8OaJofMbEFMFSegCcbMGz5NI= X-ME-Sender: X-Sasl-enc: UqN/I/PnE7vdVWsdyYrcNMvx4d6ehrJOzpCfiC4PRn+1 1483666043 Received: from shorty.local (unknown [128.149.110.210]) by mail.messagingengine.com (Postfix) with ESMTPA id 24BFF2478A; Thu, 5 Jan 2017 20:27:23 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.88) (envelope-from ) id 1cPJJS-000226-89; Thu, 05 Jan 2017 17:27:22 -0800 References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan To: Tino Calancha Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-reply-to: <87tw9dc7bk.fsf@secretsauce.net> Date: Thu, 05 Jan 2017 17:27:22 -0800 Message-ID: <87shoxc70l.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org, Dmitry Gutov , npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Dima Kogan writes: > The behavior I want is to always have a consistent idea of which hunk we > are currently on. Some more behaviors that I think are desirable are described in the commit message of the main patch: https://github.com/emacs-mirror/emacs/commit/2c8a7e50d24daf19e From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 21:58:21 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 02:58:21 +0000 Received: from localhost ([127.0.0.1]:44207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPKjU-0007if-Ta for submit@debbugs.gnu.org; Thu, 05 Jan 2017 21:58:21 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:35125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPKjT-0007iS-CG for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 21:58:20 -0500 Received: by mail-qk0-f196.google.com with SMTP id u25so60506163qki.2 for <25105@debbugs.gnu.org>; Thu, 05 Jan 2017 18:58:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ewKOQLgjpNd1WsgXsv/QdHwvpPQsMQh9V9KbUj7EZaY=; b=rVoOVDvkYjr3R5IN/+Dfj8cHY9j0WLWR8QITnAvPrd3bE7itNrMUzy2tv3uh55CUF2 Ni3ZotBL9VbtyWJmfkunejIwCSrryBu7peAkOlCDW2OdSbEb9uzEnSGKuN07Jmm/5p2/ AsJ2Q32y0oTjkJLZXuJlufYZ1mPEpNqOcjg84RbS1nvZhfw1SBaT+B8j2T+/2l6GTt/w Bm08v1HKuvc5V7r/9MRx5vqCc0UuSfLMrHtXc9dXUseKFluoPs0Q7HIU8nyb/wB5Qq5j 7g2eujlcx9QJonFWEKnIVfQuPl+/pWUPC4Pcvqnb4PzudxM6nvTONpyDuOzJqGNaN9sV YyBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ewKOQLgjpNd1WsgXsv/QdHwvpPQsMQh9V9KbUj7EZaY=; b=TFELD7jmReVGuyCB8AfyCUgq2wpCe0hIGb9pmi1Af/YsxeWpfl1iNtT1tzYSlzgJI3 KEENe7UyfSIBJhd6gVdv/p6OAyZ6Tj1tRrpLWGpByYFMRi+McugX90IRyXF1S5p8CeWV DT2W09rATsCei0+Z8fPgFStBOPyyWDEd5pEuVyF7l2/U/Wab7VsXvyl/kuEptZnU6hYc q+4AGzoQKp0DN/gPMKKJVdtkEL3TYo9v/bCGJgrVRrG9iqF5hppuTcelxwSZOg97Zp2a s21MIQBcjPxho/l/SLqTtmHnMYk0ZCe4fWprxKbIJsZNMwFUvZEkDMlOh26F5xJ6rcqq s6WA== X-Gm-Message-State: AIkVDXK5V0Mh+9fsrGvl6b8Z9Plpv4eqmFMSe/JAzafs2YO9NT/2KHYcPM9P25VZkrTh1QYX X-Received: by 10.55.122.134 with SMTP id v128mr68610399qkc.111.1483671493745; Thu, 05 Jan 2017 18:58:13 -0800 (PST) Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id e63sm49542474qkc.29.2017.01.05.18.58.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 18:58:12 -0800 (PST) Received: by holos.localdomain (Postfix, from userid 1000) id 231A560D63; Thu, 5 Jan 2017 21:58:11 -0500 (EST) Date: Thu, 5 Jan 2017 21:58:11 -0500 From: Mark Oteiza To: Dima Kogan Subject: Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation Message-ID: <20170106025811.GA1101@holos.localdomain> References: <874m2q1oca.fsf@gmail.com> <878trtoluv.fsf@udel.edu> <874m2gfb9b.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874m2gfb9b.fsf@secretsauce.net> User-Agent: Mutt/1.7.2+12 (2bc2ec9ac664) (2016-11-26) X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, emacs-devel@gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) On 06/12/16 at 11:29pm, Dima Kogan wrote: > Mark Oteiza writes: > > > Fixing C-c C-a to DTRT is great, thanks, but I don't think the > > off-by-one navigation changes to "n" and "p" (diff-hunk-next, > > diff-hunk-prev) make sense. While it may have made fixing the issues > > mentioned in the commit message easier, the changes to what "n" and "p" > > do at the beginning and end of a diff are not documented, and I didn't > > see any discussion of it in the associated bug. > > > > I contend that the new behavior is inconsistent with the behavior of > > other outline/thing-with-headers type things in Emacs. outline-mode, > > org-mode, and rst-mode are the first ones that come to mind. > > Can you give a specific example of interaction in any of these modes > that is analogous to the off-by-one behavior you're referring to? I wrote about how your changes are make diff-mode _not_ analogous. > The > fundamental question is what hunk diff-mode should think the point is > looking at, when it is in some non-diff message above the first hunk. > The answer I chose for the new navigation logic is "first hunk". You > could also choose "invalid hunk, not a hunk at all", which would imply > that C-c C-a and M-ret and such shouldn't work there. Better suggestions > welcome. One might argue that C-c C-a and friends in a file header should apply all hunks in a file, or perhaps that there should actually be diff-apply-file commands, etc. The way n and p worked was not a bug, yet you gratuitously changed them, and broke auto-refinement. Why do I have to now hit two keys to refine the first hunk, and one key to refine the second? > > It's also not clear how the introduced oddity with auto-refine is going > > to be resolved, unless a way is found to autorefine the first hunk > > without there being any user interaction. Then opening a diff has > > inconsistent auto-refining from the start. > > I don't use auto-refinement, so didn't notice the breakage. Will look at > it in a bit. It's on by default, so this statement perplexes me. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 22:06:15 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 03:06:15 +0000 Received: from localhost ([127.0.0.1]:44212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPKr8-0007x7-Ns for submit@debbugs.gnu.org; Thu, 05 Jan 2017 22:06:14 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:34237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPKr7-0007wu-32 for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 22:06:13 -0500 Received: by mail-qk0-f195.google.com with SMTP id e1so5071697qkh.1 for <25105@debbugs.gnu.org>; Thu, 05 Jan 2017 19:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=NcS88T3RFUG8247h+6Ajqvs/uueal5Vyt4gOJG7Iack=; b=WEhc4yRuJqKQo/JJ3yGQ2L8jyvtfqFJiqisSG/npCJSqWQ9LOLMt7oqrO8gFeQ3kgH UfppsPPTaV9Yi3CxXUj7/bdV1bEcoGhbrt9Dggza8ryCIc4vvkU2pevtxy1lJMtU8EOf fSqy7uDFw32ox0BBlHlbec+OQBTf2BayMmVnrWYiEoHCwv6foROCeIZJV3ZDtPtuO9FX Gr81PCT+MnD0gwW+tw8PbUxnfMyR1LnJQftpY0kj5IE2EXRSnz5OsJRfHGR4E8YVdPHq iWgErLYt/3scdTqGNU+6yyf69zWil0BuCDg774BUxXlzN+8tbiuD/gvoJ64Of+2m5EcO a5SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=NcS88T3RFUG8247h+6Ajqvs/uueal5Vyt4gOJG7Iack=; b=M+LtKLLlYXe4r52Q3mYDEdkCoUWBy6m+KsIXIk9oKrie60Bmh6EDUXdX2A+NFrvXhe 8NMVvCQ7E1v8l4KDXFDgnojyb+EIsM+nQUnc7rxNN6LGDPS5YPWMnGEewMJzgpXtZli/ JR18pSV8bXieQNc3JClZw2q1TufsCIpKU78wqPIpzYyF/4O5yW7ZDex6jee38vZx5YxI cEECf8bgZZEweMhM/xnC8g6NDFb0kyMY/HrJypxgWMtwsYIXf/frff6qWnfnJBNm8Vzb B6DnKAf+Sumpm8tAKpefKV47I+UylCz7kGK6BqSqP9AdX093ik7pdUyyLvqSISzjTwoC PacQ== X-Gm-Message-State: AIkVDXK8Is3kao9fixs4V2xhmDizp7WXfRDRwzOmdeRtj7lwQog7ZcDkX4T30lB4qvSTh53T X-Received: by 10.55.142.194 with SMTP id q185mr70565812qkd.82.1483671967693; Thu, 05 Jan 2017 19:06:07 -0800 (PST) Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id z22sm49567261qkb.22.2017.01.05.19.06.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 19:06:07 -0800 (PST) Received: by holos.localdomain (Postfix, from userid 1000) id A2B0360D63; Thu, 5 Jan 2017 22:06:06 -0500 (EST) Date: Thu, 5 Jan 2017 22:06:06 -0500 From: Mark Oteiza To: Dima Kogan Subject: Re: bug#25105: 26.0.50; diff navigation is broken Message-ID: <20170106030606.GB1101@holos.localdomain> References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87shoxc70l.fsf@secretsauce.net> User-Agent: Mutt/1.7.2+12 (2bc2ec9ac664) (2016-11-26) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, npostavs@users.sourceforge.net, Dmitry Gutov , Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 05/01/17 at 05:27pm, Dima Kogan wrote: > Dima Kogan writes: > > > The behavior I want is to always have a consistent idea of which hunk we > > are currently on. > > Some more behaviors that I think are desirable are described in the > commit message of the main patch: > > https://github.com/emacs-mirror/emacs/commit/2c8a7e50d24daf19e The only mention of the changes to navigation is "Better navigation logic". Not documented in NEWS, and no tests for the corner cases. I fail to see how fixing corner cases in diff-apply-hunk has anything to do with diff-{file,hunk}-{next-prev} At first glance, it looks like the following patch would restore the previous behavior, however it completely breaks auto refinement. diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 9dfcd944bb..3442b01d12 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -625,7 +625,7 @@ diff--wrap-navigation ;; inner one does not, which breaks the loop. (defun diff-hunk-prev (&optional count skip-hunk-start) "Go to the previous COUNT'th hunk." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) + (interactive (list (prefix-numeric-value current-prefix-arg) nil)) (diff--wrap-navigation skip-hunk-start "prev hunk" @@ -636,7 +636,7 @@ diff-hunk-prev (defun diff-hunk-next (&optional count skip-hunk-start) "Go to the next COUNT'th hunk." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) + (interactive (list (prefix-numeric-value current-prefix-arg) nil)) (diff--wrap-navigation skip-hunk-start "next hunk" @@ -647,7 +647,7 @@ diff-hunk-next (defun diff-file-prev (&optional count skip-hunk-start) "Go to the previous COUNT'th file." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) + (interactive (list (prefix-numeric-value current-prefix-arg) nil)) (diff--wrap-navigation skip-hunk-start "prev file" @@ -658,7 +658,7 @@ diff-file-prev (defun diff-file-next (&optional count skip-hunk-start) "Go to the next COUNT'th file." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) + (interactive (list (prefix-numeric-value current-prefix-arg) nil)) (diff--wrap-navigation skip-hunk-start "next file" From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 22:09:45 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 03:09:45 +0000 Received: from localhost ([127.0.0.1]:44216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPKuX-000832-9l for submit@debbugs.gnu.org; Thu, 05 Jan 2017 22:09:45 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:34884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPKuV-00082n-Ms for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 22:09:43 -0500 Received: by mail-qk0-f193.google.com with SMTP id u25so60532103qki.2 for <25105@debbugs.gnu.org>; Thu, 05 Jan 2017 19:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7exrjTKgxLFO25kYwIDO/TNPfIyc5Bd40fdbAFDPYHI=; b=qxNTnB7nxclbN5PXyoL67jGQSVMcGS/R+D270dCtm96jOeLH/9newb2k97jlF4YkTz fFCglCnp3Nh+00W4TTlHLuW0tCIAuuyaqW+mkqX0G9rTvB4WootdJaYrDWaMZkwrQov5 9BA28VYvq0STY+v9T8Zn4W+ZIi4OVNGTtH7O0pTKcSqO7/Ajs2gPn1bZ7vlpPdKMQgg5 6zea1JsHWHtZpiybcpWyROjAuODxRw/OCo3U+Fp+UcLtb7x+0bdR5jaDO0en220Jnbgv LnmHg64jg/kyOOIhqThTGAID7O7Np41b3vlUzETbGuvJBh3CspYmd3wk59C2m4JfYyCW AU+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7exrjTKgxLFO25kYwIDO/TNPfIyc5Bd40fdbAFDPYHI=; b=c8YXpCk7Tg7ZDhdmbcBsbLVA2pviTMArR7gs8dDXJcVT4UvWek9h48Z4m6LHZY/EWr LZ9L3OaKpw+2GS9ZNHoob7/QOJtBtoLw4LhSfDwEP/ir5DqT96ElJxbVfg7N69jbWkuv Uciyn7xv+HNo8VB/Fr6Mc+sJ7nF1nL8/uZBnQdYLfORKzU0T2hJcvr3skMN4nY6lImTC 8eYcBHrjUlLu19JPYB6TAvKQJmlfLJnkD5bL2FZCEKT9205N912Ldc5+55cJcqcmCSR3 eueThUeRqTyTtc/QrQMitKxDLH+XPHMYuODF5iB2ZhO36KaIrMWnpe4lUfjZFEqUvB8l ZaHQ== X-Gm-Message-State: AIkVDXK9iMoKT9aaWBgrwt8Ih/JZxuRYPki3o0rxwWbSLYzUXIbL5PgKNodP24G9e2yQDHic X-Received: by 10.55.77.134 with SMTP id a128mr5999689qkb.186.1483672178297; Thu, 05 Jan 2017 19:09:38 -0800 (PST) Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id 16sm49402235qtt.38.2017.01.05.19.09.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 19:09:37 -0800 (PST) Received: by holos.localdomain (Postfix, from userid 1000) id F063C60D63; Thu, 5 Jan 2017 22:09:36 -0500 (EST) Date: Thu, 5 Jan 2017 22:09:36 -0500 From: Mark Oteiza To: Dima Kogan Subject: Re: bug#25105: 26.0.50; diff navigation is broken Message-ID: <20170106030936.GC1101@holos.localdomain> References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tw9dc7bk.fsf@secretsauce.net> User-Agent: Mutt/1.7.2+12 (2bc2ec9ac664) (2016-11-26) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, npostavs@users.sourceforge.net, Dmitry Gutov , Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 05/01/17 at 05:20pm, Dima Kogan wrote: > Tino Calancha writes: > > > Mark Oteiza writes: > > > >> I am guessing this is a consequence of bug#17544. From -Q: > >> > >> 1. Do C-x v d RET = in a repository with a bunch of worktree changes > >> 2. Hit n. Point is now at the top of the SECOND hunk > >> 3. Go to end of buffer. > >> 4. Hit p. Point is now at the top of the PENULTIMATE hunk > > FWIW, to me this behaviour is very annoying and it has being > > around already a while without a fix (4 months). > > I would propose to revert the commit causing this misbehaviour. > > Then, once the patch is mature enough, it can be pushed again without > > affecting users. > > if this is a "bug", > then the solution is a full revert. With the number of actual bugs (email/format-patch/pre-diff content, and auto refinement) the initial patch caused, perhaps this is best. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 22:50:23 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 03:50:23 +0000 Received: from localhost ([127.0.0.1]:44222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLXr-0000ud-Gb for submit@debbugs.gnu.org; Thu, 05 Jan 2017 22:50:23 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLXp-0000uL-6E for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 22:50:21 -0500 Received: by mail-pf0-f193.google.com with SMTP id f144so295374pfa.2 for <25105@debbugs.gnu.org>; Thu, 05 Jan 2017 19:50:21 -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=rIktY9eg9OJCxvXsbjUQaFHw1R19uTvbzWhrfJQVFa0=; b=ggTbGtOwptzqO57O4M5GxuI6+5X5kJgj0IoDsSNbm5adPN4E7VTiAiNsCeuEynNEPd AKxxAhiETz90rdvoN4HQfig5ApM5eZx6B+FkbDvEL8cOJa2Xc0UxQPDw9Gbx4wNip6KU N24lzrrS/2axTa0H1T4knSFfjb7l4FpgaP1JF8/jFe6koexSPL9aGiuUppQrr3yB6iRs hBPm60W7XndUPpKB74gJMYoFKnJfBqIrV+Hc1ipqbpl6qHDmNPz01147ezTTSz6s31Bz SixamWLatT3QvMiuCCDO14N55zaexf/MlUnScKA3HwVtbw9Mvjt18N7phU+mxUeC4bQE AwgA== 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=rIktY9eg9OJCxvXsbjUQaFHw1R19uTvbzWhrfJQVFa0=; b=MmNaCmr+PYUNaIQCfA/wU6yULyOpgduW5WLaEiEl6Ij1v5RTThEm5dEl5rp92HguFC 0uE5nGJ1SrAry/U7JQs7DLBoL4mJ3HulzVL/RR8h2+nKLqgQcBEz7d578O3GnfZAHH+d VLdTfNFZ3NfoSefUVe1GIoxZDBN1baKxxwuypInJjE9YAmfdyMnjg38xFWDaGUoI0X21 IZUQ4O/FVOcieTpJTk9C1spBe+b4Pj6spQ6r58b+G7QoSOWAXWzNxTExsSXZJDoxup86 vN840wLEpbJ0Dd8Xm6Kh0uyiXWCSk3N+gQ9WYbYNw65WnwK7fn7V0QsTm24CuO+Uol/a ceeQ== X-Gm-Message-State: AIkVDXKXvItNu/GisguBSgZ8pFwk7byozzuS7oGkuWixQo7O5Fmsbn3QYZBNLxISt0PQoQ== X-Received: by 10.84.128.1 with SMTP id 1mr5366938pla.55.1483674614953; Thu, 05 Jan 2017 19:50:14 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id f3sm80289732pga.1.2017.01.05.19.50.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 19:50:14 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 6 Jan 2017 12:50:11 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Mark Oteiza Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-Reply-To: <20170106030606.GB1101@holos.localdomain> Message-ID: References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, npostavs@users.sourceforge.net, Dmitry Gutov , Dima Kogan , Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Thu, 5 Jan 2017, Mark Oteiza wrote: > At first glance, it looks like the following patch would restore the > previous behavior, however it completely breaks auto refinement. > > diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el > index 9dfcd944bb..3442b01d12 100644 > --- a/lisp/vc/diff-mode.el > +++ b/lisp/vc/diff-mode.el > @@ -625,7 +625,7 @@ diff--wrap-navigation > ;; inner one does not, which breaks the loop. > (defun diff-hunk-prev (&optional count skip-hunk-start) > "Go to the previous COUNT'th hunk." > - (interactive (list (prefix-numeric-value current-prefix-arg) t)) > + (interactive (list (prefix-numeric-value current-prefix-arg) nil)) > (diff--wrap-navigation > skip-hunk-start > "prev hunk" > @@ -636,7 +636,7 @@ diff-hunk-prev > > (defun diff-hunk-next (&optional count skip-hunk-start) > "Go to the next COUNT'th hunk." > - (interactive (list (prefix-numeric-value current-prefix-arg) t)) > + (interactive (list (prefix-numeric-value current-prefix-arg) nil)) > (diff--wrap-navigation > skip-hunk-start > "next hunk" > @@ -647,7 +647,7 @@ diff-hunk-next > > (defun diff-file-prev (&optional count skip-hunk-start) > "Go to the previous COUNT'th file." > - (interactive (list (prefix-numeric-value current-prefix-arg) t)) > + (interactive (list (prefix-numeric-value current-prefix-arg) nil)) > (diff--wrap-navigation > skip-hunk-start > "prev file" > @@ -658,7 +658,7 @@ diff-file-prev > > (defun diff-file-next (&optional count skip-hunk-start) > "Go to the next COUNT'th file." > - (interactive (list (prefix-numeric-value current-prefix-arg) t)) > + (interactive (list (prefix-numeric-value current-prefix-arg) nil)) > (diff--wrap-navigation > skip-hunk-start > "next file" Hi Mark, i have checked out your patch and your right: it recovered the Emacs-25 behaviour in your snippet code. Tino From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 23:16:19 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 04:16:19 +0000 Received: from localhost ([127.0.0.1]:44230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLwx-0001bn-12 for submit@debbugs.gnu.org; Thu, 05 Jan 2017 23:16:19 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:46606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLwv-0001bf-3a for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 23:16:17 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 201D820D92; Thu, 5 Jan 2017 23:16:15 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 05 Jan 2017 23:16:15 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=Kfj++cIvCk/tTnj36vDlGog6JP0=; b=S4HJK/ dRlgVlgLV2RXpUEzVsDYGW/4K+pGU7K90Ld4DcgPjyfo9N3imFT8tEUb7mUzWPVF NQxGTYGtvcZ2ov5QAEyyl4z+wMF7FaC7VdrcCePeZbUhVD82fB9zioETv6ZmVSbx 6XjgstcHhYPVkV+vCiV9bPaMgXAJ8TebiN7v4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Kfj++cIvCk/tTn j36vDlGog6JP0=; b=CmVGCNOE4C3Nu6zra5xmauBzIC2YZbT5Ztibas/KIIUBjT G7NrtqnNQu6u22RTXknHOmNvgxusYSt85W8etcExrpz/oUF3vqxF+PCbEeE9S2CF wt9jbUOqaZ6Yf4H8nkPdsbI1DVkv8qL9rLLdhBRCZ4QVVLAX2ygm8k10ZdyGs= X-ME-Sender: X-Sasl-enc: ojZM4fGh54W2DJ3yJ1m8Wt0TEOodMY6nwAzVRqmagbf5 1483676174 Received: from scrawny (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 5B8ED249A5; Thu, 5 Jan 2017 23:16:14 -0500 (EST) Received: from dima by scrawny with local (Exim 4.88) (envelope-from ) id 1cPLwq-0000P6-Mg; Thu, 05 Jan 2017 20:16:12 -0800 References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> User-agent: mu4e 0.9.19; emacs 26.0.50.1 From: Dima Kogan To: Mark Oteiza Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-reply-to: <20170106030606.GB1101@holos.localdomain> Date: Thu, 05 Jan 2017 20:16:12 -0800 Message-ID: <87lguovn5f.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: 25105@debbugs.gnu.org, npostavs@users.sourceforge.net, Dmitry Gutov , Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Mark Oteiza writes: > On 05/01/17 at 05:27pm, Dima Kogan wrote: >> Dima Kogan writes: >> >> > The behavior I want is to always have a consistent idea of which hunk we >> > are currently on. >> >> Some more behaviors that I think are desirable are described in the >> commit message of the main patch: >> >> https://github.com/emacs-mirror/emacs/commit/2c8a7e50d24daf19e > > The only mention of the changes to navigation is "Better navigation > logic". Not documented in NEWS, and no tests for the corner cases. I just re-read the commit message, and I think it's clear that it touches navigation. I'm not a seasoned contributor to this project, so I don't know what the policy is regarding NEWS. In either case, that is irrelevant: we'd still be having this conversation. Tests would be good, as always. However the diff-mode prior to this patch had no tests, and I've been using this code every day for years. And again, this doesn't matter. The issues in question aren't unintended bugs, and they would have passed any tests I would have written. > I fail to see how fixing corner cases in diff-apply-hunk has anything > to do with diff-{file,hunk}-{next-prev} The issues being fixed are making anything that operates on hunks more consistent, so diff-{file,hunk}-{next-prev} are relevant. > At first glance, it looks like the following patch would restore the > previous behavior, however it completely breaks auto refinement. > > If you want to restore the previous behavior, wouldn't a revert be better? Or are you trying to restore only a subset of the previous behavior? > With the number of actual bugs (email/format-patch/pre-diff content, > and auto refinement) the initial patch caused, perhaps this is best. The email/format-patch issue has nothing to do with me; it has been a problem for years. The way to "fix" auto-refinement is to invoke auto-refinement in a diff-mode-hook, as suggested earlier. The bug reporter didn't like that, and I don't know what they want. I'm not sure where the pre-diff content issue came from. Likely it came up because the patch that was in the BTS for years wasn't what ended up being merged, so I haven't sufficiently tested it. Lesson learned. I consider the current behavior a significant improvement in usability, but if there's a consensus that it's a step backward, then I'll go back to carrying this patch in my local tree. Let me ask the few people I know who would be using this code at all to get at least anecdotal feedback. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 23:23:01 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 04:23:01 +0000 Received: from localhost ([127.0.0.1]:44235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPM3Q-0001m3-QU for submit@debbugs.gnu.org; Thu, 05 Jan 2017 23:23:01 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:35509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPM3P-0001lo-By for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 23:22:59 -0500 Received: by mail-pg0-f65.google.com with SMTP id i5so42741612pgh.2 for <25105@debbugs.gnu.org>; Thu, 05 Jan 2017 20:22:59 -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=tzIw0iI7XE2n3iIuFjbq/Pb9GwuWS9Q9kTWqFGyFiqM=; b=oeWGBSTBfQwhobQA5YhwK5rAORDq6sbgE9vnGHnWtzoASeOMcFXevIJZzfSG8txwDM nQ2slYMtEsP5GZRg0HKG5kpTmeqzoeiSGtJdUBQUJcmLwDKIm4oDNZSNkVvHnLUVmpQL elFONyMFNgi/VJLd7uyw6+SuJ5Cjj+JISmX7pYZFw5pBpG2WnWz25W7EJc4A1U5uTuUz rYp2z9ls/msoFbXx8fcNuUnIz1T2fnQC0qJGxxagul81/X/tEs8nCmHZGR3AFQHdID+N x7ZCSLFgZm6ry6Yyrj9hexsBjWoOaKMbmZVthv6hcDTpT2x1rBBStXPcRMysJ+YzyuIO 2g1w== 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=tzIw0iI7XE2n3iIuFjbq/Pb9GwuWS9Q9kTWqFGyFiqM=; b=Q6jp7zn57iehOOh5sO6C3RA5dDXOraP7w3kJon3fBGciG0JPYfcq/q1rvhqPHROrOF hCMKAWvemcbiovsLo7KJmyiUdEJmsWDYvEDG5Gxc8L3sT9UO++H0CzwUN/LsADNbMx/V DTf5hl+nCUc4r+ffx7Kc2hKLR2yJKmGB0XTdSKyniU5gds4OFYZGVSvkhir2+XBAJt+x 6jsbWV7wn2fqomK+wBSe18uhtx7iJ2NoctZbZOiPkScDPdwbHn25VgOdh4YtoICZi3f+ eVV3BZKjK7/i5Um5ynxGQC3tzilJaLq/RfvvFrGh3t/FBFpdr0zX7IiSlnc6oxfPyUIh evqg== X-Gm-Message-State: AIkVDXL/RG/6viPaIMmvA4V7YXdQmV12x/28WSAwdO0TWNZAe0cY7zX08y+AdPVsMkjsag== X-Received: by 10.84.210.167 with SMTP id a36mr165040151pli.125.1483676573391; Thu, 05 Jan 2017 20:22:53 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id u3sm156582002pfk.3.2017.01.05.20.22.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 20:22:52 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 6 Jan 2017 13:22:49 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Dima Kogan Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-Reply-To: <87tw9dc7bk.fsf@secretsauce.net> Message-ID: References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: npostavs@users.sourceforge.net, Tino Calancha , Mark Oteiza , eliz@gnu.org, Dmitry Gutov , schwab@linux-m68k.org, 25105@debbugs.gnu.org, larsi@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Hi Dima, thanks for your prompt replay. i am sorry, i didn't follow the discussion in Bug#17544, so i just realized its effects once the patch was pushed; those effects affect my everyday use of Emacs. (Added as CC the people who joined Bug#17544). On Thu, 5 Jan 2017, Dima Kogan wrote: > This isn't a misbehavior, it's the whole point of the patch. We can > argue about whether it's an improvement or not My point is that Bug#17544 is not a bug, it's a feature. Your fix just breaks the feature. > if this is a "bug", then the solution is a full revert. It might be the right thing to do. I was actually very happy with how Emacs-25 deal with this issue. Another posibility is the patch that Mark just sent to this thread. > The behavior I want is to always have a consistent idea of which hunk we > are currently on. IMO, this is not a good idea. Things depend of the perspective. If you are in one hunk or another it depends of what you want to do. That is part of the feature. >Navigation and use of diff buffers had several annoying corner cases that this >patch fixes. These corner cases were largely due to inconsistent treatment of >file headers. Say you have a diff such as this: I disagree, ideed i found it very consistent (see below). > --- aaa > +++ bbb > @@ -52,7 +52,7 @@ > hunk1 > @@ -74,7 +74,7 @@ > hunk2 > --- ccc > +++ ddd > @@ -608,6 +608,6 @@ > hunk3 > @@ -654,7 +654,7 @@ > hunk4 > >The file headers here are the '---' and '+++' lines. With the point on such a >line, hunk operations would sometimes refer to the next hunk and sometimes to >the previous hunk. Most of the time it would be the previous hunk, which is not >what the user would expect. It seems some users expect it :-) >This patch consistently treats such headers as the >next hunk. So with this patch, if the point is on the '--- ccc' line, the point >is seen as referring to hunk3. it's totally consistent to not consider the file header the same if you are not doing the same operation. If i am at --- ccc then, i want `diff-hunk-next' bring me to the line: @@ -608,6 +608,6 @@ and `diff-hunk-prev' bring me to the line: @@ -74,7 +74,7 @@ To this happen, in the first case the point must be considered at hunk2, but in the second case, the point must be considered in hunk3. To me, this is pretty consistent with the intended (and useful) behaviour. Regards, Tino From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 23:43:46 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 04:43:46 +0000 Received: from localhost ([127.0.0.1]:44241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPMNW-0002Jt-JV for submit@debbugs.gnu.org; Thu, 05 Jan 2017 23:43:46 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPMNV-0002Je-9Z for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 23:43:45 -0500 Received: by mail-qt0-f195.google.com with SMTP id f4so1681067qte.2 for <25105@debbugs.gnu.org>; Thu, 05 Jan 2017 20:43:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=IhFxW3aris0urghwr7E3sKE1PMGw2SkO4qGb5LQyhcY=; b=s0b3MKnWbQ8BZg5KXSUA83oHjSwaG4yU3zT5TC1yuUxwcB2itfbGYlxMtQgFhMCQ// OdWKB3ycPhML+llCxcAV4asqXKI+PlRW2w8ugzbqqL/gqBuZ8I4RXsjRvsj4t27m5Psz GEyGR3DOpJeA2QgKEavqWzFkkJXGIy6cs4I2NCnATgyrItNdCkwLpKd1iqhzGqtCEQuG Zm1LiRaSSgOgGPpXK3JK2luR3V6FRRBvt18efKWTL+IUiPtT1fpfi8QX7eoxWEbH4nU/ TukXIWqo3NWdAKDEHqEx8KVodmCP+dC+d+X9ACsw7E5yrg9SOedpAQGCKjfkA6+J/2bX qs2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=IhFxW3aris0urghwr7E3sKE1PMGw2SkO4qGb5LQyhcY=; b=itiNINJGFAc5lgN5hUq9S5Sqs9KrS5Y6M6ZlEQzDoOVxMfwq1PCeGyjCyPZliXPpPg JqK/gI5pYiDueIQP1EIeDsx1XXhpJcoY6lhQT59bkvMsaj20LLEcoxU1UTKvXOfoN0DM 9j5Ti2FdrQ12weyRC8eAq8PlZBWOe64WiZX4glTnk8vkeBD6bezUZfAkTzPiP5Vu5cYQ B0K40vEqWNCV+0Nb+klXMkjxsSAOAsRnEtYj0T4UNfQOOfNFaqT/3xb80wsoljZACyux xK+7GvHLqm3ja0ERaN2WIS0XQNt0dhuAZ7xnhFwBY+XolsFrIvZmBeQx1Jrh5y7E3bdN +jDw== X-Gm-Message-State: AIkVDXKfRBUm5CseMHirUGj5RvLYqJtIYtDTGcvIGWUT3cTeenGE5lVktlJhfSLndqQL3ZQo X-Received: by 10.200.52.221 with SMTP id x29mr76661608qtb.19.1483677819575; Thu, 05 Jan 2017 20:43:39 -0800 (PST) Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id c41sm31813472qtd.3.2017.01.05.20.43.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 20:43:38 -0800 (PST) Received: by holos.localdomain (Postfix, from userid 1000) id A840360D63; Thu, 5 Jan 2017 23:43:37 -0500 (EST) From: Mark Oteiza To: Dima Kogan Subject: Re: bug#25105: 26.0.50; diff navigation is broken References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> Date: Thu, 05 Jan 2017 23:43:37 -0500 In-Reply-To: <87lguovn5f.fsf@secretsauce.net> (Dima Kogan's message of "Thu, 05 Jan 2017 20:16:12 -0800") Message-ID: <87h95cpzly.fsf@udel.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 25105 Cc: npostavs@users.sourceforge.net, 25105@debbugs.gnu.org, Tino Calancha , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) Dima Kogan writes: > Mark Oteiza writes: >> I fail to see how fixing corner cases in diff-apply-hunk has anything >> to do with diff-{file,hunk}-{next-prev} > > The issues being fixed are making anything that operates on hunks more > consistent, so diff-{file,hunk}-{next-prev} are relevant. and this entire thread is about the contention over changes specifically done to diff-{file,hunk}-{next-prev}. To quote myself: "Fixing C-c C-a to DTRT is great, thanks, but I don't think the off-by-one navigation changes to "n" and "p" (diff-hunk-next, diff-hunk-prev) make sense." https://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00222.html >> At first glance, it looks like the following patch would restore the >> previous behavior, however it completely breaks auto refinement. >> >> > > If you want to restore the previous behavior, wouldn't a revert be > better? Or are you trying to restore only a subset of the previous > behavior? I did not submit it as a solution to the problem at hand. The fact that the patch breaks auto-refinement means that I cannot define my own commands to call (diff-{file-hunk}-{prev-next} ARG nil) and have it work. Put another way, your changes make it nigh impossible to get the previous n,p,{,} back without breaking something. >> With the number of actual bugs (email/format-patch/pre-diff content, >> and auto refinement) the initial patch caused, perhaps this is best. > > The email/format-patch issue has nothing to do with me; it has been a > problem for years. Yes it did, as the second recipe in this bug and 6b6abe0d clearly show. > The way to "fix" auto-refinement is to invoke > auto-refinement in a diff-mode-hook, as suggested earlier. The bug > reporter didn't like that Probably because auto-refinement is default behavior that got broken. > I'm not sure > where the pre-diff content issue came from. Likely it came up because > the patch that was in the BTS for years wasn't what ended up being > merged, so I haven't sufficiently tested it. Lesson learned. > > I consider the current behavior a significant improvement in usability, > but if there's a consensus that it's a step backward, then I'll go back > to carrying this patch in my local tree. Let me ask the few people I > know who would be using this code at all to get at least anecdotal > feedback. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 02:55:45 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 07:55:45 +0000 Received: from localhost ([127.0.0.1]:44409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPPNI-0007Xq-Ry for submit@debbugs.gnu.org; Fri, 06 Jan 2017 02:55:45 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPPNI-0007Xf-69 for 25105@debbugs.gnu.org; Fri, 06 Jan 2017 02:55:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPPN8-00010B-Hq for 25105@debbugs.gnu.org; Fri, 06 Jan 2017 02:55:38 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPPMj-0000mR-Ms; Fri, 06 Jan 2017 02:55:09 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4198 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cPPMi-0000x9-HD; Fri, 06 Jan 2017 02:55:09 -0500 Date: Fri, 06 Jan 2017 09:55:26 +0200 Message-Id: <83mvf4d3m9.fsf@gnu.org> From: Eli Zaretskii To: Dima Kogan In-reply-to: <87lguovn5f.fsf@secretsauce.net> (message from Dima Kogan on Thu, 05 Jan 2017 20:16:12 -0800) Subject: Re: bug#25105: 26.0.50; diff navigation is broken References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.2 (--------) X-Debbugs-Envelope-To: 25105 Cc: mvoteiza@udel.edu, npostavs@users.sourceforge.net, 25105@debbugs.gnu.org, tino.calancha@gmail.com, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) > From: Dima Kogan > Date: Thu, 05 Jan 2017 20:16:12 -0800 > Cc: 25105@debbugs.gnu.org, Dmitry Gutov , > Tino Calancha , npostavs@users.sourceforge.net > > I consider the current behavior a significant improvement in usability, > but if there's a consensus that it's a step backward, then I'll go back > to carrying this patch in my local tree. Another alternative is to have a customizable option which will let users decide what behavior they want. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 03:03:49 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 08:03:49 +0000 Received: from localhost ([127.0.0.1]:44427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPPV7-0007mB-DK for submit@debbugs.gnu.org; Fri, 06 Jan 2017 03:03:49 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPPV5-0007lu-9w for 25105@debbugs.gnu.org; Fri, 06 Jan 2017 03:03:47 -0500 Received: by mail-pg0-f68.google.com with SMTP id b1so43284352pgc.1 for <25105@debbugs.gnu.org>; Fri, 06 Jan 2017 00:03:47 -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=h7HVAkZogE26d44MRRXFWm3GjkAyajJKmO4lthacB6Q=; b=ntak3rvBNEj29/ugJ77PnWwarahUkDfV8lAsambEDQL0cSeXMZ77295LRjKhrmzRcV pizX1BlwCb7v/6aCg/Kwh4jjLwuzs7qeTWg5C0Q6QZF3nB1FHBkvI+eegzuf1mAHKinm 2O+U8pGQet3s+Pqd2ekJFkUV/jR3TgCdJwhdeID4TiIGXIZN4MTA/+WwHl8kYkxV6BQK l3kSjp9C2eaWxkHIuyxKQ/Z7Sd8ovIdmIjvhxmf/ZLosYnQfISD7q4dKDpWBM0PvKu+1 hkPDyJ+26Bvi37QRmme63OHYRjmX2V7R1/AHB54BEb1Rp3LgXjizQQIVxyHt3lJ/lPQe L2Pw== 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=h7HVAkZogE26d44MRRXFWm3GjkAyajJKmO4lthacB6Q=; b=fXiZJQWkcD0mfY5QHRdBB/6SrhZdKIaIUKM45DupTwJabX4YSuCjMgl6Ay13PsLF/Q +k1ojV3ZxBc7O5RFc37IxivpzXrjEKpeQPAFGVqaRHQJxorEzUlhbV78ufmnu9ZZnFO5 AJCUMWKccGCcErf8I58YfSCRQyaDzDINUJhbklfPseQCHPa1qConDWXzZBDpCTN1i7Lx kcajOBKiczEMoxXAV3sLGXwYcw8ywDx98oolVRgg8DVJWZMdvdtXKXRo9ASNZAwvuzY4 XI802hTv6D7jqImVqZ9PPzhMtKo6FL56G5loxXsyaPfv517i3iUauGiMGuZGm5YMSHsj llyg== X-Gm-Message-State: AIkVDXLVF+p7kaHQaH/H9wfF3t87RY7JTVwnbXV6PBNq/KuuKzR9TWGWLKQUkLEk7aw4rg== X-Received: by 10.84.231.134 with SMTP id g6mr12742471plk.40.1483689821534; Fri, 06 Jan 2017 00:03:41 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id l63sm101601106pfl.83.2017.01.06.00.03.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 00:03:41 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 6 Jan 2017 17:03:37 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Eli Zaretskii Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-Reply-To: <83mvf4d3m9.fsf@gnu.org> Message-ID: References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> <83mvf4d3m9.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: npostavs@users.sourceforge.net, tino.calancha@gmail.com, mvoteiza@udel.edu, dgutov@yandex.ru, 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Fri, 6 Jan 2017, Eli Zaretskii wrote: >> From: Dima Kogan >> Date: Thu, 05 Jan 2017 20:16:12 -0800 >> Cc: 25105@debbugs.gnu.org, Dmitry Gutov , >> Tino Calancha , npostavs@users.sourceforge.net >> >> I consider the current behavior a significant improvement in usability, >> but if there's a consensus that it's a step backward, then I'll go back >> to carrying this patch in my local tree. > > Another alternative is to have a customizable option which will let > users decide what behavior they want. That would be OK. I would suggest to set this option nil by default, i.e., disable the new feature by default for backward compatibility. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 09:14:48 2017 Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 14:14:48 +0000 Received: from localhost ([127.0.0.1]:44572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPVI8-0003Ym-9J for submit@debbugs.gnu.org; Fri, 06 Jan 2017 09:14:48 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPVI6-0003Ya-VG for 25105@debbugs.gnu.org; Fri, 06 Jan 2017 09:14:47 -0500 Received: by mail-lf0-f68.google.com with SMTP id k62so3393348lfg.0 for <25105@debbugs.gnu.org>; Fri, 06 Jan 2017 06:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=udfseOqcK6mlFfr7uRjWytJCcanxuo73LYwAq1u5M0w=; b=j6TEGfxZDXKHJjgypMWOffZxapg1RqxjD631aG94qK9L9XNCiNpcQdjB5WBYFdHfma ulZrhOhxYX4qGsKeoasWUiK7b8FClNwXy9P+pdqEly1B26DAuI5B9+w+3nxImYbeGEhB Og5LRkCgn8ZVzznsWoOTnVhiL8hNzCpr8cCM5h1pOLrPddcdXeWyAkM65LO/usXUHDmL QYk9+oIfLH/mhusWl7IG6IosfQUDQZGy4E01InBs1T6KuAtUYGeHs3btxJVSxxNfochf N4c3uRxQIh0kDsa2tONV3uYtSIAu4RR1AuN0CbLkJnWLvHtWW5LOBr7V5JZ4plwoDDQF uo7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=udfseOqcK6mlFfr7uRjWytJCcanxuo73LYwAq1u5M0w=; b=LvUCKuE+X3mNfaOjbebrtbXY9EIGJZmgqjgpODtGdmI7JWOgfGDJKruvG7jGw//Rgg uq5RPPLY3ZVpfmy9/jYyZHHG74IUugjvkQJwjLg0seuD43XVboTkLQa+3SIkfY0tdeS4 Kpx1zOkUuhsbRwaFLMRuL5yH0LaFkd34tOsJeMBFPry3PFxRcRPxn/Glz+S64GsjrCQ2 0Pb6UpCtii8R+KEz2UJoFUZLc9jvZQPK8a9UcewX4Z2UhUfihQ6jH5S0XtDN2uLCOO5R MLbN4iCWKuy/XOQD4VeTPWne69YcctTdP7Fz6eWj1HQ/9agn33rOErMDpOK1qL05nRaM zdtw== X-Gm-Message-State: AIkVDXJTuEMdoapPe549suDyi5qxw9bhglbfy9V+q2dPAP6auf7eRy4f3ZboIG/bfQQAOg== X-Received: by 10.25.19.170 with SMTP id 42mr22573609lft.174.1483712081056; Fri, 06 Jan 2017 06:14:41 -0800 (PST) Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id v26sm230346ljb.14.2017.01.06.06.14.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 06:14:40 -0800 (PST) Subject: Re: bug#25105: 26.0.50; diff navigation is broken To: Tino Calancha , Eli Zaretskii References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> <83mvf4d3m9.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Fri, 6 Jan 2017 17:14:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 06.01.2017 11:03, Tino Calancha wrote: >> Another alternative is to have a customizable option which will let >> users decide what behavior they want. > That would be OK. I would suggest to set this option nil by default, > i.e., disable the new feature by default for backward compatibility. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.68 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.68 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 25105 Cc: mvoteiza@udel.edu, 25105@debbugs.gnu.org, Dima Kogan , npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 06.01.2017 11:03, Tino Calancha wrote: >> Another alternative is to have a customizable option which will let >> users decide what behavior they want. > That would be OK. I would suggest to set this option nil by default, > i.e., disable the new feature by default for backward compatibility. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.68 listed in dnsbl.sorbs.net] 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.68 listed in wl.mailspike.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid On 06.01.2017 11:03, Tino Calancha wrote: >> Another alternative is to have a customizable option which will let >> users decide what behavior they want. > That would be OK. I would suggest to set this option nil by default, > i.e., disable the new feature by default for backward compatibility. If separating behavior into two parts that are controlled by a switch would be feasible (I'm not sure), it might be okay. However, the new behavior also fixes what was undoubtedly a problem: When point is a bob in a diff-mode buffer, `C-c C-a' applies the first hunk, and then stops at its beginning (in Emacs 25 and earlier). We would then give up on that fix, whereas I'd prefer to have a solution eventually, if not now. But if we do, I estimate we might have the "old fixed" behavior encroach on the "new different" behavior in certain respects, making the code even more complex. I've honestly thought that Dima's patch's main purpose was to fix that bug. And everything else we now complain about are just implementation's side-effects. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 20:55:10 2017 Received: (at 25105) by debbugs.gnu.org; 7 Jan 2017 01:55:10 +0000 Received: from localhost ([127.0.0.1]:45467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPgDu-0003y0-C8 for submit@debbugs.gnu.org; Fri, 06 Jan 2017 20:55:10 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPgDt-0003xn-34 for 25105@debbugs.gnu.org; Fri, 06 Jan 2017 20:55:09 -0500 Received: by mail-pf0-f194.google.com with SMTP id b22so4289507pfd.3 for <25105@debbugs.gnu.org>; Fri, 06 Jan 2017 17:55:08 -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=GblfX2VyZa7RRQ9s5HdtIRW++Mep0iFGOeQKRFSTpzU=; b=L1m9sknAgwXIJeyfF7qVs0uqghvoAztao3nLRiHsFQPPNKo1czUTWYRcETpoAdA0W2 Hv1VSUR92AgOeqAF0MjneYVK6aWPltopiQ34pT1HFjr9RZbo0wRnclylfmHp2+CDOaQ3 LtmRjYdMutedYjmf1Vha8nUlISMNiThTJJP6RCGp4O/Sk3ufPXjM9ogr9/1qL1IJWnmD 37SdNI53aOfofwLVPrBI1zoDSM/tI/2Kmgi8XsTLfCZj8rcaasqg34JNM0X6u/Wm5O3t 2dCxRkaVuArORDxPgwEdo0ksSWSerlj5SwpQkC1EZ1bNf9VYggtvnphmnytydIA2LcTJ UKwA== 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=GblfX2VyZa7RRQ9s5HdtIRW++Mep0iFGOeQKRFSTpzU=; b=is8wb75b170x7Oi8Zy7hqXhmD2TjmnOvfwoGsS7hbZtZ/NmXCrjUI6DKgc7/cDKMGw FjvfhNaigXAbKX2chEfjKlxSvWeGM0bcgqV13+dEVE+Pz1B6cUBwBUkM3x73x2pRUqtG uzGXN1V0DmrGAIfV85wMMS/vPSWTD3bgTr9hisT+5w7rLWCWP25Xxzo6SxOQZs3IzsFT cDuzMicTBqiUHtkvtCorX1Fq0k09fYP0LygG6rxP7TVEhVL0teQffIXs0XIVmOult7va cQuDVLRHB3maIVKcOx+vCjHJ1rJvwj6dVaLVfQVCPXBCKHi1aS/RyvgkzVJUzLjM7llE cX2g== X-Gm-Message-State: AIkVDXLIhP50+LknUpc3tC+TEBmPCZy3jrIqIqfOtOjUKgwQxB4XQixSihIgcI5sjeLiAw== X-Received: by 10.99.123.3 with SMTP id w3mr139385651pgc.155.1483754103063; Fri, 06 Jan 2017 17:55:03 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id n84sm113103798pfk.25.2017.01.06.17.55.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 17:55:02 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 7 Jan 2017 10:54:59 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Dmitry Gutov Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-Reply-To: Message-ID: References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> <83mvf4d3m9.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 25105 Cc: npostavs@users.sourceforge.net, Tino Calancha , Dima Kogan , mvoteiza@udel.edu, Eli Zaretskii , 25105@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Fri, 6 Jan 2017, Dmitry Gutov wrote: > However, the new behavior also fixes what was undoubtedly a problem: > > When point is a bob in a diff-mode buffer, `C-c C-a' applies the first hunk, > and then stops at its beginning (in Emacs 25 and earlier). Honestly, i wasn't aware of `C-c C-a' functionality so i didn't realized that aim of the patch. > We would then give up on that fix, whereas I'd prefer to have a solution > eventually, if not now. But if we do, I estimate we might have the "old > fixed" behavior encroach on the "new different" behavior in certain respects, > making the code even more complex. I agree, `C-c C-a' or `M-k' is a good thing to have fixed. Eventually, i would like to use such features. > I've honestly thought that Dima's patch's main purpose was to fix that bug. > And everything else we now complain about are just implementation's > side-effects. It seems you are right. IMO, we must aim to have the `C-c C-a' stuff fixed, but preserving those behaviours that we are complaining here. Until this aim is fulfilled, i would like to pospone this patch, or to have a temporary solution as Mark's one in this thread. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 21:05:27 2017 Received: (at 25105) by debbugs.gnu.org; 7 Jan 2017 02:05:27 +0000 Received: from localhost ([127.0.0.1]:45471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPgNr-0004DH-Bi for submit@debbugs.gnu.org; Fri, 06 Jan 2017 21:05:27 -0500 Received: from mail-qt0-f170.google.com ([209.85.216.170]:34715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPgNp-0004D4-FE for 25105@debbugs.gnu.org; Fri, 06 Jan 2017 21:05:25 -0500 Received: by mail-qt0-f170.google.com with SMTP id l7so45325169qtd.1 for <25105@debbugs.gnu.org>; Fri, 06 Jan 2017 18:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=l2cj4+antJVYEjbbUBUIr/X29VBqR0M9tQH6fgUreyU=; b=qj9EvLwPuiS/FHBN29cdKeQzuVAQ/4gM7tg9LXbFwrQiyjXtab8+fCa3bEFIRs7SUv v9VMtJRLZVAEOyo3CEupj8NnhasGQHT+ocMd3iSAjupp8eC1p2TIOOEwnH90RBsX7URi cYy7MfWd0ta74Iu0x483nvM378/6VvoXf+K/6fKNunk0xDJ0vacPVtF5pdHsbA9ZTkpk 0uM+dONs7yhiNNUOD96eOcaYDJTJvDS0x3nKpq1fEJ49U6U813iOFovus6mzJYo6dkPc ya5xcG5rp4jFeAM7JDMJJdol2Zvp5YQNWual3AJgCUgULMsQji48dG8JDz99zPxQdMCZ HObQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=l2cj4+antJVYEjbbUBUIr/X29VBqR0M9tQH6fgUreyU=; b=JVcZUnK+U7ZuizCj6No5kKIqpYnvXsXG7MotusZ5jNHCCCehTh75F6huLuF5ScCAkn 3gNetPbf2G6j9r7aNS0zT3ytJdLmo8JC4P674Bz4wt59PKzLwbITHpZDr3oUotWjzA66 ox3lwx5zYPTixv8IsYO7PT2C59e6c0ZZE5iqgmziAJwIOiB5N1l5Nit75/gBevi71mK3 bSAwhp44NbwdXRFJrtGzj/8la8sA/vT6hOWXKHBYpuMk3HKz1ut2tL4OPLqY5BCONN9S iBduLRkpJUuUYFRk0cQ/La4OI27tOB4/v6pkfeCVoJIdjVKtsBmzPVcM24p+FSTivjiA h6KA== X-Gm-Message-State: AIkVDXJSSQIxWIlmlpHZA0GnDyOASGHMXmmP1R3v/mGuTgmvONE7CQ6Lv2odZPhs6DssXXWD X-Received: by 10.200.56.4 with SMTP id q4mr3787238qtb.73.1483754719966; Fri, 06 Jan 2017 18:05:19 -0800 (PST) Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id r8sm51726084qtc.32.2017.01.06.18.05.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 18:05:19 -0800 (PST) Received: by holos.localdomain (Postfix, from userid 1000) id 9B00E60D64; Fri, 6 Jan 2017 21:05:18 -0500 (EST) Date: Fri, 6 Jan 2017 21:05:18 -0500 From: Mark Oteiza To: Tino Calancha Subject: Re: bug#25105: 26.0.50; diff navigation is broken Message-ID: <20170107020518.GA19694@holos.localdomain> References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> <83mvf4d3m9.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2+14 (4f0a84b954ef) (2016-11-26) X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 25105 Cc: Eli Zaretskii , npostavs@users.sourceforge.net, 25105@debbugs.gnu.org, Dima Kogan , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) On 07/01/17 at 10:54am, Tino Calancha wrote: > On Fri, 6 Jan 2017, Dmitry Gutov wrote: > > > I've honestly thought that Dima's patch's main purpose was to fix that > > bug. And everything else we now complain about are just implementation's > > side-effects. > > It seems you are right. IMO, we must aim to have the `C-c C-a' stuff fixed, > but preserving those behaviours that we are complaining here. > Until this aim is fulfilled, i would like to pospone this patch, or to have > a temporary solution as Mark's one in this thread. I don't consider my patch a solution, as it basically disables diff refinement due to the design of Dima's patch. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 04:52:03 2017 Received: (at 25105) by debbugs.gnu.org; 7 Jan 2017 09:52:03 +0000 Received: from localhost ([127.0.0.1]:45606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPnfO-000544-Qh for submit@debbugs.gnu.org; Sat, 07 Jan 2017 04:52:02 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:33642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPnfN-00053d-7q for 25105@debbugs.gnu.org; Sat, 07 Jan 2017 04:52:01 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3AF1B209E9; Sat, 7 Jan 2017 04:52:00 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 07 Jan 2017 04:52:00 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=eYR11HGSbi0ve7fBZQz95Vhfuxk=; b=be89WX wwNTh1zlnEr5/1JsTaigGGVXWNKHrHZlLjWrWr5ze3acwIo22RWb46r6w+/NCHHr JxS5QaHzEPwqwARmL4n6HRq25mdDQ4XJditwXoGyF9nNs491eH95LLGveJGbFHry etKQTUubpHzTeC34Yqzwfwo/ercmeUKSoYPcE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=eYR11HGSbi0ve7 fBZQz95Vhfuxk=; b=CJZbhVEUofGQ7xvtKW06HdtIWLPs8ay4SbXhWfmz2Fx0/c QIM+DmXbdbR5Ik48ZvOWiiywGWTyaB9nNzO3Nr+H1YkuDSzNbbuL2QThndvn/J6i jiLv4pcdpmA6cqcgD8pnUsgUPJEEpSlgTBdKRytXpmjDgu5TWuixQVI7/WHUU= X-ME-Sender: X-Sasl-enc: aZ+nMAMkF82kiJYFyoCa3ZPdnwVx62eOnYYSuS/ctvCr 1483782719 Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id BC70E24526; Sat, 7 Jan 2017 04:51:59 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.88) (envelope-from ) id 1cPnfJ-0008FI-Pf; Sat, 07 Jan 2017 01:51:57 -0800 References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> <83mvf4d3m9.fsf@gnu.org> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan To: Dmitry Gutov Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-reply-to: Date: Sat, 07 Jan 2017 01:51:57 -0800 Message-ID: <87pojzci4i.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: mvoteiza@udel.edu, Eli Zaretskii , npostavs@users.sourceforge.net, 25105@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Dmitry Gutov writes: > On 06.01.2017 11:03, Tino Calancha wrote: > > I've honestly thought that Dima's patch's main purpose was to fix that > bug. And everything else we now complain about are just implementation's > side-effects. The goals are described in the git commit message. The way these goals were met was to make everything consistent, with my interpretation of what that means. Taking the new behavior for M-k, C-c C-a and keeping the old behavior for M-n/M-p is weird. Example: Let's look at the commands required to apply hunks 1 and 2 in a buffer versus just hunk 2. Assuming we're at bob, and assuming we're using the new code. Applying hunks 1 and 2: C-c C-a C-c C-a; i.e. apply 1, apply 2 Applying hunk 2 only: M-n C-c C-a; i.e. skip 1, apply 2 If M-n works the way it did before, then you need to invoke M-n twice to apply hunk 2 only. I claim this is weird, since it should require only one command to "skip 1". This is what is meant by a "consistent" behavior. To reinterate, my desired outcome is to have the current code in place, and to hook auto-refinement in a diff-mode-hook to make that work in a way that makes sense. I'm fine with a switch that lets you pick what you want. As stated above, I don't think a hybrid approach makes sense, since it takes one weird thing and converts it to another thing that's weird in a different way. Furthermore, I'd like to get some feedback from more than just the few people active on this thread. If there's a lopsided preference to the old approach, we can simply revert and move on. dima From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 06:16:57 2017 Received: (at 25105) by debbugs.gnu.org; 7 Jan 2017 11:16:57 +0000 Received: from localhost ([127.0.0.1]:45697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPozZ-00075u-JJ for submit@debbugs.gnu.org; Sat, 07 Jan 2017 06:16:57 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPozX-00075f-Jp for 25105@debbugs.gnu.org; Sat, 07 Jan 2017 06:16:56 -0500 Received: by mail-pg0-f66.google.com with SMTP id 75so8376062pgf.3 for <25105@debbugs.gnu.org>; Sat, 07 Jan 2017 03:16:55 -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=bw+1/gU3EuKuFzv4k+JZWOr9VaWrqYult7b7TLNfeRc=; b=LOj5dyCSYxMbLHOWXPeFnBE77nBPb6xIPYJ3+TixC8X8PNIRfNUmjrneQOwfq2PmqU Oxu4m37XHjA8Uh+OGZx70saAyPN6Tb0x2vRHcZYvRgrWZtxo0+cljJDYgY+dq/SV27JM kapiobpO+y+s4OE6hL6K3JMo+KJU9tWCQeJoWwylu4j1tnhgCMAu3U2XTaWaF+6sIxKO KiOEXcVNQhwfz7Zvgm5zjeZaryO7b40PaYAsWRB+I0OTFxHuojZawkXUQAbS2yC4ieaQ OEpeHEt+dKEfcTCWVG3N8nFiz4P6eYlNYWtAspGmeGTLzzGSpMvodcLNPckJVJQJtrPW J69Q== 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=bw+1/gU3EuKuFzv4k+JZWOr9VaWrqYult7b7TLNfeRc=; b=JnxhX3m+dbWOn+81S33hNWHNp1lAGiMOsgKqtSEV1FBIYNCC2mUOj3ChXT5qJES5Vy R4GppYOM4oV2DpfeMiQ1TI9zBg/2ea+XiUXsC3prPnYkk/7WlZYDOLAkzzxAwHMTCeqG Io36xb8/bp1IDFDbCCoZIgp0c+7AhQjszXY+AOuovcSQO/9jlATbHnxfA5Erei2Nfsod 8oIm9/thU1zYKaQ4C3AzZ64DPqhXR4AR9Ikg60WABNwvkyGm6Noe4H0taQJhR20pnmPG SEDjxoVt8KAcIdQCwjncI0kUIAdzlXw+DePYUKMrSzJyDfGRfb1ARD823Un9pwTU3B+G dqpg== X-Gm-Message-State: AIkVDXIc00I/4CidhgA9uN5+3hFCW+Tq/Gif54xm5HjbYEb8N4s9E7HQmx020Z6392QEIA== X-Received: by 10.84.129.131 with SMTP id b3mr173156378plb.54.1483787809759; Sat, 07 Jan 2017 03:16:49 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id v73sm16795506pfa.45.2017.01.07.03.16.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2017 03:16:48 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 7 Jan 2017 20:16:45 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Dima Kogan Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-Reply-To: <87pojzci4i.fsf@secretsauce.net> Message-ID: References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> <83mvf4d3m9.fsf@gnu.org> <87pojzci4i.fsf@secretsauce.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: npostavs@users.sourceforge.net, Tino Calancha , mvoteiza@udel.edu, Dmitry Gutov , Eli Zaretskii , 25105@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Sat, 7 Jan 2017, Dima Kogan wrote: Dear Dima, i appreciate very much your efforts to improve diff-mode. In particular, i like 1. and 2. in your commit message. That are useful goals. I just disagree with the implementation. In summary, i believe a better approach is to get 1., 2. without affecting the behaviour of `n', `p'. > 1. It should be possible to place the point in the middle of a diff > buffer, and press M-k repeatedly to kill hunks in the order they appear > in the buffer. With the point on hunk1, M-k M-k would kill hunk1 then > hunk2. With the point on hunk3, it would kill hunk3 then hunk4; this is > fine. However, with the point on hunk2, it'd kill hunk2 then hunk1. > This is fixed by this patch. > > 2. Similarly, it should be possible to apply hunks in order. Previously > with the point at the start, C-c C-a would apply the hunk1, then move > the point to the first @@ header, and thus C-c C-a would try to apply > the same hunk again. Your patch is invasive: it should be possible to get 1) an 2) above without redefining a long standing behaviour for `diff-hunk-next' and `diff-hunk-prev'. In addition, that change in `n' and `p' would deserve a more prominent explanation in the commit message, f.i., a new dot 3., so people would be aware of this subtle change. >Let's look at the commands required to apply hunks 1 and 2 in a buffer >versus just hunk 2. Assuming we're at bob, and assuming we're using the >new code. > > Applying hunks 1 and 2: C-c C-a C-c C-a; i.e. apply 1, apply 2 > Applying hunk 2 only: M-n C-c C-a; i.e. skip 1, apply 2 > >If M-n works the way it did before, then you need to invoke M-n twice to >apply hunk 2 only. I claim this is weird, since it should require only >one command to "skip 1". This is what is meant by a "consistent" >behavior. Well, not everyone follow that logic. I like to read carefully the hunks of a patch _before_ decide to apply then. I can do that with easy using `n' and `p' keys. If the commit message is long, as in your commit 2c8a7e5, then an user need `n' to jump to the first hunk and read it; but after your patch the first hunk is skipped. Then the user need to be a believer and apply it without seeing it using `C-c C-a'; non believer users, might prefer to rewind and read the hunk as follows: M-! git show 2c8a7e5 RET C-o C-x C-q M-x diff-mode RET n ;; we are at 2nd hunk, i.e., at line: @@ -570,7 +570,102 @@ diff--auto-refine-data ;; Assuming no split window, so we can see clearly the first hunk; ;; after looking at it carefully, we decided is good, so let's apply it: p ; jump to 1st hunk: this is _extra_ compared with Emacs-25! C-c C-a So, it might be argued that this patch force users to gratuitously push _always_ an extra `p' to read/apply the first hunk of _every_ patch. That makes hunk navigation much less pleasant. >Furthermore, I'd like to get some feedback from more than just the few >people active on this thread. If there's a lopsided preference to the >old approach, we can simply revert and move on. As a rule of thumb, if i get N people here uncomfortable with one of my patches on master branch, i believe that can easily be translated to (* 100 N) people once the patch is in a stable release (at least). >I'm fine with a switch that lets you pick what you >want. As stated above, I don't think a hybrid approach makes sense, >since it takes one weird thing and converts it to another thing that's >weird in a different way. FWIW, I am working in an alternative patch: it would satisfy your 1. and 2. while respecting `n' and `p'. Stay tune! Best regards, Tino From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 17:16:39 2017 Received: (at 25105) by debbugs.gnu.org; 7 Jan 2017 22:16:39 +0000 Received: from localhost ([127.0.0.1]:46250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPzHz-0005rU-FD for submit@debbugs.gnu.org; Sat, 07 Jan 2017 17:16:39 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:53690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPzHy-0005rM-Br for 25105@debbugs.gnu.org; Sat, 07 Jan 2017 17:16:38 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D5E8F20922; Sat, 7 Jan 2017 17:16:37 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 07 Jan 2017 17:16:37 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=9wpiZufGqCdr6lThqibgEZZ3tAM=; b=dhA8Yo FmmHaESB7UPOnOcNX+BINX9McB8ZTrOXkxnUSlY26jLqx+s1plN9QG1Gsje86OU5 5y/FvvYOgeAdzVkKV3prtrHBsNZ2DBru/BIPCKblRkL2WjlxRHVlmigGfi/xj7u5 KBd4oy/A9YuZ7Q3/d3TWMYXwYiMWE7R7hvHP8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=9wpiZufGqCdr6l ThqibgEZZ3tAM=; b=ZZC7yTuwfDxFwktgqmzTEoILxAUy42zykMydfX30IG7noQ IC4hxdn99xO3gPvEo1BrTpccdhZO68JBN54BSK3b14xw/UrqOG3E+qXEgauqHg/8 Dd6uCN9yi4HxMsrtnhLtQ7X4dk5Vw5YhcJB8DUErg0nibzCGd4urIsAP7f8LM= X-ME-Sender: X-Sasl-enc: zodr/3mJvN97qVOa0Nh00ksZ0Y0aBohfceDab7t6gGgn 1483827397 Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 82D137E660; Sat, 7 Jan 2017 17:16:37 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.88) (envelope-from ) id 1cPzHv-0002Km-K8; Sat, 07 Jan 2017 14:16:35 -0800 References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> <83mvf4d3m9.fsf@gnu.org> <87pojzci4i.fsf@secretsauce.net> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan To: Tino Calancha Subject: Re: bug#25105: 26.0.50; diff navigation is broken In-reply-to: Date: Sat, 07 Jan 2017 14:16:35 -0800 Message-ID: <87o9zicy7w.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25105 Cc: mvoteiza@udel.edu, Eli Zaretskii , npostavs@users.sourceforge.net, 25105@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Tino Calancha writes: > On Sat, 7 Jan 2017, Dima Kogan wrote: > >>Let's look at the commands required to apply hunks 1 and 2 in a buffer >>versus just hunk 2. Assuming we're at bob, and assuming we're using the >>new code. >> >> Applying hunks 1 and 2: C-c C-a C-c C-a; i.e. apply 1, apply 2 >> Applying hunk 2 only: M-n C-c C-a; i.e. skip 1, apply 2 >> >>If M-n works the way it did before, then you need to invoke M-n twice to >>apply hunk 2 only. I claim this is weird, since it should require only >>one command to "skip 1". This is what is meant by a "consistent" >>behavior. > Well, not everyone follow that logic. I like to read carefully the hunks > of a patch _before_ decide to apply then. I can do that with easy using `n' and `p' > keys. If the commit message is long, as in your commit 2c8a7e5, then an user need > `n' to jump to the first hunk and read it; but after your patch the first hunk > is skipped. Then the user need to be a believer and apply it without seeing > it using `C-c C-a'; non believer users, might prefer to rewind and read the hunk > as follows: > M-! git show 2c8a7e5 RET > C-o C-x C-q > M-x diff-mode RET > n > ;; we are at 2nd hunk, i.e., at line: > @@ -570,7 +570,102 @@ diff--auto-refine-data > ;; Assuming no split window, so we can see clearly the first hunk; > ;; after looking at it carefully, we decided is good, so let's apply it: > p ; jump to 1st hunk: this is _extra_ compared with Emacs-25! > C-c C-a > > So, it might be argued that this patch force users to gratuitously push > _always_ an extra `p' to read/apply the first hunk of _every_ patch. > That makes hunk navigation much less pleasant. This clearly shows that it would be useful to have some binding that jumps to the beginning of the current hunk. But that's not the same as moving to the 'next' hunk, which is what 'n' ostensibly is supposed to do. >>Furthermore, I'd like to get some feedback from more than just the few >>people active on this thread. If there's a lopsided preference to the >>old approach, we can simply revert and move on. > As a rule of thumb, if i get N people here uncomfortable with one of my > patches on master branch, i believe that can easily be translated > to (* 100 N) people once the patch is in a stable release (at least). Right. The choice is whether to revert the new behavior entirely, or to leave it in with a switch. Since we're looking at a small sample here, it's not clear which is the right move. >>I'm fine with a switch that lets you pick what you >>want. As stated above, I don't think a hybrid approach makes sense, >>since it takes one weird thing and converts it to another thing that's >>weird in a different way. > FWIW, I am working in an alternative patch: it would satisfy your 1. and 2. > while respecting `n' and `p'. Stay tune! Great! dima From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 17:27:36 2017 Received: (at 25105) by debbugs.gnu.org; 7 Jan 2017 22:27:36 +0000 Received: from localhost ([127.0.0.1]:46255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPzSa-000675-HR for submit@debbugs.gnu.org; Sat, 07 Jan 2017 17:27:36 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPzSZ-00066s-0p for 25105@debbugs.gnu.org; Sat, 07 Jan 2017 17:27:35 -0500 Received: by mail-lf0-f68.google.com with SMTP id k62so6010837lfg.0 for <25105@debbugs.gnu.org>; Sat, 07 Jan 2017 14:27:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=s5S2Rsmqfx+wbyVJKsnRlCz5iBlAvplaVQpPR4FU7Vs=; b=neGKdmnKVUqzmUg3SGNGO8aCp/np0HIsq9Kmm03F1rmCHhhamNzMceVUFOSSkyRiLf szX0V46TfP9reaN/YdpA+oSbgEgjvbDp/t1n+fNuLyLq1jx0Ef5Q/qZ21KUffkgX1L6e SUClslpxZLUs7ezy8uaNZgPzLXSJg8xtS2KsBxZKqHjetiHYgdRBdmdvL+awv7NbZyFf x+rBfuR1UZIwSUkwHS9dMisfuZxCJE6n12LRBn+1TG65zRCymxme9JY0YEe91C0zafjM iUptosigl1/UYjTQwA5OM74p+rEQA7Y42G9GNjOykFR3Jv7xVZv1opjciA0j+b1av76a pGcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s5S2Rsmqfx+wbyVJKsnRlCz5iBlAvplaVQpPR4FU7Vs=; b=b+ZlGe7laCelh2d/UEOi3gklaepQfqZzvAXHJarQz6sjtzV1Pr2ry6j3jT8TFJlrGh 13PAL4rIuzj0hJtjRnJgmRFPPBtGdvBe2HoTrYF1GbditTXAOGjeXIMCqOUNUVQLp5bd to+rD7JWIx9AtwQeqLAvufs2zX7Wq0b1j1CgzXVMXNVG6cl6VULXqhQE9ZcoHlHwv/m0 zMSGQ59zi3cwr4t/fkapmZ9D8uc3pBwLEDSUkkUZ6K8KIVQhxf6VW2IhOAPyW11XInjW cSKNJu4XWwT8ouUXKKhWIMOta1XuBWVWNr+D9x1/nugvDoQ5+zW9VHh9n0L6GhHSusyq 7Q2A== X-Gm-Message-State: AIkVDXKPrGbsuyLOZgkMR0Efe5VgZKY2PVSFXU40rELCSV4QPsykwI+AuTGXDmC6EV07dQ== X-Received: by 10.46.19.25 with SMTP id 25mr1517438ljt.15.1483828048891; Sat, 07 Jan 2017 14:27:28 -0800 (PST) Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id y26sm20153141lja.22.2017.01.07.14.27.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2017 14:27:28 -0800 (PST) Subject: Re: bug#25105: 26.0.50; diff navigation is broken To: Dima Kogan , Tino Calancha References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> <87lguovn5f.fsf@secretsauce.net> <83mvf4d3m9.fsf@gnu.org> <87pojzci4i.fsf@secretsauce.net> <87o9zicy7w.fsf@secretsauce.net> From: Dmitry Gutov Message-ID: Date: Sun, 8 Jan 2017 01:27:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 MIME-Version: 1.0 In-Reply-To: <87o9zicy7w.fsf@secretsauce.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 08.01.2017 01:16, Dima Kogan wrote: > This clearly shows that it would be useful to have some binding that > jumps to the beginning of the current hunk. But that's not the same as > moving to the 'next' hunk, which is what 'n' ostensibly is supposed to > do. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.68 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.68 listed in wl.mailspike.net] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 25105 Cc: mvoteiza@udel.edu, Eli Zaretskii , 25105@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 08.01.2017 01:16, Dima Kogan wrote: > This clearly shows that it would be useful to have some binding that > jumps to the beginning of the current hunk. But that's not the same as > moving to the 'next' hunk, which is what 'n' ostensibly is supposed to > do. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.68 listed in dnsbl.sorbs.net] 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.68 listed in wl.mailspike.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid On 08.01.2017 01:16, Dima Kogan wrote: > This clearly shows that it would be useful to have some binding that > jumps to the beginning of the current hunk. But that's not the same as > moving to the 'next' hunk, which is what 'n' ostensibly is supposed to > do. `n' is the easiest key to press, so it should perform navigation that the users will find most useful, in general. If the behavior does not correspond to the command name, it would be better to rename the command, or change its docstring, or etc. But I don't think `diff-hunk-next' jumping to the beginning of the first hunk when invoked at the file header, is in any way odd. After all, point wasn't inside a hunk before. > Right. The choice is whether to revert the new behavior entirely, or to > leave it in with a switch. Since we're looking at a small sample here, > it's not clear which is the right move. Note, however, that nobody else has stepped forward to explicitly support the new behavior. If you get around to polling Emacs users at your workplace, or a meetup, or so on, please let us know. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 10 23:38:25 2017 Received: (at 25105) by debbugs.gnu.org; 11 Jan 2017 04:38:25 +0000 Received: from localhost ([127.0.0.1]:49290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRAg4-00027M-CI for submit@debbugs.gnu.org; Tue, 10 Jan 2017 23:38:24 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRAg2-000275-9P; Tue, 10 Jan 2017 23:38:23 -0500 Received: by mail-pf0-f194.google.com with SMTP id b22so15622295pfd.3; Tue, 10 Jan 2017 20:38:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RQVOQeTZrpl7WNEA6yaGDjJYlvnyTxePEFChM9ypKeQ=; b=c2A4tCkRqVv+ROXSwWBORLtAUtUH7pQ3XKSUEgd6USrrO1z8MVhpoSAzqUU4GlZHLK gWGnOGAQqcFyaaiXVnTVmmvRcsb3lDXjXHM4dE6Too4Osaad5e9gs8wD/nEtaiVFlJD3 CKXJ/hqMPAsZUjZZpGDReMVbPk7x6P9Gnqvs72tVFxep7zXfX6FZ3E1u9l76jQyctJpB UfqXVIIx+Tbd5i5AfOU8gYH33aNtdQS4VAd+d2KZaDBft3uKn755wEbwzF8rrFHFRyF7 ms36HgLV+mhRTwomeEbeIw8nkFGd267sNPH5f6bmm3jKL8ft4lP2CZrJ8KiWxzKG1gCH BGNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=RQVOQeTZrpl7WNEA6yaGDjJYlvnyTxePEFChM9ypKeQ=; b=ScVHNDpdfAZa1W77qEKF86kbN0UKILi6bERBh07v61RXTX0r1Nt2bruxRtOefg8FUX 2Ad2UBNHhlf+tug9iwncahGoLLf0tWHxkDUOEuhHr31CUS3wF2OUIYBTNt8JVK+pzeyg vHe96trAIZUMn1gLlVqg0S5hmMeOYmx6JaDLY7CRtsFVnJMgYfbCFdCYaMo1Rhte1Qj/ 5+G2W2IS3iY91uZI9oZcsY5i7K/rdbDLswzmz2dXcWc3ZwrvhMtxUUFxmJz/wN+7/mh6 3Nb3E+6vFFHD0Faf7W8i3CjzLhglEGVpi+24T79xXktIAfVRGQn6Y8aNk+ECX2ibnBuT rdsQ== X-Gm-Message-State: AIkVDXLngZhJzUs2rOstZ8Rz38o04zEG7NKp3TPS5/ZV1qppv570Q5lagTtyL5pwivtupQ== X-Received: by 10.84.128.67 with SMTP id 61mr10242243pla.153.1484109496231; Tue, 10 Jan 2017 20:38:16 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id y62sm9325755pfk.52.2017.01.10.20.38.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2017 20:38:15 -0800 (PST) From: Tino Calancha To: Stefan Monnier Subject: Re: bug#25400: M-p in diff-mode jumps too far References: Date: Wed, 11 Jan 2017 13:38:11 +0900 In-Reply-To: (Stefan Monnier's message of "Sun, 08 Jan 2017 16:21:16 -0500") Message-ID: <87a8aydxe4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 25105 Cc: Glenn Morris , 25400@debbugs.gnu.org, npostavs@users.sourceforge.net, tino.calancha@gmail.com, Mark Oteiza , Eli Zaretskii , Dmitry Gutov , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Stefan Monnier writes: > In a buffer with more than one hunk, if I'm in the middle of hunk number > N, diff-hunk-prev (usually bound to M-p) jumps to the header of hunk > number N-1 rather than to the header of hunk N. > > This is contrary to the usual behavior of Emacs's navigation commands. >As pointed out elsewhere, it's particularly obnoxious from EOB (in which >case, you're not really "within N" but you're virtually on "the header >of the non-existent hunk N+1", so going to the header of N-1 is really >wrong). > >I also dislike the fact that M-n doesn't let me get to EOB. Following patch reverts commit 2c8a7e5. Then it fixes dots 1. and 2. described in the commit message of 2c8a7e5, i.e., Bug#17544. This patch preserves the original definitions for 'diff-hunk-prev' and 'diff-hunk-next'. After applying locally this patch, you might want to do: git diff 2c8a7e5^ HEAD lisp/vc/diff-mode.el to see more clearly how it solves Bug#17544. Regards, Tino ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From a2dfaf390f4069b4e948dd0df84450359e7a0d92 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Wed, 11 Jan 2017 13:20:04 +0900 Subject: [PATCH] Fix Bugs 25105 and 25400 Revert 2c8a7e5 and implement a new fix for Bug#17544. This patch satisfies 1. and 2. in 2c8a7e5 commit message. The original definitions for 'diff-hunk-prev' and 'diff-hunk-next' are preserved. * lisp/vc/diff-mode.el (diff-file-junk-re): Move definition before it's used. (diff--at-diff-header-p): New predicate. (diff-beginning-of-hunk): Use it. (diff-apply-hunk): Jump to beginning of hunk before apply the hunk. (diff-hunk-kill, diff-file-kill): Jump to beginning of hunk after kill. (diff-post-command-hook): Call diff-beginning-of-hunk with non-nil argument. --- lisp/vc/diff-mode.el | 241 ++++++++++++++++++--------------------------------- 1 file changed, 83 insertions(+), 158 deletions(-) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 9dfcd944bb..3fc4713f0f 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -498,22 +498,55 @@ diff-end-of-hunk ;; The return value is used by easy-mmode-define-navigation. (goto-char (or end (point-max))))) +;; "index ", "old mode", "new mode", "new file mode" and +;; "deleted file mode" are output by git-diff. +(defconst diff-file-junk-re + "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") + +;; If point is in a diff header, then return beginning +;; of hunk position otherwise return nil. +(defun diff--at-diff-header-p () + "Return non-nil if point is inside a diff header." + (let ((regexp-hunk diff-hunk-header-re) + (regexp-file diff-file-header-re) + (regexp-junk diff-file-junk-re) + (orig (point))) + (catch 'headerp + (save-excursion + (forward-line 0) + (when (looking-at regexp-hunk) ; Hunk header. + (throw 'headerp (point))) + (forward-line -1) + (when (re-search-forward regexp-file (point-at-eol 4) t) ; File header. + (forward-line 0) + (throw 'headerp (point))) + (goto-char orig) + (forward-line 0) + (when (looking-at regexp-junk) ; Git diff junk. + (while (and (looking-at regexp-junk) + (not (bobp))) + (forward-line -1)) + (re-search-forward regexp-file nil t) + (forward-line 0) + (throw 'headerp (point)))) nil))) + (defun diff-beginning-of-hunk (&optional try-harder) "Move back to the previous hunk beginning, and return its position. If point is in a file header rather than a hunk, advance to the next hunk if TRY-HARDER is non-nil; otherwise signal an error." (beginning-of-line) - (if (looking-at diff-hunk-header-re) + (if (looking-at diff-hunk-header-re) ; At hunk header. (point) - (forward-line 1) - (condition-case () - (re-search-backward diff-hunk-header-re) - (error - (unless try-harder - (error "Can't find the beginning of the hunk")) - (diff-beginning-of-file-and-junk) - (diff-hunk-next) - (point))))) + (let ((pos (diff--at-diff-header-p)) + (regexp diff-hunk-header-re)) + (cond (pos ; At junk diff header. + (if try-harder + (goto-char pos) + (error "Can't find the beginning of the hunk"))) + ((re-search-backward regexp nil t)) ; In the middle of a hunk. + ((re-search-forward regexp nil t) ; At first hunk header. + (forward-line 0)) + (t (error "Can't find the beginning of the hunk")))))) (defun diff-unified-hunk-p () (save-excursion @@ -551,124 +584,26 @@ diff--auto-refine-data ;; Define diff-{hunk,file}-{prev,next} (easy-mmode-define-navigation - diff--internal-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view) + diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view + (when diff-auto-refine-mode + (unless (prog1 diff--auto-refine-data + (setq diff--auto-refine-data + (cons (current-buffer) (point-marker)))) + (run-at-time 0.0 nil + (lambda () + (when diff--auto-refine-data + (let ((buffer (car diff--auto-refine-data)) + (point (cdr diff--auto-refine-data))) + (setq diff--auto-refine-data nil) + (with-local-quit + (when (buffer-live-p buffer) + (with-current-buffer buffer + (save-excursion + (goto-char point) + (diff-refine-hunk)))))))))))) (easy-mmode-define-navigation - diff--internal-file diff-file-header-re "file" diff-end-of-file) - -(defun diff--wrap-navigation (skip-hunk-start - what orig - header-re goto-start-func count) - "Wrap diff-{hunk,file}-{next,prev} for more intuitive behavior. -Override the default diff-{hunk,file}-{next,prev} implementation -by skipping any lines that are associated with this hunk/file but -precede the hunk-start marker. For instance, a diff file could -contain - -diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el -index 923de9a..6b1c24f 100644 ---- a/lisp/vc/diff-mode.el -+++ b/lisp/vc/diff-mode.el -@@ -590,6 +590,22 @@ -....... - -If a point is on 'index', then the point is considered to be in -this first hunk. Move the point to the @@... marker before -executing the default diff-hunk-next/prev implementation to move -to the NEXT marker." - (if (not skip-hunk-start) - (funcall orig count) - - (let ((start (point))) - (funcall goto-start-func) - - ;; Trap the error. - (condition-case nil - (funcall orig count) - (error nil)) - - (when (not (looking-at header-re)) - (goto-char start) - (user-error (format "No %s" what))) - - ;; We successfully moved to the next/prev hunk/file. Apply the - ;; auto-refinement if needed - (when diff-auto-refine-mode - (unless (prog1 diff--auto-refine-data - (setq diff--auto-refine-data - (cons (current-buffer) (point-marker)))) - (run-at-time 0.0 nil - (lambda () - (when diff--auto-refine-data - (let ((buffer (car diff--auto-refine-data)) - (point (cdr diff--auto-refine-data))) - (setq diff--auto-refine-data nil) - (with-local-quit - (when (buffer-live-p buffer) - (with-current-buffer buffer - (save-excursion - (goto-char point) - (diff-refine-hunk)))))))))))))) - -;; These functions all take a skip-hunk-start argument which controls -;; whether we skip pre-hunk-start text or not. In interactive uses we -;; always want to do this, but the simple behavior is still necessary -;; to, for example, avoid an infinite loop: -;; -;; diff-hunk-next calls -;; diff--wrap-navigation calls -;; diff-bounds-of-hunk calls -;; diff-beginning-of-hunk calls -;; diff-hunk-next -;; -;; 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." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) - (diff--wrap-navigation - skip-hunk-start - "prev hunk" - 'diff--internal-hunk-prev - diff-hunk-header-re - (lambda () (goto-char (car (diff-bounds-of-hunk)))) - count)) - -(defun diff-hunk-next (&optional count skip-hunk-start) - "Go to the next COUNT'th hunk." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) - (diff--wrap-navigation - skip-hunk-start - "next hunk" - 'diff--internal-hunk-next - diff-hunk-header-re - (lambda () (goto-char (car (diff-bounds-of-hunk)))) - count)) - -(defun diff-file-prev (&optional count skip-hunk-start) - "Go to the previous COUNT'th file." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) - (diff--wrap-navigation - skip-hunk-start - "prev file" - 'diff--internal-file-prev - diff-file-header-re - (lambda () (goto-char (car (diff-bounds-of-file))) (diff--internal-hunk-next)) - count)) - -(defun diff-file-next (&optional count skip-hunk-start) - "Go to the next COUNT'th file." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) - (diff--wrap-navigation - skip-hunk-start - "next file" - 'diff--internal-file-next - diff-file-header-re - (lambda () (goto-char (car (diff-bounds-of-file))) (diff--internal-hunk-next)) - count)) - - - + diff-file diff-file-header-re "file" diff-end-of-file) (defun diff-bounds-of-hunk () "Return the bounds of the diff hunk at point. @@ -679,13 +614,12 @@ diff-bounds-of-hunk (let ((pos (point)) (beg (diff-beginning-of-hunk t)) (end (diff-end-of-hunk))) - (cond ((> end pos) + (cond ((>= end pos) (list beg end)) ;; If this hunk ends above POS, consider the next hunk. ((re-search-forward diff-hunk-header-re nil t) (list (match-beginning 0) (diff-end-of-hunk))) - ;; There's no next hunk, so just take the one we have. - (t (list beg end)))))) + (t (error "No hunk found")))))) (defun diff-bounds-of-file () "Return the bounds of the file segment at point. @@ -731,12 +665,8 @@ diff-hunk-kill hunk-bounds)) (inhibit-read-only t)) (apply 'kill-region bounds) - (goto-char (car bounds)))) - -;; "index ", "old mode", "new mode", "new file mode" and -;; "deleted file mode" are output by git-diff. -(defconst diff-file-junk-re - "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") + (goto-char (car bounds)) + (diff-beginning-of-hunk t))) (defun diff-beginning-of-file-and-junk () "Go to the beginning of file-related diff-info. @@ -771,7 +701,7 @@ diff-beginning-of-file-and-junk (setq prevfile nextfile)) (if (and previndex (numberp prevfile) (< previndex prevfile)) (setq prevfile previndex)) - (if (numberp prevfile) + (if (and (numberp prevfile) (<= prevfile start)) (progn (goto-char prevfile) ;; Now skip backward over the leading junk we may have before the @@ -789,7 +719,8 @@ diff-file-kill "Kill current file's hunks." (interactive) (let ((inhibit-read-only t)) - (apply 'kill-region (diff-bounds-of-file)))) + (apply 'kill-region (diff-bounds-of-file))) + (diff-beginning-of-hunk t)) (defun diff-kill-junk () "Kill spurious empty diffs." @@ -1373,7 +1304,7 @@ diff-post-command-hook ;; it's safer not to do it on big changes, e.g. when yanking a big ;; diff, or when the user edits the header, since we might then ;; screw up perfectly correct values. --Stef - (diff-beginning-of-hunk) + (diff-beginning-of-hunk t) (let* ((style (if (looking-at "\\*\\*\\*") 'context)) (start (line-beginning-position (if (eq style 'context) 3 2))) (mid (if (eq style 'context) @@ -1764,9 +1695,8 @@ diff-find-source-location SWITCHED is non-nil if the patch is already applied. NOPROMPT, if non-nil, means not to prompt the user." (save-excursion - (let* ((hunk-bounds (diff-bounds-of-hunk)) - (other (diff-xor other-file diff-jump-to-old-file)) - (char-offset (- (point) (goto-char (car hunk-bounds)))) + (let* ((other (diff-xor other-file diff-jump-to-old-file)) + (char-offset (- (point) (diff-beginning-of-hunk t))) ;; Check that the hunk is well-formed. Otherwise diff-mode and ;; the user may disagree on what constitutes the hunk ;; (e.g. because an empty line truncates the hunk mid-course), @@ -1775,7 +1705,7 @@ diff-find-source-location ;; Suppress check when NOPROMPT is non-nil (Bug#3033). (_ (unless noprompt (diff-sanity-check-hunk))) (hunk (buffer-substring - (point) (cadr hunk-bounds))) + (point) (save-excursion (diff-end-of-hunk) (point)))) (old (diff-hunk-text hunk reverse char-offset)) (new (diff-hunk-text hunk (not reverse) char-offset)) ;; Find the location specification. @@ -1838,6 +1768,7 @@ diff-apply-hunk With a prefix argument, REVERSE the hunk." (interactive "P") + (diff-beginning-of-hunk t) (pcase-let ((`(,buf ,line-offset ,pos ,old ,new ,switched) ;; Sometimes we'd like to have the following behavior: if ;; REVERSE go to the new file, otherwise go to the old. @@ -1883,15 +1814,8 @@ diff-apply-hunk ;; Display BUF in a window (set-window-point (display-buffer buf) (+ (car pos) (cdr new))) (diff-hunk-status-msg line-offset (diff-xor switched reverse) nil) - - ;; Advance to the next hunk with skip-hunk-start set to t - ;; because we want the behavior of moving to the next logical - ;; hunk, not the original behavior where were would sometimes - ;; stay on the current hunk. This is the behavior we get when - ;; navigating through hunks interactively, and we want it when - ;; applying hunks too (see http://debbugs.gnu.org/17544). (when diff-advance-after-apply-hunk - (diff-hunk-next nil t)))))) + (diff-hunk-next)))))) (defun diff-test-hunk (&optional reverse) @@ -1972,15 +1896,14 @@ diff-current-defun (defun diff-ignore-whitespace-hunk () "Re-diff the current hunk, ignoring whitespace differences." (interactive) - (let* ((hunk-bounds (diff-bounds-of-hunk)) - (char-offset (- (point) (goto-char (car hunk-bounds)))) + (let* ((char-offset (- (point) (diff-beginning-of-hunk t))) (opts (pcase (char-after) (?@ "-bu") (?* "-bc") (_ "-b"))) (line-nb (and (or (looking-at "[^0-9]+\\([0-9]+\\)") (error "Can't find line number")) (string-to-number (match-string 1)))) (inhibit-read-only t) (hunk (delete-and-extract-region - (point) (cadr hunk-bounds))) + (point) (save-excursion (diff-end-of-hunk) (point)))) (lead (make-string (1- line-nb) ?\n)) ;Line nums start at 1. (file1 (make-temp-file "diff1")) (file2 (make-temp-file "diff2")) @@ -2067,14 +1990,16 @@ diff-refine-hunk (interactive) (require 'smerge-mode) (save-excursion - (let* ((hunk-bounds (diff-bounds-of-hunk)) - (style (progn (goto-char (car hunk-bounds)) - (diff-hunk-style))) ;Skips the hunk header as well. + (diff-beginning-of-hunk t) + (let* ((start (point)) + (style (diff-hunk-style)) ;Skips the hunk header as well. (beg (point)) - (end (cadr hunk-bounds)) (props-c '((diff-mode . fine) (face diff-refine-changed))) (props-r '((diff-mode . fine) (face diff-refine-removed))) - (props-a '((diff-mode . fine) (face diff-refine-added)))) + (props-a '((diff-mode . fine) (face diff-refine-added))) + ;; Be careful to go back to `start' so diff-end-of-hunk gets + ;; to read the hunk header's line info. + (end (progn (goto-char start) (diff-end-of-hunk) (point)))) (remove-overlays beg end 'diff-mode 'fine) -- 2.11.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.5) of 2017-01-10 Repository revision: fa0a2b4e7c81f57aecc1d94df00588a4dd5c281d From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 11 18:28:05 2017 Received: (at 25105) by debbugs.gnu.org; 11 Jan 2017 23:28:06 +0000 Received: from localhost ([127.0.0.1]:50472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRSJJ-00049B-Nx for submit@debbugs.gnu.org; Wed, 11 Jan 2017 18:28:05 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRSJH-00048Y-83 for 25105@debbugs.gnu.org; Wed, 11 Jan 2017 18:28:03 -0500 Received: by mail-qt0-f195.google.com with SMTP id f4so398106qte.2 for <25105@debbugs.gnu.org>; Wed, 11 Jan 2017 15:28:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KmK2LAVrHcpsLrbl0UMj10Peu6k60251YiY2WAKD5mI=; b=YM3fb9vTk6JvgFE0ajdeDAY/Jg4mY+izx6BiVk7qsdbSf3pOTPSRrKe9zgihuDMQJb SnM9YqsmwzEU3F723AgsE7OuW4BN315wHkVtH+KGp3QVZglk9htw24UuHf+29JGTIpab cHM7BL98sK4hOgGuuhne6gBu9taLLTzoczcU6j8qDX7+gY5BRGLVfAtZxnxx/j8Y7Tep iXEksJe3u5M9EMmdS2weGXBHGea0PLR/JF3Tj4eKqrwxAkY1HuoMoFQs8jye4HiiKUUr Ykz82exQSGly49mm7kZ9hh3EB8d0N8jhVTovfWN/y9KcBw6d19Pt+QTd1IIFWd/uR3cO d16w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KmK2LAVrHcpsLrbl0UMj10Peu6k60251YiY2WAKD5mI=; b=WkAwLWZPgBNdwaNv5EWJAXbj/+8qIWQ96eh/1Gqko9Mh5yytGn4J04YLwkBmt2lf7O 7xEcZOuCF5u4HtjTME+26cdMkf/H1Ut9bfKpeqj4qqtLV2WqScQSp0UlRqAKQ41jI2tO JtTkZ1VywIsKLs2iMrxcyfnmVlB3E5f1YGWc8PqnXJvhBQV2Km0b3S7U46VpkJazCt2D SopX835bwNHcH6m/VAUNSYajeFb+NzmijU8VXa+kGsmA5SLndESlLoAfkDUe5HCPuSpb /G+eilhT9NvBsDY9YbOPeC2+oPE8pZNashiE97mJzJAYWPpjtIugAEg0Cm8RN/f3yaf7 zPIQ== X-Gm-Message-State: AIkVDXKrIxQ40H+2HVSzUu5D1lGZXIcIhsS+DnBk4PD1yVBTICacnqASof/njFtyzcQx0zVx X-Received: by 10.200.52.170 with SMTP id w39mr11047945qtb.123.1484177277788; Wed, 11 Jan 2017 15:27:57 -0800 (PST) Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id j126sm3752759qkf.3.2017.01.11.15.27.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 15:27:56 -0800 (PST) Received: by holos.localdomain (Postfix, from userid 1000) id BFDE960D5B; Wed, 11 Jan 2017 18:27:55 -0500 (EST) Date: Wed, 11 Jan 2017 18:27:55 -0500 From: Mark Oteiza To: Tino Calancha Subject: Re: bug#25400: M-p in diff-mode jumps too far Message-ID: <20170111232755.GA22069@holos.localdomain> References: <87a8aydxe4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a8aydxe4.fsf@gmail.com> User-Agent: Mutt/1.7.2+14 (4f0a84b954ef) (2016-11-26) X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 25105 Cc: Glenn Morris , 25400@debbugs.gnu.org, npostavs@users.sourceforge.net, Eli Zaretskii , Stefan Monnier , Dmitry Gutov , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) On 11/01/17 at 01:38pm, Tino Calancha wrote: > Stefan Monnier writes: > > > In a buffer with more than one hunk, if I'm in the middle of hunk number > > N, diff-hunk-prev (usually bound to M-p) jumps to the header of hunk > > number N-1 rather than to the header of hunk N. > > > > This is contrary to the usual behavior of Emacs's navigation commands. > >As pointed out elsewhere, it's particularly obnoxious from EOB (in which > >case, you're not really "within N" but you're virtually on "the header > >of the non-existent hunk N+1", so going to the header of N-1 is really > >wrong). > > > >I also dislike the fact that M-n doesn't let me get to EOB. > > Following patch reverts commit 2c8a7e5. Then it fixes dots 1. and 2. > described in the commit message of 2c8a7e5, i.e., Bug#17544. > This patch preserves the original definitions for 'diff-hunk-prev' > and 'diff-hunk-next'. > > After applying locally this patch, you might want to do: > git diff 2c8a7e5^ HEAD lisp/vc/diff-mode.el > to see more clearly how it solves Bug#17544. Works for me AFAICT. Thanks for working on it. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 11 18:34:48 2017 Received: (at 25105) by debbugs.gnu.org; 11 Jan 2017 23:34:48 +0000 Received: from localhost ([127.0.0.1]:50517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRSPo-0004Lg-BW for submit@debbugs.gnu.org; Wed, 11 Jan 2017 18:34:48 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRSPn-0004LO-8L; Wed, 11 Jan 2017 18:34:47 -0500 Received: by mail-lf0-f67.google.com with SMTP id v186so252545lfa.2; Wed, 11 Jan 2017 15:34:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=q5mP7MjVDp2VAPe+SLzpohYCD59Gu1BhNAFPMQDYVjw=; b=epxmiOTdmB1nrZrGhXDgFOA9ueaSep2e0MKS5P2R9Gcxu4mH1O2sssIEKu7jnKMR+P HL2Fx7wCKHO/KIBs56DfJ2D1yTJVtESc0o0paZYTQ4+c3GSDMAoj29gSY+15aRdmu/tB jnUpNRMHwm6dX81HGj795qWlTzS78s2d0hNUxdmz1ioyKVCOp3tgLZaSSeWBi/rPB4xv R8kbMtByixMaWICuq3bUQAnlFoppbOQDNyrGlRqQHMotek7n88ZZvaDIhRA3LmPPvlDL 7g6khrHi+wDPlQsBm3rz+EY2cH/fnMgI85kTb5NQ1sGRBJE48DsZWsVz36SsHaxT75E9 60Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=q5mP7MjVDp2VAPe+SLzpohYCD59Gu1BhNAFPMQDYVjw=; b=q3XqqCC92gsNufX/tQDGICR4sNe193lwOYIxn4qiDoL70x4VoIlJA9nnHQYSQlJ/iB 2x54Ex4Xyijnca+p50Y4cmQKhSf8lXg9KQ5mpRULYSGwg/RegvvU/nL0P3LRLZjomzAS nuJ+GHA3HbgPzpmZijhxDz1pH1VonX4vbcXffLbkwlRKOWbiQQd5yTApn7T/+WIkdw1G cxDge+jLzcSo7gHxcQjwU0qaJOLp0DkanxsbkXIril/gyWpZuFKNjGocm1v6zgQqg/bw VjXm+JMOhwEezh8sijfNRl+cPZYd6PVjxFy5DguDmX586f/MaFe9SolkYnd+vHokfAWI 4fqQ== X-Gm-Message-State: AIkVDXKAqwTSu0tqNYCbMSzUfWYJQSqkR/hov3oOgpV59fDrwDckK2gFDwjWvKbs8nFIUg== X-Received: by 10.46.22.85 with SMTP id 21mr4366516ljw.13.1484177681126; Wed, 11 Jan 2017 15:34:41 -0800 (PST) Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id k7sm1759587lfe.26.2017.01.11.15.34.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 15:34:40 -0800 (PST) Subject: Re: bug#25105: bug#25400: M-p in diff-mode jumps too far To: Tino Calancha , Stefan Monnier References: <87a8aydxe4.fsf@gmail.com> From: Dmitry Gutov Message-ID: <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> Date: Thu, 12 Jan 2017 02:34:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 MIME-Version: 1.0 In-Reply-To: <87a8aydxe4.fsf@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Tino, Thanks for doing this. However, I'd prefer two separate commits: one reverting 2c8a7e5 (if that is what we are doing), and one with your actual changes. That would make the history easier to read, and would probably improve 'git blame' results as well. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.67 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.67 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.67 listed in list.dnswl.org] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25400@debbugs.gnu.org, Dima Kogan , 25105@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Tino, Thanks for doing this. However, I'd prefer two separate commits: one reverting 2c8a7e5 (if that is what we are doing), and one with your actual changes. That would make the history easier to read, and would probably improve 'git blame' results as well. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.67 listed in dnsbl.sorbs.net] 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.67 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.67 listed in list.dnswl.org] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid Hi Tino, Thanks for doing this. However, I'd prefer two separate commits: one reverting 2c8a7e5 (if that is what we are doing), and one with your actual changes. That would make the history easier to read, and would probably improve 'git blame' results as well. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 11 22:54:02 2017 Received: (at 25105) by debbugs.gnu.org; 12 Jan 2017 03:54:02 +0000 Received: from localhost ([127.0.0.1]:50596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRWSf-0004FR-IS for submit@debbugs.gnu.org; Wed, 11 Jan 2017 22:54:02 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRWSd-0004F0-A0; Wed, 11 Jan 2017 22:54:00 -0500 Received: by mail-pf0-f193.google.com with SMTP id 127so1315295pfg.0; Wed, 11 Jan 2017 19:53:59 -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=dcKOqO7a9vQPTISUudTli6cB+XOC76JDluXkob5sVII=; b=IKhUux2eCBVrmgWC0xRKbrErMi5TixUtRc9TrPrFX5lrOdIFl8mWby6SAjUNYD4GIz 2Hy0qJBvc/NlSn0WWe3pAS3hg50uj7wje2mUK9HjKReJJRLNVtl0ZcYXi7hRDjYPqE6R jwXAHTE1xV4XJD4N7r4n3XzN+1zIKj/NDKY47zSJJ8DI6RDukCHqti5xydi4kz5fhSyG QKA/U187qx/Lv9hberO9cNMSzE5Iwwf7H5eB4sWv7qkWcWW9e8M8rpd+7DUPfqBa5xWJ QxY1X3d3xQiRuTtM5oWqSVTVoKWCVo2vayEIHCtlVHZ7+iZcz4XTVpsSS8q4Slo0NUk7 PtFA== 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=dcKOqO7a9vQPTISUudTli6cB+XOC76JDluXkob5sVII=; b=WP9HGmDeSTHN1e+Q8PVxrajIbvHLW906JPuCKW5S4S2I7CVsoe8Xr3/QfNqweSEJEK ltbh07QVWdRf3Mim2XvtnhwZLD4z80FSEUNnV0jnnUAxCHJD5SNSswhxTgytrhTLqZy0 wt30DN88BMXceQiLctAS4ox78rEJx/SJZOCSUJVXQT5y330kUuT06YfdrIVxlB748o7O /bX63p6NK0QO8+P7bAQufAws6DtW8wdmqeojrdgqQGfuxQ39XU6kO3gK0C9ja34V7x8i ZeYAeuIeQHIg1C/Z+fHMK0CAjaSf7N2uhVdQmo3fBWLzmJzqAuARja3dpZmAWFyb7Zaq vjZw== X-Gm-Message-State: AIkVDXLfBo2BuChDO+u95r2mw+0LBr2lE7RLT/2O0XSlkIot0E0ra6UoQ05LsD62/WvjIQ== X-Received: by 10.98.42.216 with SMTP id q207mr14393412pfq.74.1484193233034; Wed, 11 Jan 2017 19:53:53 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id w125sm17065725pgb.11.2017.01.11.19.53.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 19:53:52 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Thu, 12 Jan 2017 12:53:48 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Dmitry Gutov Subject: Re: bug#25105: bug#25400: M-p in diff-mode jumps too far In-Reply-To: <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> Message-ID: References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 25105 Cc: 25400@debbugs.gnu.org, npostavs@users.sourceforge.net, Tino Calancha , Mark Oteiza , Stefan Monnier , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Thu, 12 Jan 2017, Dmitry Gutov wrote: > I'd prefer two separate commits: > one reverting 2c8a7e5 (if that is what we are doing), > and one with your actual changes. > > That would make the history easier to read, and would probably improve 'git > blame' results as well. Definitely. Thanks for the suggestion! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 4c0b6cb87438a5c812a4718452c2537d827a74a4 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Thu, 12 Jan 2017 12:46:03 +0900 Subject: [PATCH 1/2] ; Revert "Improve diff-mode navigation/manipulation" This reverts commit 2c8a7e50d24daf19ea7d86f1cfeaa98a41c56085. This change causes regressions: https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00738.html Fixes: debbugs:25105, 25400. --- lisp/vc/diff-mode.el | 174 ++++++++++----------------------------------------- 1 file changed, 34 insertions(+), 140 deletions(-) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 9dfcd944bb..44556ddd4a 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -551,124 +551,26 @@ diff--auto-refine-data ;; Define diff-{hunk,file}-{prev,next} (easy-mmode-define-navigation - diff--internal-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view) + diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view + (when diff-auto-refine-mode + (unless (prog1 diff--auto-refine-data + (setq diff--auto-refine-data + (cons (current-buffer) (point-marker)))) + (run-at-time 0.0 nil + (lambda () + (when diff--auto-refine-data + (let ((buffer (car diff--auto-refine-data)) + (point (cdr diff--auto-refine-data))) + (setq diff--auto-refine-data nil) + (with-local-quit + (when (buffer-live-p buffer) + (with-current-buffer buffer + (save-excursion + (goto-char point) + (diff-refine-hunk)))))))))))) (easy-mmode-define-navigation - diff--internal-file diff-file-header-re "file" diff-end-of-file) - -(defun diff--wrap-navigation (skip-hunk-start - what orig - header-re goto-start-func count) - "Wrap diff-{hunk,file}-{next,prev} for more intuitive behavior. -Override the default diff-{hunk,file}-{next,prev} implementation -by skipping any lines that are associated with this hunk/file but -precede the hunk-start marker. For instance, a diff file could -contain - -diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el -index 923de9a..6b1c24f 100644 ---- a/lisp/vc/diff-mode.el -+++ b/lisp/vc/diff-mode.el -@@ -590,6 +590,22 @@ -....... - -If a point is on 'index', then the point is considered to be in -this first hunk. Move the point to the @@... marker before -executing the default diff-hunk-next/prev implementation to move -to the NEXT marker." - (if (not skip-hunk-start) - (funcall orig count) - - (let ((start (point))) - (funcall goto-start-func) - - ;; Trap the error. - (condition-case nil - (funcall orig count) - (error nil)) - - (when (not (looking-at header-re)) - (goto-char start) - (user-error (format "No %s" what))) - - ;; We successfully moved to the next/prev hunk/file. Apply the - ;; auto-refinement if needed - (when diff-auto-refine-mode - (unless (prog1 diff--auto-refine-data - (setq diff--auto-refine-data - (cons (current-buffer) (point-marker)))) - (run-at-time 0.0 nil - (lambda () - (when diff--auto-refine-data - (let ((buffer (car diff--auto-refine-data)) - (point (cdr diff--auto-refine-data))) - (setq diff--auto-refine-data nil) - (with-local-quit - (when (buffer-live-p buffer) - (with-current-buffer buffer - (save-excursion - (goto-char point) - (diff-refine-hunk)))))))))))))) - -;; These functions all take a skip-hunk-start argument which controls -;; whether we skip pre-hunk-start text or not. In interactive uses we -;; always want to do this, but the simple behavior is still necessary -;; to, for example, avoid an infinite loop: -;; -;; diff-hunk-next calls -;; diff--wrap-navigation calls -;; diff-bounds-of-hunk calls -;; diff-beginning-of-hunk calls -;; diff-hunk-next -;; -;; 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." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) - (diff--wrap-navigation - skip-hunk-start - "prev hunk" - 'diff--internal-hunk-prev - diff-hunk-header-re - (lambda () (goto-char (car (diff-bounds-of-hunk)))) - count)) - -(defun diff-hunk-next (&optional count skip-hunk-start) - "Go to the next COUNT'th hunk." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) - (diff--wrap-navigation - skip-hunk-start - "next hunk" - 'diff--internal-hunk-next - diff-hunk-header-re - (lambda () (goto-char (car (diff-bounds-of-hunk)))) - count)) - -(defun diff-file-prev (&optional count skip-hunk-start) - "Go to the previous COUNT'th file." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) - (diff--wrap-navigation - skip-hunk-start - "prev file" - 'diff--internal-file-prev - diff-file-header-re - (lambda () (goto-char (car (diff-bounds-of-file))) (diff--internal-hunk-next)) - count)) - -(defun diff-file-next (&optional count skip-hunk-start) - "Go to the next COUNT'th file." - (interactive (list (prefix-numeric-value current-prefix-arg) t)) - (diff--wrap-navigation - skip-hunk-start - "next file" - 'diff--internal-file-next - diff-file-header-re - (lambda () (goto-char (car (diff-bounds-of-file))) (diff--internal-hunk-next)) - count)) - - - + diff-file diff-file-header-re "file" diff-end-of-file) (defun diff-bounds-of-hunk () "Return the bounds of the diff hunk at point. @@ -679,13 +581,12 @@ diff-bounds-of-hunk (let ((pos (point)) (beg (diff-beginning-of-hunk t)) (end (diff-end-of-hunk))) - (cond ((> end pos) + (cond ((>= end pos) (list beg end)) ;; If this hunk ends above POS, consider the next hunk. ((re-search-forward diff-hunk-header-re nil t) (list (match-beginning 0) (diff-end-of-hunk))) - ;; There's no next hunk, so just take the one we have. - (t (list beg end)))))) + (t (error "No hunk found")))))) (defun diff-bounds-of-file () "Return the bounds of the file segment at point. @@ -771,7 +672,7 @@ diff-beginning-of-file-and-junk (setq prevfile nextfile)) (if (and previndex (numberp prevfile) (< previndex prevfile)) (setq prevfile previndex)) - (if (numberp prevfile) + (if (and (numberp prevfile) (<= prevfile start)) (progn (goto-char prevfile) ;; Now skip backward over the leading junk we may have before the @@ -1764,9 +1665,8 @@ diff-find-source-location SWITCHED is non-nil if the patch is already applied. NOPROMPT, if non-nil, means not to prompt the user." (save-excursion - (let* ((hunk-bounds (diff-bounds-of-hunk)) - (other (diff-xor other-file diff-jump-to-old-file)) - (char-offset (- (point) (goto-char (car hunk-bounds)))) + (let* ((other (diff-xor other-file diff-jump-to-old-file)) + (char-offset (- (point) (diff-beginning-of-hunk t))) ;; Check that the hunk is well-formed. Otherwise diff-mode and ;; the user may disagree on what constitutes the hunk ;; (e.g. because an empty line truncates the hunk mid-course), @@ -1775,7 +1675,7 @@ diff-find-source-location ;; Suppress check when NOPROMPT is non-nil (Bug#3033). (_ (unless noprompt (diff-sanity-check-hunk))) (hunk (buffer-substring - (point) (cadr hunk-bounds))) + (point) (save-excursion (diff-end-of-hunk) (point)))) (old (diff-hunk-text hunk reverse char-offset)) (new (diff-hunk-text hunk (not reverse) char-offset)) ;; Find the location specification. @@ -1883,15 +1783,8 @@ diff-apply-hunk ;; Display BUF in a window (set-window-point (display-buffer buf) (+ (car pos) (cdr new))) (diff-hunk-status-msg line-offset (diff-xor switched reverse) nil) - - ;; Advance to the next hunk with skip-hunk-start set to t - ;; because we want the behavior of moving to the next logical - ;; hunk, not the original behavior where were would sometimes - ;; stay on the current hunk. This is the behavior we get when - ;; navigating through hunks interactively, and we want it when - ;; applying hunks too (see http://debbugs.gnu.org/17544). (when diff-advance-after-apply-hunk - (diff-hunk-next nil t)))))) + (diff-hunk-next)))))) (defun diff-test-hunk (&optional reverse) @@ -1972,15 +1865,14 @@ diff-current-defun (defun diff-ignore-whitespace-hunk () "Re-diff the current hunk, ignoring whitespace differences." (interactive) - (let* ((hunk-bounds (diff-bounds-of-hunk)) - (char-offset (- (point) (goto-char (car hunk-bounds)))) + (let* ((char-offset (- (point) (diff-beginning-of-hunk t))) (opts (pcase (char-after) (?@ "-bu") (?* "-bc") (_ "-b"))) (line-nb (and (or (looking-at "[^0-9]+\\([0-9]+\\)") (error "Can't find line number")) (string-to-number (match-string 1)))) (inhibit-read-only t) (hunk (delete-and-extract-region - (point) (cadr hunk-bounds))) + (point) (save-excursion (diff-end-of-hunk) (point)))) (lead (make-string (1- line-nb) ?\n)) ;Line nums start at 1. (file1 (make-temp-file "diff1")) (file2 (make-temp-file "diff2")) @@ -2067,14 +1959,16 @@ diff-refine-hunk (interactive) (require 'smerge-mode) (save-excursion - (let* ((hunk-bounds (diff-bounds-of-hunk)) - (style (progn (goto-char (car hunk-bounds)) - (diff-hunk-style))) ;Skips the hunk header as well. + (diff-beginning-of-hunk t) + (let* ((start (point)) + (style (diff-hunk-style)) ;Skips the hunk header as well. (beg (point)) - (end (cadr hunk-bounds)) (props-c '((diff-mode . fine) (face diff-refine-changed))) (props-r '((diff-mode . fine) (face diff-refine-removed))) - (props-a '((diff-mode . fine) (face diff-refine-added)))) + (props-a '((diff-mode . fine) (face diff-refine-added))) + ;; Be careful to go back to `start' so diff-end-of-hunk gets + ;; to read the hunk header's line info. + (end (progn (goto-char start) (diff-end-of-hunk) (point)))) (remove-overlays beg end 'diff-mode 'fine) -- 2.11.0 >From a5809529fac90741c6ede3fc66dfdac1e011434c Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Thu, 12 Jan 2017 12:46:25 +0900 Subject: [PATCH 2/2] 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. (diff-beginning-of-hunk): Use it. (diff-apply-hunk): Jump to beginning of hunk before apply the hunk. (diff-hunk-kill, diff-file-kill): Jump to beginning of hunk after kill. (diff-post-command-hook): Call diff-beginning-of-hunk with non-nil argument. --- lisp/vc/diff-mode.el | 67 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 44556ddd4a..3fc4713f0f 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -498,22 +498,55 @@ diff-end-of-hunk ;; The return value is used by easy-mmode-define-navigation. (goto-char (or end (point-max))))) +;; "index ", "old mode", "new mode", "new file mode" and +;; "deleted file mode" are output by git-diff. +(defconst diff-file-junk-re + "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") + +;; If point is in a diff header, then return beginning +;; of hunk position otherwise return nil. +(defun diff--at-diff-header-p () + "Return non-nil if point is inside a diff header." + (let ((regexp-hunk diff-hunk-header-re) + (regexp-file diff-file-header-re) + (regexp-junk diff-file-junk-re) + (orig (point))) + (catch 'headerp + (save-excursion + (forward-line 0) + (when (looking-at regexp-hunk) ; Hunk header. + (throw 'headerp (point))) + (forward-line -1) + (when (re-search-forward regexp-file (point-at-eol 4) t) ; File header. + (forward-line 0) + (throw 'headerp (point))) + (goto-char orig) + (forward-line 0) + (when (looking-at regexp-junk) ; Git diff junk. + (while (and (looking-at regexp-junk) + (not (bobp))) + (forward-line -1)) + (re-search-forward regexp-file nil t) + (forward-line 0) + (throw 'headerp (point)))) nil))) + (defun diff-beginning-of-hunk (&optional try-harder) "Move back to the previous hunk beginning, and return its position. If point is in a file header rather than a hunk, advance to the next hunk if TRY-HARDER is non-nil; otherwise signal an error." (beginning-of-line) - (if (looking-at diff-hunk-header-re) + (if (looking-at diff-hunk-header-re) ; At hunk header. (point) - (forward-line 1) - (condition-case () - (re-search-backward diff-hunk-header-re) - (error - (unless try-harder - (error "Can't find the beginning of the hunk")) - (diff-beginning-of-file-and-junk) - (diff-hunk-next) - (point))))) + (let ((pos (diff--at-diff-header-p)) + (regexp diff-hunk-header-re)) + (cond (pos ; At junk diff header. + (if try-harder + (goto-char pos) + (error "Can't find the beginning of the hunk"))) + ((re-search-backward regexp nil t)) ; In the middle of a hunk. + ((re-search-forward regexp nil t) ; At first hunk header. + (forward-line 0)) + (t (error "Can't find the beginning of the hunk")))))) (defun diff-unified-hunk-p () (save-excursion @@ -632,12 +665,8 @@ diff-hunk-kill hunk-bounds)) (inhibit-read-only t)) (apply 'kill-region bounds) - (goto-char (car bounds)))) - -;; "index ", "old mode", "new mode", "new file mode" and -;; "deleted file mode" are output by git-diff. -(defconst diff-file-junk-re - "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") + (goto-char (car bounds)) + (diff-beginning-of-hunk t))) (defun diff-beginning-of-file-and-junk () "Go to the beginning of file-related diff-info. @@ -690,7 +719,8 @@ diff-file-kill "Kill current file's hunks." (interactive) (let ((inhibit-read-only t)) - (apply 'kill-region (diff-bounds-of-file)))) + (apply 'kill-region (diff-bounds-of-file))) + (diff-beginning-of-hunk t)) (defun diff-kill-junk () "Kill spurious empty diffs." @@ -1274,7 +1304,7 @@ diff-post-command-hook ;; it's safer not to do it on big changes, e.g. when yanking a big ;; diff, or when the user edits the header, since we might then ;; screw up perfectly correct values. --Stef - (diff-beginning-of-hunk) + (diff-beginning-of-hunk t) (let* ((style (if (looking-at "\\*\\*\\*") 'context)) (start (line-beginning-position (if (eq style 'context) 3 2))) (mid (if (eq style 'context) @@ -1738,6 +1768,7 @@ diff-apply-hunk With a prefix argument, REVERSE the hunk." (interactive "P") + (diff-beginning-of-hunk t) (pcase-let ((`(,buf ,line-offset ,pos ,old ,new ,switched) ;; Sometimes we'd like to have the following behavior: if ;; REVERSE go to the new file, otherwise go to the old. -- 2.11.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.5) of 2017-01-12 Repository revision: d40073f017ffb3dee2266f356c127ef587c40b71 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 22:35:31 2017 Received: (at 25105) by debbugs.gnu.org; 13 Jan 2017 03:35:31 +0000 Received: from localhost ([127.0.0.1]:51953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRseJ-00070f-2q for submit@debbugs.gnu.org; Thu, 12 Jan 2017 22:35:31 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRseH-00070P-HC; Thu, 12 Jan 2017 22:35:29 -0500 Received: by mail-lf0-f67.google.com with SMTP id q89so4074191lfi.1; Thu, 12 Jan 2017 19:35:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=S3kZv860tjvWqD+3UxsdIio/ic2piei8qIETuX0T6mM=; b=l5i7wh8QI1uqqKgs19rkRUZPefGKloB83iFbqSoannYlHAl1aZxDLeN11+xvTwDOXn H6aoU+R0KwVZBSTCVAg7lv8oL8bTeQZYmmTc1M15v2Z+R6/c/gpAkGVnc8UyBwv1JM0p 3w6jRO03CB90vmTCn2PGYgGRr6epQP8EIUOWCUTobN0toyfe9GHPsJH88oBHDxcSHeRw 7McN7oRD/DPrsgydZPRCZc7xRQBXYM9aVFhIF7Y05yisGYPE1rmHdM7s8eqqoZlruuUI INsPQf0V5iw0oRdR69V7+O2FU5xtEI0uFO/nbb7TeFb2Bef8iEpuuTcvZa7I4i7DXiy4 j6VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=S3kZv860tjvWqD+3UxsdIio/ic2piei8qIETuX0T6mM=; b=my9vitGHddsiJvhiltTDcs2nft3gt75iXULb7GRAnNOl7FnegzUtKRmVnGu9FqgITV UwxUprmOJYvkbSM3/Mz/vPINmMpH86YI3UUyPTB6v4732WvWdEsHh4GqRS9oBq9NDGEu nKJmj3I8d5Z+o+DzqKWJxPOs3o466jVvXV0y12EtVyYKUIcrNczvUp4dTVVPxleRcEHK CskP12WvJmyzrbJ5gc58CKRLLMXerZCzoUXUGeZXEA/wkhk/23r+xHiNCCI3bVoWVbCf SKWPtDMyeBKnEUKIrQmSsrdhz8EkmTZptihm9Kgt+kK+uKOEQrbnqbPV32Irvd0MA6Q4 yj7Q== X-Gm-Message-State: AIkVDXImurW+i305NFRi2uu7BAaR5jgq5eLfehYob2XjrxXWyGZJ1++o7UDORszTgG6FnA== X-Received: by 10.46.77.197 with SMTP id c66mr6860497ljd.25.1484278523462; Thu, 12 Jan 2017 19:35:23 -0800 (PST) Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id e18sm2945631lfg.22.2017.01.12.19.35.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 19:35:22 -0800 (PST) Subject: Re: bug#25105: bug#25400: M-p in diff-mode jumps too far To: Tino Calancha References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> From: Dmitry Gutov Message-ID: Date: Fri, 13 Jan 2017 06:35:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 12.01.2017 06:53, Tino Calancha wrote: > Definitely. Thanks for the suggestion! Could you re-send the patches at attachments? Or just push them to a branch. I wish the first one could be produced with a simple 'git revert', but that leads to a conflict. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.67 listed in dnsbl.sorbs.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.67 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.67 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 25105 Cc: 25400@debbugs.gnu.org, npostavs@users.sourceforge.net, Mark Oteiza , Stefan Monnier , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 12.01.2017 06:53, Tino Calancha wrote: > Definitely. Thanks for the suggestion! Could you re-send the patches at attachments? Or just push them to a branch. I wish the first one could be produced with a simple 'git revert', but that leads to a conflict. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.67 listed in dnsbl.sorbs.net] 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.67 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.67 listed in list.dnswl.org] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid On 12.01.2017 06:53, Tino Calancha wrote: > Definitely. Thanks for the suggestion! Could you re-send the patches at attachments? Or just push them to a branch. I wish the first one could be produced with a simple 'git revert', but that leads to a conflict. I get "Can't find the text to patch" with the second one, though. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 22:55:52 2017 Received: (at 25105) by debbugs.gnu.org; 13 Jan 2017 03:55:52 +0000 Received: from localhost ([127.0.0.1]:51963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRsy0-0007Vb-9i for submit@debbugs.gnu.org; Thu, 12 Jan 2017 22:55:52 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRsxy-0007VI-W9; Thu, 12 Jan 2017 22:55:51 -0500 Received: by mail-pf0-f193.google.com with SMTP id b22so6262243pfd.3; Thu, 12 Jan 2017 19:55:50 -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=3CKUb0VVj3ByIVGVMY47dEMD+1q932Zm81y0Zd0hNHM=; b=pYjtPY1i8qiP0vCMP8o80sc8I3w+4+vY9HHeCwTWvC6ZmnIovmhgg0+72LfUQboTUJ KGZz4Mrwzms2dPWmck3o2dgyWTrBI2IrSh+a9/vZUa6h8s0S/sHBrEOXDSGPtlCLl+A4 zzEDNZgEOBqJBARR+uPZNGTrUUsfYuRSg1PfglqSSpjZGAZO1tzXxlleVK6cboUbWofz 1b5m/hbEF8Fj40VghK+q0u/u3C40Eus8B56q+bkRumyRxqcpqpnfv+Yvm5YfNgCoXSUK xkleuBoYuRCipxX3G6T+JRRSWJIbxNWi2liqwx4O/U4uXI3fnKl4SIXJP6BOzTX3gJSX JdOQ== 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=3CKUb0VVj3ByIVGVMY47dEMD+1q932Zm81y0Zd0hNHM=; b=DYN2FynDxs2FJitl1T/gzpojy6suLYS0BRnlIVX/+vWcMupGkLt3jai0Se9KLR0TXz RfiisnnfLzQebZNx2Q2EZg/lMrAiCZD7ck+6O2HRSukp6NvEaw6dK28iKDS2STRExo1w OxybVzk/EKA1QatmKeXK1z848cJor8872zAEEAVf9IswlxOereXtiWOZBaUj79qf9x6L yD2RB9kDS5xKtCg+H+Dr8kg0QzUk4QeHukq25kJ2q7XidiF2usEm1LV03cw3P5MbiyxC /QSf8xan44bTpjU+w2kNC2gja1vlIsdPYWErlzE2gEHqVByNnFkSTxrNVlX2G7S8CEq8 OiWw== X-Gm-Message-State: AIkVDXIImJVRl+Uvz1id4UbFX6WUgfbn3qteiISK9gKkJzP3ta+eVVMDRzlobf/CMiVIkw== X-Received: by 10.84.218.77 with SMTP id f13mr26690637plm.141.1484279745000; Thu, 12 Jan 2017 19:55:45 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id s136sm24988908pgc.38.2017.01.12.19.55.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 19:55:44 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 13 Jan 2017 12:55:40 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Dmitry Gutov Subject: Re: bug#25105: bug#25400: M-p in diff-mode jumps too far In-Reply-To: Message-ID: References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 25105 Cc: 25400@debbugs.gnu.org, npostavs@users.sourceforge.net, Tino Calancha , Mark Oteiza , Stefan Monnier , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On Fri, 13 Jan 2017, Dmitry Gutov wrote: > Could you re-send the patches at attachments? Or just push them to a branch. I have pushed those changes into following new branch: scratch/calancha-revert-2c8a7e5 From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 23:25:55 2017 Received: (at 25105) by debbugs.gnu.org; 13 Jan 2017 04:25:55 +0000 Received: from localhost ([127.0.0.1]:51973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRtR5-0008H4-2E for submit@debbugs.gnu.org; Thu, 12 Jan 2017 23:25:55 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:32948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRtR2-0008Gl-QC; Thu, 12 Jan 2017 23:25:53 -0500 Received: by mail-pf0-f196.google.com with SMTP id 127so6395960pfg.0; Thu, 12 Jan 2017 20:25:52 -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=3mBRoE0vdRqVdC0UmqaS6KIJkzMNWwGQyPowKBYiJGk=; b=OIqVl7OjDG2LXeOoaWrbTxNNsRJIY4s/27pR1KY1262L9O4Vh/Ax/tPHKlVVQFWK50 YuQuOpPoKW6Cl0pLxIckRDRXuqDMayNccSL9STh93fuGQzvFGz/Ld6bSa/oY105oIzaX 56GGyncbE8YWopnFeFs8JgGWhO+2e9ecq6h9/l8TkCJXRkDzb6ECbrNLMhiQWZwN4BT4 gqAc5EmX1Il7A/Y4CTGO2gW7orDbfzn+t0fqyNmgQg4yH6JunzV+xQPYjBWHtd//yED8 F3ZF0ZROuezmxBBxbv3R9Tk8/QtVIPCdFNDJQh09y+50zRdsCxmefLWJPorNgPc0QM3Z J00g== 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=3mBRoE0vdRqVdC0UmqaS6KIJkzMNWwGQyPowKBYiJGk=; b=HAep/vd7UIcmH7Idrc+iLRL5HZlWLneFOuuQuYymDuzqjYvnQfqbO4mn0QMpNr/pbL KnEUIBENAJ9UAHN5JG+dAwkdBgUOKrDZB4jEGE0P/aiLuQPvdiGs1eca5aby5/SgyFt6 fQorrCv9aXHsIrZ3hL1pYC3BOG1GOYM50KGsorD5oRBsYofp+dRtju6fdY0ToDrRC+aT ymv+vVzizPDtIQpFKwCRCZsmv9OZeRZYwPSUkH/XY4e88D5uhO43bhYG5CoQI/+2wAIr UyZjBQpwBqFltozxE0+LgFpKxsN8iBnjM4IoDoRyWZMDjdz+Bv9/9ep3wwUldgdUfteE xDug== X-Gm-Message-State: AIkVDXIdIDBieKf5cQnIKbwqaLtb544uq8Vo0Q2fb/i2QU4g94Q4WpkuzWiDwX1Up4JSZQ== X-Received: by 10.99.209.5 with SMTP id k5mr22012043pgg.145.1484281546753; Thu, 12 Jan 2017 20:25:46 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id u14sm25035068pfg.18.2017.01.12.20.25.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 20:25:46 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 13 Jan 2017 13:25:42 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Dmitry Gutov Subject: Re: bug#25105: bug#25400: M-p in diff-mode jumps too far In-Reply-To: Message-ID: References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 25105 Cc: 25400@debbugs.gnu.org, npostavs@users.sourceforge.net, Tino Calancha , Mark Oteiza , Stefan Monnier , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) On Fri, 13 Jan 2017, Dmitry Gutov wrote: > I wish the first one could be produced with a simple 'git revert', but that > leads to a conflict. Sorry for the confusin. I made the revert manually. In addition to commit 2c8a7e5, i've reverted following other related commits: e5ef59b87da5c2ddfa22f7342efe29b3eea6ed97 6b6abe0dba6a9a2e5f78aac3814421886e7a184f 73349822cbd6e50526eda9c75453584d73dfca83 a283d655db88cdcc8cb53d8e2578e1cdf751c84b 61c6a10e3110490dadac4577cc540053341ff25c 2c8a7e50d24daf19ea7d86f1cfeaa98a41c56085 In scratch/calancha-revert-2c8a7e5 branch, diff-mode.el history is as follows: ##### _before_ my changes ##### ;; initial state for diff-mode.el is as in commit: 1f5592572887fe15e5b660bc60e66a7ab7c624cd ; w/ copyright year 2016 ;; Update copyright year and we are at ;; 3e30cda89474209716c6e16a1a81d02877c95a2b ;; i.e., first commit in my new branch). ;; then, second commit (0beb7d2968ab76878eb3be26f2d749977fdcaa2f) ;; add my fix for Bug#17544. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 00:56:23 2017 Received: (at 25105) by debbugs.gnu.org; 13 Jan 2017 05:56:23 +0000 Received: from localhost ([127.0.0.1]:51998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRuqc-0003fs-UW for submit@debbugs.gnu.org; Fri, 13 Jan 2017 00:56:23 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:33005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRuqb-0003fY-99; Fri, 13 Jan 2017 00:56:21 -0500 Received: by mail-io0-f196.google.com with SMTP id 101so4654351iom.0; Thu, 12 Jan 2017 21:56:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=zdAePVdfyK/ZWlnqMzxNvSe7xOZXuH+HMGBNBm5C3bE=; b=CJ9v50+NMN2qhaVfJCI5NV2Z4F3aTIhzv62TytIboyc5g/5kBMtDFQXD/KXT7KTd2G UsKThui/cgSwF1anIxoylFDemZslq8MwRwQCXjzXq1c1NgLtrcD4nVASjAbo78j3YNzm H5NUtrXCozwoyUIJUeFgIMGOwxpu9xh5ASsEvlPEBAvsfwj5JFJmx6VMB1tHyxFU3NpV L9p10tp5/acxGhU5JdAkG2OB5BnYd1A45/9JtJvSB1hd16PeFAgk5uG28Q2L1AmPf0Zk ZTb32+DKtbzfyCVO0wI2b/kkabNACxq/fI6KDmik4dNmAfydr1g8oQFk+Ebkubtiqtgm nYnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=zdAePVdfyK/ZWlnqMzxNvSe7xOZXuH+HMGBNBm5C3bE=; b=SniGvmAkPUpDHdtuW/d4l0yBzARfDvJwkAL0a+qFHnJ75uK9nP1aeE1Lo5Uck2Yy+N QjisEZ9yP/Cm6uN/qoPDJ2UbauqMLTbl9uvW/xjo/apNu8TK+9B8jWBeMwaWCUOQvztP 72A1ooOeeXW+Xa+dSsIqABVbPahoo8A4vBQHWhMYKjF70IRaDl5MUAO3UEl9XPEUx/yo xQebtH7zbog8c1EmUSimEFI2fsds8YdsFXfBPNt9sqSZXkwTwmQina0rbpOvAl3It73n VuqRXWjLeE1eThSovgYm1NJFntBwqUiAIKmDndxfzqqVT0OzVkG5Tmk0qxdF8jkGCk/l 20nw== X-Gm-Message-State: AIkVDXJKonLzJwZQjvWQ1LtOs6aMhALU2tPXEaMU3hZxmjH8ei2vlhqutZ8U9/tvROV+2Q== X-Received: by 10.107.48.199 with SMTP id w190mr18686782iow.117.1484286975347; Thu, 12 Jan 2017 21:56:15 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id j143sm574791ita.1.2017.01.12.21.56.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Jan 2017 21:56:14 -0800 (PST) From: npostavs@users.sourceforge.net To: Tino Calancha Subject: Re: bug#25400: bug#25105: bug#25400: M-p in diff-mode jumps too far References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> Date: Fri, 13 Jan 2017 00:57:19 -0500 In-Reply-To: (Tino Calancha's message of "Fri, 13 Jan 2017 13:25:42 +0900 (JST)") Message-ID: <87fuknzem8.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org, Stefan Monnier , Dima Kogan , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) 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. 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. Tino Calancha writes: > > ;; 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 01:26:55 2017 Received: (at 25105) by debbugs.gnu.org; 13 Jan 2017 06:26:55 +0000 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 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 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) 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) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 13 Jan 2017 15:26:44 +0900 (JST) X-X-Sender: calancha@calancha-pc To: npostavs@users.sourceforge.net Subject: Re: bug#25400: bug#25105: bug#25400: M-p in diff-mode jumps too far In-Reply-To: <87fuknzem8.fsf@users.sourceforge.net> Message-ID: References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> <87fuknzem8.fsf@users.sourceforge.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 25105 Cc: Tino Calancha , Mark Oteiza , Stefan Monnier , Dmitry Gutov , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 01:41:45 2017 Received: (at 25105) by debbugs.gnu.org; 13 Jan 2017 06:41:45 +0000 Received: from localhost ([127.0.0.1]:52014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRvYW-0006k7-Ue for submit@debbugs.gnu.org; Fri, 13 Jan 2017 01:41:45 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:35412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRvYV-0006ju-8E for 25105@debbugs.gnu.org; Fri, 13 Jan 2017 01:41:43 -0500 Received: by mail-io0-f195.google.com with SMTP id m98so4715313iod.2 for <25105@debbugs.gnu.org>; Thu, 12 Jan 2017 22:41:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=PLFrQX6GDRsPPB8CTL4p/4TYYCNJTYKidxsiv8CKthU=; b=bHkoApNegmSRisgBLYPkM7ldYEjUcQjoDtkPU2gQ4T8A59Ml4MtJjPufReuuMFdnxG d9CQnmjlQewcD8s4oqHO08ojvHsxQZN0UQoKIWG504hMgMy7L+HTQ/abF+W3Il7tErmd AEDY4AIX1OwhXuJuxoXAQKE5m59ZqwK7NNsKF94Iei58PBjDSmzvg8yU556UQnMAdEGv ub6QMx2W9jBVEAOf9mgDGusIt8Ow67URUmEkS1ZYumjjStuJHoXpoFoX9yP3A0pan7vN G+JOLNx/lUo5Ve0WRU+3RXlBUSSGOmk13xaLlrgfmDzE/UWVTx458wQSkPnzUvbT1vN1 HlfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=PLFrQX6GDRsPPB8CTL4p/4TYYCNJTYKidxsiv8CKthU=; b=kBLU/tBXseRwOZ3H3EwNssXqCzNH2o8ynQc02hMWc7VFVaH6s7mUziJmKCG6JQCOVE SB5ACyZtN1jU+8IaT4a5pJRgWrczx0z56oPz/IZCetl4tFS1cRW6+PaH1qsu6WZx7lAM T8DLktzRA4B8xW3r0oDdsjJqwdfwvA1C9izfvzqWKOYhOPVjCeKXJjypAaVWyW55YYxH lKBzQq8FQ7J7OS8HGpRF5We0FxBpkHGHOfuqoIYWlPubdRBpqcZC8cH8lANrZIeOhzZ/ QfDHwLglIIBk7YPN3VEdIzWYZQeR4oPynbw2Wq4ZCWa+Sy2zKOH1biOyyZ/MAHDKJz47 JUFg== X-Gm-Message-State: AIkVDXK8USRO79lGNvtITY/+L3bxudOHMlGEVJdh38HRUkpW5DKsrA32257+B0f0TFBjMw== X-Received: by 10.107.13.7 with SMTP id 7mr4123059ion.122.1484289697456; Thu, 12 Jan 2017 22:41:37 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id c21sm6180233iod.38.2017.01.12.22.41.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Jan 2017 22:41:36 -0800 (PST) From: npostavs@users.sourceforge.net To: Tino Calancha Subject: Re: bug#25105: M-p in diff-mode jumps too far References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> <87fuknzem8.fsf@users.sourceforge.net> Date: Fri, 13 Jan 2017 01:42:42 -0500 In-Reply-To: (Tino Calancha's message of "Fri, 13 Jan 2017 15:26:44 +0900 (JST)") Message-ID: <87d1frzcil.fsf_-_@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org, Stefan Monnier , Dima Kogan , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Tino Calancha writes: >> >> 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 :-( Hmm, I'm still getting duplicates. Maybe I shouldn't have merged? Oh well. >> >> 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 I was thinking more about this summary line. And maybe add some higher level explanation before the ChangeLog entry about the problems being solved? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 01:54:39 2017 Received: (at 25105) by debbugs.gnu.org; 13 Jan 2017 06:54:39 +0000 Received: from localhost ([127.0.0.1]:52019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRvl1-00073y-3I for submit@debbugs.gnu.org; Fri, 13 Jan 2017 01:54:39 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRvl0-00073m-1g for 25105@debbugs.gnu.org; Fri, 13 Jan 2017 01:54:38 -0500 Received: by mail-pf0-f196.google.com with SMTP id 127so7001165pfg.0 for <25105@debbugs.gnu.org>; Thu, 12 Jan 2017 22:54:37 -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=3wXF/ItGsoY/SkOjDsOo0Ez4wgMxWdUPRENeQ9Q6db4=; b=CXIchjuTevL8Gbddnbnz6NTpDWG51YHKYlyqxtUPTqBvnoGhmyjoy3kX1s4LGnQ8+7 EQAl6QqpCgh8f9zOYVpqdySW+iiNPPHKGgnB6HAv/KEN6fRINCsn+nnlQKJfiJng8DQH 9ojafuhYRGTmIaQGoEQxqOEN/0nNxD/FWC3wFTVpFqu79EG1yY/jROsi8wqGYn/XFwdX yExluxHf6yY/QU1Zk/6UeotLsAOZev1fECU1EVOdDhslDg5RsazIevw5XX50L23gwPMR TMk23Dzb7r+MzX1CCjegWvVc+WsASdUQhhx8eduGmpK0PPxhWRadlcb1wfhc4fjeMfZq qZdw== 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=3wXF/ItGsoY/SkOjDsOo0Ez4wgMxWdUPRENeQ9Q6db4=; b=N3qknP9FuovzuRhuzmw71FTw+fFISIV883FPV39nIbhHKuCIey4jVWlE6r/HWDUpxt KPapTG9GMlYEcUcWYzwNx1khTfJ9ABv5sTTjWBRuP9uBIgm3Lz5RgnGLIg4w45BfdLS3 euqSdxsaPvmSd/NswiPELBxGL/cVvpI2olOBwKO8puGNeAilrtHSBfeyDwKIMVuOx/NO b/X7rwf461tXu2tTwxZjGnbPt70y/qLTmC4EQkiQL2cNLR7wycRpy2aRgdHUO3eGCKlq xHSq/w4wqHs9/LFQiM7iXBj/jaZ7XhKoD6NgwtlvrpYF9VRj8ca3S3ligDcnYfQYYKdO NYPQ== X-Gm-Message-State: AIkVDXKDOZTw3sR7gkjTltiJyL8Kd0ttym9OAZfLd4ioLiXz3IReYgek4fZpo9L16Vn4hQ== X-Received: by 10.84.225.148 with SMTP id u20mr26883276plj.93.1484290471357; Thu, 12 Jan 2017 22:54:31 -0800 (PST) Received: from calancha-pc (217.225.128.101.dy.bbexcite.jp. [101.128.225.217]) by smtp.gmail.com with ESMTPSA id 78sm26268966pfj.23.2017.01.12.22.54.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 22:54:30 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 13 Jan 2017 15:54:28 +0900 (JST) X-X-Sender: calancha@calancha-pc To: 25105@debbugs.gnu.org Subject: Re: bug#25105: M-p in diff-mode jumps too far In-Reply-To: <87d1frzcil.fsf_-_@users.sourceforge.net> Message-ID: References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> <87fuknzem8.fsf@users.sourceforge.net> <87d1frzcil.fsf_-_@users.sourceforge.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 25105 Cc: Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) On Fri, 13 Jan 2017, npostavs@users.sourceforge.net wrote: > Tino Calancha writes: > >>> >>> 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 :-( > > Hmm, I'm still getting duplicates. Maybe I shouldn't have merged? Oh well. Could be because i answered the e-mail to you and CC to Bug#25105? If you are registered to that bug you might get 2 e-mails. >>> 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 > > I was thinking more about this summary line. And maybe add some higher > level explanation before the ChangeLog entry about the problems being > solved? How about copy verbatim the comentary from Dima in 2c8a7e5? He explained very clearly the problem, and i am solving the same thing. Mention to the regressions should must appear in the previous commit, where i do the actual revert. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 20:48:20 2017 Received: (at 25105) by debbugs.gnu.org; 14 Jan 2017 01:48:20 +0000 Received: from localhost ([127.0.0.1]:53210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cSDS7-0002Co-UH for submit@debbugs.gnu.org; Fri, 13 Jan 2017 20:48:20 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:33156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cSDS7-0002CY-99 for 25105@debbugs.gnu.org; Fri, 13 Jan 2017 20:48:19 -0500 Received: by mail-it0-f68.google.com with SMTP id v14so6864404itb.0 for <25105@debbugs.gnu.org>; Fri, 13 Jan 2017 17:48:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=C6kdBJe4gC4bKOBcQXHdrK5ALx/WStL05ugkWYa1gG8=; b=ZpEGtLs+pkzj4uh+QlNNKpZobVMeTwf67gZnLLCXZLMctLkf6B4XpIBwDuN2o5JKB9 5BzaZMzRbaZQqJQ3LU08UtN0oacDgwqWSEKYVvRNTYu7v+7PsCmdV/HtYoO9lFp7qD8t jsIgDt3fGBDuwa740Fp6CLfPRvV5b3Q2aAjddsjr3s6hjxoYPNukfo9O81uZk4imv5ZO o0Tjozxdi9EaCREI9MHKFj9jPgvLgv4lHY5DMKRF+JGgkMQoA4KXLjyIE1+h2xKtKlid 4Ho3NP5oDAyrDuJXfnIxgkh9GveeoZCGvqL1xlOo/+fYY2GlTaN6Jv7XnI3fBsQjfZ/i puPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=C6kdBJe4gC4bKOBcQXHdrK5ALx/WStL05ugkWYa1gG8=; b=IIJFEIWlmBV3EOGzaGXSxpr9Hamp0TW46zYCPdf1WfJZt+iKerHdwOhRLN4DNw0mhb q7gpyBU0kBvvvTejaeE7brYxoLOknoE05L7kjjOjA6xHFqy0Z/o60fbGVdEC1cycJFLg l7tvGoEwthZSqco54wQ2fUXSv71YJSP2n2rrvCYq0zKqe3V96YmlAgaBc7C4npIaWAa2 XvKgeGL2QvKdXCacU9dWA+3xU4HgMjXz7TxiZdcnu2FNNolL2S3IyXO+8VlRImaCshwL MRKLxYQ0rk8573OViZRVRID0vVeI35YRLP/RtWha0E3Zqo8PrS/3QkOvYvHldjS6E7Hw 2krw== X-Gm-Message-State: AIkVDXLDSsmYjiBkmmEN86j/Sypo/y/7mIDnXXpQLcRJuMvj62sDIDMaJvk6b88UR7LwwQ== X-Received: by 10.36.204.9 with SMTP id x9mr5628071itf.123.1484358493656; Fri, 13 Jan 2017 17:48:13 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id o138sm1892653itc.18.2017.01.13.17.48.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jan 2017 17:48:12 -0800 (PST) From: npostavs@users.sourceforge.net To: Tino Calancha Subject: Re: bug#25105: M-p in diff-mode jumps too far References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> <87fuknzem8.fsf@users.sourceforge.net> <87d1frzcil.fsf_-_@users.sourceforge.net> Date: Fri, 13 Jan 2017 20:49:17 -0500 In-Reply-To: (Tino Calancha's message of "Fri, 13 Jan 2017 15:54:28 +0900 (JST)") Message-ID: <877f5yza02.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org, Dmitry Gutov , Stefan Monnier , Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Tino Calancha writes: > On Fri, 13 Jan 2017, npostavs@users.sourceforge.net wrote: > >> Hmm, I'm still getting duplicates. Maybe I shouldn't have merged? Oh well. > Could be because i answered the e-mail to you and CC to Bug#25105? If you > are registered to that bug you might get 2 e-mails. I think that's the normal case, and usually I don't get duplicated mails. >> I was thinking more about this summary line. And maybe add some higher >> level explanation before the ChangeLog entry about the problems being >> solved? > How about copy verbatim the comentary from Dima in 2c8a7e5? He explained > very clearly the problem, and i am solving the same thing. > Mention to the regressions should must appear in the previous commit, > where i do the actual revert. Yes, that looks good, though if I understand correctly, the important difference is that the navigation commands are not changed in your patch, only the manipulation ones, right? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 22:11:16 2017 Received: (at 25105) by debbugs.gnu.org; 14 Jan 2017 03:11:17 +0000 Received: from localhost ([127.0.0.1]:53222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cSEkO-000480-Mz for submit@debbugs.gnu.org; Fri, 13 Jan 2017 22:11:16 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:32905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cSEkN-00047k-Ch; Fri, 13 Jan 2017 22:11:15 -0500 Received: by mail-lf0-f65.google.com with SMTP id x1so2132900lff.0; Fri, 13 Jan 2017 19:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YbgDvut1xjainGZnZKC9mP93Mv9AhOFRuzr8DCIR0n4=; b=NsA7qrPaF6PDFQh/x9M0z/zOcGzAk5BpsY0XFFVyxN9Z4hHLBzPgCF3Xs1eRnCARNt 0mFuW0R7w5z/QCZGp4Cr5F9345zX/L7NQ7Eb1Cl5YGtR/GzJ1cammkJ68WSKw+kMvOWV 1opV1SrOQHPCh+YWMLupWnm+Hr77Ih0ey3QUOwnzTl56p75X7aKArczo5d5X769z1qE7 nxFtNP1iF90fAJKcZLQVZV8kQIIQHfXK0GisefHQspvfDeA+gZCPesWZ5edBO41C5yvP K6daa3aS9bPC5GFcyccJzAjk5Z8xorhjuWkiPK8vLmgHwmihVUIhW17MkVl22WvIMXAc 6+ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YbgDvut1xjainGZnZKC9mP93Mv9AhOFRuzr8DCIR0n4=; b=tbaVahNS8j6DfX4aOIYWiPs570Xhzzc6vhJ8i5Z3Km9turHA1EbRXbT055DWTB1ktH XLl8Ymp6wz6AXgLCSpIenKUuyFGJ0T0hv4UJ0dkahZJKE3NekUI3bexmO57F4AHKASFG c5i8lLoBUG2jkDW8kRHAkuq7rdeb4F3MbtE072MYDpObiU3M59iKDZ1kcoDaklEsMM+N upOGtLEM0lGbKOjagKPC1Q0ZH+TVUfB4di3iRpvp0jgeKv7RDBEGdhwAQX0/y6WjIG0K LA9h+4UM+5hBFUQC/UE9obxzLG4pGI3F1S7hVjXs69B7PeqfcY5t8m66ND+1ha3boEIs KIZg== X-Gm-Message-State: AIkVDXL6PJ/f404FnuysoF4u4a68XJjO24jECKQwPQQRyOuOgBpNFkZgcszy8pGWZfOibw== X-Received: by 10.46.88.78 with SMTP id x14mr892123ljd.60.1484363469260; Fri, 13 Jan 2017 19:11:09 -0800 (PST) Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id a138sm815555lfb.2.2017.01.13.19.11.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 19:11:08 -0800 (PST) Subject: Re: bug#25400: bug#25105: bug#25400: M-p in diff-mode jumps too far To: Tino Calancha References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> From: Dmitry Gutov Message-ID: <76679c83-f97e-985c-e91c-bf8234bee8c4@yandex.ru> Date: Sat, 14 Jan 2017 06:11:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Thunderbird/51.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 13.01.2017 06:55, Tino Calancha wrote: > I have pushed those changes into following new branch: > scratch/calancha-revert-2c8a7e5 I've tried it out (but not the changes discussed in this thread later), and the behavior is much better. Thanks! [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.65 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.65 listed in wl.mailspike.net] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 25105 Cc: 25400@debbugs.gnu.org, npostavs@users.sourceforge.net, Mark Oteiza , Stefan Monnier , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 13.01.2017 06:55, Tino Calancha wrote: > I have pushed those changes into following new branch: > scratch/calancha-revert-2c8a7e5 I've tried it out (but not the changes discussed in this thread later), and the behavior is much better. Thanks! [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.65 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.65 listed in list.dnswl.org] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid On 13.01.2017 06:55, Tino Calancha wrote: > I have pushed those changes into following new branch: > scratch/calancha-revert-2c8a7e5 I've tried it out (but not the changes discussed in this thread later), and the behavior is much better. Thanks! Please apply it to master sooner rather than later. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 22:16:57 2017 Received: (at 25105) by debbugs.gnu.org; 14 Jan 2017 03:16:57 +0000 Received: from localhost ([127.0.0.1]:53230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cSEpt-0004GJ-Kn for submit@debbugs.gnu.org; Fri, 13 Jan 2017 22:16:57 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:34644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cSEpr-0004G2-SV; Fri, 13 Jan 2017 22:16:56 -0500 Received: by mail-lf0-f68.google.com with SMTP id q89so7495628lfi.1; Fri, 13 Jan 2017 19:16:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oF24+RwuPqtw+VOj1AE2tWRxd8XqzHpvm+GV+xJzD4c=; b=l/jK7iK3PFW9hSm9hWxFmp3Ca4kLw3szknP1mEMeOFKfXQiu86G8pyYfUVaq6x+wQP 2tHkALwNRdvNH6sRKEec1SdPnof/HPAvfQDu3wrKCsxU7l6mmh8c8c55ZT6XvjjtaXUc zCwo7rJbC+29LzgVsMXtD2qvD2CuS5QOCvcanci2KWKwILJ8msciW/b8OHcQofrfVE/M FaDE3BJ7ZvdFAfZq3aEq6qucFOGkTCjbK2GurPCuI8irssSmIhFrQ5oJ4Yg0LVcqtsTG 8a2CHHCjbxYJzs46dfeCaD081w/8MWJaedJSc1sLruubZnWZvbdOyU3dHFadT3+yH2zp Iw5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oF24+RwuPqtw+VOj1AE2tWRxd8XqzHpvm+GV+xJzD4c=; b=QqXHeomUijxXxHz8syfFRoOLEbwEekY1RvOOPkFFSyMCPsPp4EuJBU3ONzYU64P5H5 3I52tN9NW4IVGH2hXspSMHkZCGK080dcsCwE5tDNXUIzEZAlc1oue57z0XwyyJLENKZS eFmSwK1shRyV7W2gomulquItS93bC/m93w69Gm8FFnqGoCHJjS9KBU2JJCryb3upist1 Mri3/pyu8NG9mLLZXgYBjPauYI23vGYa7uXY9c2YUJ0OuxcUDylb8m4keSDwn290pU4x sIR2lgOnz4vDGKlQy8kiQDAD7+yugs7v0M4zFmdqwuOEg1AoSAZdNNOlBeKkNORzJ1Ln 2MUQ== X-Gm-Message-State: AIkVDXLErTHsIgc+15GgXsknWJrUJb8648uFz/z1+WSSqWFxv43+WFJD6WShaK+vqxIAAw== X-Received: by 10.25.28.145 with SMTP id c139mr7382386lfc.167.1484363810044; Fri, 13 Jan 2017 19:16:50 -0800 (PST) Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id f25sm4650689lji.26.2017.01.13.19.16.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 19:16:49 -0800 (PST) Subject: Re: bug#25105: bug#25400: M-p in diff-mode jumps too far To: Tino Calancha References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> From: Dmitry Gutov Message-ID: <460f88f4-5289-6652-ef40-305c7b0639ee@yandex.ru> Date: Sat, 14 Jan 2017 06:16:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Thunderbird/51.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 13.01.2017 07:25, Tino Calancha wrote: > Sorry for the confusin. I made the revert manually. > In addition to commit 2c8a7e5, i've reverted following > other related commits: > > e5ef59b87da5c2ddfa22f7342efe29b3eea6ed97 > 6b6abe0dba6a9a2e5f78aac3814421886e7a184f > 73349822cbd6e50526eda9c75453584d73dfca83 > a283d655db88cdcc8cb53d8e2578e1cdf751c84b > 61c6a10e3110490dadac4577cc540053341ff25c > 2c8a7e50d24daf19ea7d86f1cfeaa98a41c56085 [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.68 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.68 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 25105 Cc: 25400@debbugs.gnu.org, npostavs@users.sourceforge.net, Mark Oteiza , Stefan Monnier , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 13.01.2017 07:25, Tino Calancha wrote: > Sorry for the confusin. I made the revert manually. > In addition to commit 2c8a7e5, i've reverted following > other related commits: > > e5ef59b87da5c2ddfa22f7342efe29b3eea6ed97 > 6b6abe0dba6a9a2e5f78aac3814421886e7a184f > 73349822cbd6e50526eda9c75453584d73dfca83 > a283d655db88cdcc8cb53d8e2578e1cdf751c84b > 61c6a10e3110490dadac4577cc540053341ff25c > 2c8a7e50d24daf19ea7d86f1cfeaa98a41c56085 [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.68 listed in dnsbl.sorbs.net] 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.68 listed in wl.mailspike.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid On 13.01.2017 07:25, Tino Calancha wrote: > Sorry for the confusin. I made the revert manually. > In addition to commit 2c8a7e5, i've reverted following > other related commits: > > e5ef59b87da5c2ddfa22f7342efe29b3eea6ed97 > 6b6abe0dba6a9a2e5f78aac3814421886e7a184f > 73349822cbd6e50526eda9c75453584d73dfca83 > a283d655db88cdcc8cb53d8e2578e1cdf751c84b > 61c6a10e3110490dadac4577cc540053341ff25c > 2c8a7e50d24daf19ea7d86f1cfeaa98a41c56085 On that subject, maybe reverting each of them separately would be better. Although I've tried how that affects 'git blame' in practice, and it makes no difference. Maybe our Changelog-generating script could take reverts into account (and skip commits that have been explicitly reverted later), if it doesn't do that already. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 14 00:47:26 2017 Received: (at 25105) by debbugs.gnu.org; 14 Jan 2017 05:47:26 +0000 Received: from localhost ([127.0.0.1]:53275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cSHBW-0007co-LY for submit@debbugs.gnu.org; Sat, 14 Jan 2017 00:47:26 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cSHBU-0007cc-Om for 25105@debbugs.gnu.org; Sat, 14 Jan 2017 00:47:25 -0500 Received: by mail-pf0-f195.google.com with SMTP id y143so10820417pfb.1 for <25105@debbugs.gnu.org>; Fri, 13 Jan 2017 21:47:24 -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=+iRzydW5i9BP6rSGSAwjFugH/XF0ZD78s+e/GipzW7g=; b=h+gBMq8VpVRRfSQv1CsuxFf4bReDwniVzfGtSvWoEiBHt9ttGrxEY0H+LqrWFzqGb9 PzcnpJQn3S5ncjhRtr6K6IDoxE6DRjkxfpfJmZ1tJcWojF71Tardu4p8qdNH0AaWd16l N+0OOJ9y2FrW7HZgv1vLvmozBkpZKRlFo3bYIGeGEQhk/5Y2gh0dDZULe4u8naQOGskC JxEjYg7nO2PJCG2M7CyeAoy0AzB29hCmRSTAnij5v+orh8lYfWILNdi4N3eF06TPcvb5 gwR4SXWS8x7uQXLnNs6N/EkDXus4z0NvXifGYxMAg2CJckEKD/ZyH+w6byfLCcj0YpKI LnnQ== 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=+iRzydW5i9BP6rSGSAwjFugH/XF0ZD78s+e/GipzW7g=; b=Wl/6OLf9YNf8MUKBtRxwYm/q6eWRWJPSFJ+SVK8DEODP1+IsU16sPNaX9N9KMq6P4B tSDqPchVTG+OpfdQ0stTtZgGo6GD0p5OaszdLWzB6wcSjRn7CQ7BLV34ApLHwHSG+YiP MnZvuMh8IxiArRZ2JEw7z0cZiqjW9OUglgA15f7vG8tQsmgtYOg4s8w7UvwnBdrj7Q1b ftnOeMu5e6iPRNR0rVYHQVWW8/GmFlY9Hsx7zIIuX6+tcSa7kWIrV1gvYL5ZSsFP9Lp+ PwAgtACe5C4EOyvKkIl+9NSQTgIHUSoCNHDsuqwX7tfBgXWS27rmu53qUjfoC747I0OG KrZA== X-Gm-Message-State: AIkVDXK4N4YBSdzW5/aGYuFg/C+QU7W3Br6sRGFAfsZW//6m+lST2LNjlCZwj3rImzuQUg== X-Received: by 10.84.216.2 with SMTP id m2mr34573436pli.31.1484372838690; Fri, 13 Jan 2017 21:47:18 -0800 (PST) Received: from calancha-pc (33.94.100.220.dy.bbexcite.jp. [220.100.94.33]) by smtp.gmail.com with ESMTPSA id t14sm6894245pfk.85.2017.01.13.21.47.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jan 2017 21:47:18 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 14 Jan 2017 14:47:15 +0900 (JST) X-X-Sender: calancha@calancha-pc To: npostavs@users.sourceforge.net Subject: Re: bug#25105: M-p in diff-mode jumps too far In-Reply-To: <877f5yza02.fsf@users.sourceforge.net> 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> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 25105 Cc: Tino Calancha , Mark Oteiza , Stefan Monnier , Dmitry Gutov , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On Fri, 13 Jan 2017, npostavs@users.sourceforge.net wrote: > Tino Calancha writes: >> How about copy verbatim the comentary from Dima in 2c8a7e5? He explained >> very clearly the problem, and i am solving the same thing. >> Mention to the regressions should must appear in the previous commit, >> where i do the actual revert. > > Yes, that looks good, though if I understand correctly, the important > difference is that the navigation commands are not changed in your > patch, only the manipulation ones, right? That's right. Essentially, my patch fix 1. and 2. in the commit message of 2c8a7e5. I am going to prepare one draft for the commit message based on Dima's message by Monday or Tuesday: i will drop mentions to the navigation commands. Then i will show it here so that people in this thread can give me comments/corrections to make the message clear for everyone. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 01:26:12 2017 Received: (at 25105) by debbugs.gnu.org; 16 Jan 2017 06:26:12 +0000 Received: from localhost ([127.0.0.1]:55181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cT0k8-0008W0-G5 for submit@debbugs.gnu.org; Mon, 16 Jan 2017 01:26:12 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cT0k7-0008Vo-BO for 25105@debbugs.gnu.org; Mon, 16 Jan 2017 01:26:11 -0500 Received: by mail-pf0-f193.google.com with SMTP id y143so13486644pfb.1 for <25105@debbugs.gnu.org>; Sun, 15 Jan 2017 22:26:11 -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=5y7guFZfGCfjxf6xSbM+7m5djXMPbN8cRXtwYTcpt1g=; b=aq46ilah1WS1f/D4Z1SGExZjA+qp/f8JAeuDnngvI8C1JmRwNzAoYSrbZ4OIwtTua3 UiWlbASyOKnmgQy/g0xCaKW5yETZ5xu0bSyvH45SVUb2DQ/pnLtic+YlTEmEk2bmkYRB 1RXXNM/Aly7nXXLJxXYSz0ZPP+hTQ8/pkMBotD+O3NQXh8yk7iYcZP1vH7jsCX+dQAkr br1mKv7jCtyxw+qUntyHX7/aYwoj3fuETeRY0N6OISO7tVPvV/7fkCEFAECfIyKtqvht dYlxawIeRqw4rkPhmRT6ijYMGkz6gQz+h8MV+OclP8K4cXAvdnYIzw47X46X4leYHWVY UC6g== 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=5y7guFZfGCfjxf6xSbM+7m5djXMPbN8cRXtwYTcpt1g=; b=YGJaES3x0mEFrz9Aul7d7S0Fd59YuJN2CXuYZeXIHnTsEjhy/BvA758W1DlrIil2W3 bipU0w9VY+XmUzh6zEeVp85WwB6lDmVm4FcC8TWYPT5CC7eoTD/B0H3JwTmz5Jd2htrg 3UQdLL++zeXv1r1Zv4lRWt5nLMPy6h4oOE8ARz3rpri2E7RCrRYW7QDdcB2UPtyFNAyp zW9d3mUEM8SSGt3fiGxBl/CNB6oCU3Tba1VKHlsmMD8h8dSmPmPSu/ShxYM/dX1+HPB9 5cJnZLlwXkKAh2MUNN+15tPhOkYe4DPgk35ymquAgoxaMabflYHPvlc4VXsOe8VpUctJ h18A== X-Gm-Message-State: AIkVDXKFibwFlhICp+pUxB1oEj1VC2cO86Aq1Ui6rjAL4oy3blrn+1YDjzwgvYyu/oHxAA== X-Received: by 10.84.233.201 with SMTP id m9mr47633819pln.91.1484547965270; Sun, 15 Jan 2017 22:26:05 -0800 (PST) Received: from calancha-pc (33.94.100.220.dy.bbexcite.jp. [220.100.94.33]) by smtp.gmail.com with ESMTPSA id k76sm28596893pfg.42.2017.01.15.22.26.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Jan 2017 22:26:04 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Mon, 16 Jan 2017 15:26:00 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Tino Calancha Subject: Re: bug#25105: M-p in diff-mode jumps too far In-Reply-To: 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> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 25105 Cc: npostavs@users.sourceforge.net, Mark Oteiza , Stefan Monnier , Dmitry Gutov , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On Sat, 14 Jan 2017, Tino Calancha wrote: > Essentially, my patch fix 1. and 2. in the commit message of 2c8a7e5. > I am going to prepare one draft for the commit message based on Dima's > message by Monday or Tuesday: i will drop mentions to the navigation > commands. Then i will show it here so that people in this thread can > give me comments/corrections to make the message clear for everyone. 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. ;; For the first commit, the revert of 2c8a7e5, i propose to keep the same ;; as before. Let me know in case you want to change it as well. Maybe ;; you want this commit list all the commits that it reverts? ;; Currently it just mentions 2c8a7e5, but it doesn't say a word about ;; the 'children commits': ;; e5ef59b8, 6b6abe0d, 73349822, a283d655 and 61c6a10e. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Improve diff-mode manipulation commands Fix Bug#17544. The use of `diff-apply-hunk' and `diff-hunk-kill' had several annoying corner cases that this patch fixes. These corner cases were largely due to inconsistent treatment of diff headers. Consider following diff: diff --git a/foo b/bar index 44556ddd4a..3fc4713f0f 100644 --- a/foo +++ b/bar @@ -52,7 +52,7 @@ hunk1 @@ -74,7 +74,7 @@ hunk2 diff --git a/baz b/qux index a8c3fcca2f..6b316c4073 100644 --- a/baz +++ b/qux @@ -608,6 +608,6 @@ hunk3 @@ -654,7 +654,7 @@ hunk4 The lines starting and ending with '@@' are the hunk headers. The lines starting with '---' and '+++' are the file headers. In addition, Git diffs add extra lines as those starting with 'diff' and 'index' above. Let's call these lines Git header. >From now on, these three headers are referred together as the diff header, that is, diff header = 'Git + file + hunk' headers. Commands `diff-apply-hunk' and `diff-hunk-kill' behaves differently depending on the point position within a diff header. 1. If point is at hunk1 header, '@@ -52,7 +52,7 @@' above, then `diff-apply-hunk' moves point to hunk2 header, i.e., '@@ -74,7 +74,7 @@' line. If point is at '--- a/foo' line, then `diff-apply-hunk' moves point to hunk1 header. 2. If point is at hunk3 header or its file header, then `diff-hunk-kill' deletes hunk3. If point is at the beginning of its Git header, i.e., 'diff --git a/baz b/qux' line, then `diff-hunk-kill' deletes hunk2. After this patch the behaviour of these commands is independent of the point position in the diff header. Then, it's possible to apply hunks in order. It's also 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. (diff-beginning-of-hunk): Use it. (diff-apply-hunk): Jump to beginning of hunk before apply the hunk. (diff-hunk-kill, diff-file-kill): Jump to beginning of hunk after kill. (diff-post-command-hook): Call diff-beginning-of-hunk with non-nil argument. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 17 18:24:54 2017 Received: (at 25105) by debbugs.gnu.org; 17 Jan 2017 23:24:54 +0000 Received: from localhost ([127.0.0.1]:34154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTd7V-0004oT-SV for submit@debbugs.gnu.org; Tue, 17 Jan 2017 18:24:54 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33055) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTd7U-0004oE-DE for 25105@debbugs.gnu.org; Tue, 17 Jan 2017 18:24:52 -0500 Received: by mail-lf0-f65.google.com with SMTP id x1so12730621lff.0 for <25105@debbugs.gnu.org>; Tue, 17 Jan 2017 15:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8yRvk8yFxFStuH0lh/LWQReMV0Z5NNQ7s1YGtA+NjKk=; b=BjDUY6URrRKjYrPxNWZu3DqjJaC4oa7q07Su31U0zelLco4kbD9oUrHsRAsIkw6j6K riy/9yRysijkgmHjGQbc0Ro9rEHxtR4WzOTvjcjnWdsaBPJqwutwIKE7HpT438BswFiE d29cwogAz+mSxQ0Tg2g+QKpm31jEVQX1CoCFfVyM6xSLogUQXVsb8wbue8/WqvfzUDrw ff26NABjT+e6E8O6FA36X2XjHnPhiDeFTBZ/w5pYUc/DtC8ZtTZSYiX2NeocF5Fy3mLX I5NtcA4Qynv2P8vyaU663PJQCdakmJOkfqkQagNh6wub1vrvxh4XWVyD5CXf8ivUK19G v9sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8yRvk8yFxFStuH0lh/LWQReMV0Z5NNQ7s1YGtA+NjKk=; b=Z+ywmCQZ07AK9Z/KPU6n84JsJkZnUw7jHJKhNf9Af/LDD5T06HbfTWGkbg/XKKDMNE sPL20qIbirJk27N8/gF3SYcRwJS0xV3gz4glVX0Vcr+rtWlGN2FMXXjw1w392xqv/who 17sIpJmBTw96ErIREm29t8q+bdmohq+Zq9mvha7Hr55h/6ZQjTGfyyMWujJeqPs3xr6O rVfPfTd2DPKA0qA+Q02y9qni7Ik5+uLF48CojvD6wrYRlUEAIBjSXJpAcHjfW6FkdiHX /42iJeFeCFHOx6f+wOXzArfP12cP3QjZNX+bszsnaAlx+cM6ObZDvWfcWSkBQAiE2uLy cumg== X-Gm-Message-State: AIkVDXKTCzTyHfp8G82ld7oTf33aenb5qbgCoR3EwleC73g8axAnHqYSwcla8jKY17t63w== X-Received: by 10.25.34.196 with SMTP id i187mr52525lfi.176.1484695486392; Tue, 17 Jan 2017 15:24:46 -0800 (PST) Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id d16sm9950266lfj.14.2017.01.17.15.24.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 15:24:45 -0800 (PST) Subject: Re: bug#25105: M-p in diff-mode jumps too far To: Tino Calancha 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> From: Dmitry Gutov Message-ID: <9dba6552-cd54-c6f0-18de-6822d43b0944@yandex.ru> Date: Wed, 18 Jan 2017 02:24:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Thunderbird/51.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.65 listed in dnsbl.sorbs.net] 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.65 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.65 listed in wl.mailspike.net] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 25105 Cc: Mark Oteiza , 25105@debbugs.gnu.org, Stefan Monnier , Dima Kogan , npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.65 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.65 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.65 listed in list.dnswl.org] 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 01:11:30 2017 Received: (at 25105) by debbugs.gnu.org; 18 Jan 2017 06:11:30 +0000 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 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 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) 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) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Wed, 18 Jan 2017 15:11:16 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Dmitry Gutov Subject: Re: bug#25105: M-p in diff-mode jumps too far In-Reply-To: <9dba6552-cd54-c6f0-18de-6822d43b0944@yandex.ru> 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> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25105 Cc: npostavs@users.sourceforge.net, Tino Calancha , Mark Oteiza , Stefan Monnier , 25105@debbugs.gnu.org, Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 20 22:02:45 2017 Received: (at 25105-done) by debbugs.gnu.org; 21 Jan 2017 03:02:45 +0000 Received: from localhost ([127.0.0.1]:36791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUlwz-0005Lf-9b for submit@debbugs.gnu.org; Fri, 20 Jan 2017 22:02:45 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUlww-0005LN-S6; Fri, 20 Jan 2017 22:02:43 -0500 Received: by mail-pf0-f196.google.com with SMTP id e4so6434762pfg.0; Fri, 20 Jan 2017 19:02:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:subject:in-reply-to:message-id:references:user-agent :mime-version; bh=vu1+R90hhduqofM5lrpfdldrSFcp8vYyjZjvSlsy7A4=; b=RzIUpzjsDB78m0q6p2Rs10P7p91V5B5UaR3z50+UgbuSCrPQ5logbynADYfGQLtMfz 6HHFU3CfmgtfHT1gXHZarvYvlnxJOeCV3OTOZTgD5RqNReyQp58Rdh0dsdOGmEGYEuO5 vw/b7Tqs9/zB2Ic6WdEaUGVN9xcqRDPJ7XwzC7BqtwhcOC0e0iInwrn7B0SIrwzkN7wl GuQlinInLnghduPO1K7OY2neqwDC2NEMNmXdABn6G4QjQJ18pnpukVoG0ZboOHPIzAiq dB4C2VgJAXSFr2eslgUbUsQuSQtTXmEjf+0LNEUqj87YltRdapVqU1xwSotHct7ZdSJh F9Ug== 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:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=vu1+R90hhduqofM5lrpfdldrSFcp8vYyjZjvSlsy7A4=; b=odJAoTWRYhnU+z3A0L+Oa8f/6tC0uhmlRTUQ8OwBRdZPia2+usaE0Kg9a30159Nag/ 810C+Uf59Vf/CcPGrudF0pVoaoDlZSyHcL654ctt+McbVU2Njz2WR1ePK4+eDyejomlG sR5pS/x6tLKnf2ZHimRqmwBPNezk7dcYT2JeBpMKq1ZZtkmatRfyMGISx5sC1TLkrGCr VY6YUYhg52ZRW6zUZSuT0ktu/z3FUikcp4NQleZaPiV+/LLsvCPiyxt3mLZUQpm5SvMA /TmU6wRStzgluw5wtk1J0cfw9p31qsHVQbQAvFQl81Wqd6i7be8yLChi19fzYN+zaTn4 xSqQ== X-Gm-Message-State: AIkVDXKLs1NLipsnIPq8epnIkZiFnjarJMzsNx2fBA3qM2VXXmUuBCnDtEVXJbhxNKQYhA== X-Received: by 10.99.167.10 with SMTP id d10mr20132283pgf.19.1484967756869; Fri, 20 Jan 2017 19:02:36 -0800 (PST) Received: from calancha-pc (33.94.100.220.dy.bbexcite.jp. [220.100.94.33]) by smtp.gmail.com with ESMTPSA id g64sm19775696pfc.57.2017.01.20.19.02.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 19:02:36 -0800 (PST) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 21 Jan 2017 12:02:34 +0900 (JST) X-X-Sender: calancha@calancha-pc To: 25105-done@debbugs.gnu.org, 25400-done@debbugs.gnu.org Subject: Re: bug#25400: bug#25105: bug#25400: M-p in diff-mode jumps too far In-Reply-To: <76679c83-f97e-985c-e91c-bf8234bee8c4@yandex.ru> Message-ID: References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> <76679c83-f97e-985c-e91c-bf8234bee8c4@yandex.ru> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 25105-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) On Sat, 14 Jan 2017, Dmitry Gutov wrote: > On 13.01.2017 06:55, Tino Calancha wrote: > >> I have pushed those changes into following new branch: >> scratch/calancha-revert-2c8a7e5 > > I've tried it out (but not the changes discussed in this thread later), and > the behavior is much better. Thanks! > > Please apply it to master sooner rather than later. Pushed the fix to master branch as commits: 1508b538fd8f8c2e00aadcea42ac36013fad02e3 e5e42cefd7f2eb47d2c8660a7a317e8b08d36a82 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 22 22:42:44 2017 Received: (at 25105) by debbugs.gnu.org; 23 Jan 2017 03:42:44 +0000 Received: from localhost ([127.0.0.1]:38602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cVVWm-0007cj-0l for submit@debbugs.gnu.org; Sun, 22 Jan 2017 22:42:44 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33321) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cVVWk-0007cW-0s for 25105@debbugs.gnu.org; Sun, 22 Jan 2017 22:42:42 -0500 Received: by mail-lf0-f68.google.com with SMTP id x1so13092877lff.0 for <25105@debbugs.gnu.org>; Sun, 22 Jan 2017 19:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kNBhNm+XPF+W+z4N0U7krihDwgnrIJ74Uqgv3sh3BVY=; b=PCFi7PJZ4sv6nG+JlqWuThRkxkQYW8DN6EDMKBszVmTmGg3ebmyb0VJcuFKeyRbxR4 f6Fggbaiy3WzF8G4pDXrsCFnraVFj0XZA+qpHlm4qGRJRKhuImg8dnlD34GiIgpFDMC9 AGufB2miAc8YPF3p/EYp3x3HfN5Jyo8C0z984eMvU2uPQUq2zz7/vIFlhfp/d9Qqfpgw EoBbSaE3Y4x+hZqenTMW98Bw2pYgIY3f0ylkYKpB68pepj8jl60yoIIvXwnz/Lj9tyW4 NSpnlQrYNND0kl4aviJLmj3fKMHxD8W4OIa7bl8m1FsvF0I1ItkdwkmNxAbjqRtYqUHw AJlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kNBhNm+XPF+W+z4N0U7krihDwgnrIJ74Uqgv3sh3BVY=; b=HevdvPovi8wxWUr1bkQ6tapv6ubvHZltOwMMpHkbefAbX7bERXwxRQhCkZJrMlMd0d IALlqZ72tRVSWeKXE0oWIHtHLzJ2oyDVU4MWRMgB1AN8vjPDQNcihkrQuJqV7AElgbHL jNWt1PPgMgfJzuWboE5/wRo1KQt4HAiTjlDbZl5Ldp2+kg30Gutpv7QdsVJTp76B81ST Soi+cTcho/auJHk0mT708pzCL+gh1evnpRyMBX0cb+w3kLFxN29cqfMWBgkX8mnzrSic p2aQrHrKYaq9YPGCkJ1+sTn5Nu3UUAmQqjU2opr+K5sHvfHwsmn5T8TY7y0yNWmTgNLJ za3A== X-Gm-Message-State: AIkVDXLM3eN9PnltqUwBv/KUsXt8QRq1ITTWfWIEDEDSXIuJd42nI5qHCqAumwmb1KyGtg== X-Received: by 10.25.29.68 with SMTP id d65mr7096506lfd.112.1485142956021; Sun, 22 Jan 2017 19:42:36 -0800 (PST) Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id k127sm5866669lfg.10.2017.01.22.19.42.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 19:42:35 -0800 (PST) Subject: Re: bug#25105: bug#25400: bug#25105: bug#25400: M-p in diff-mode jumps too far To: 25105@debbugs.gnu.org, tino.calancha@gmail.com, mvoteiza@udel.edu References: <87a8aydxe4.fsf@gmail.com> <3c2e407b-8ba2-1791-15e6-a0be6dac2897@yandex.ru> <76679c83-f97e-985c-e91c-bf8234bee8c4@yandex.ru> From: Dmitry Gutov Message-ID: <4832a4fc-fdc1-a124-e956-90fdf581eac7@yandex.ru> Date: Mon, 23 Jan 2017 06:42:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Thunderbird/51.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 21.01.2017 06:02, Tino Calancha wrote: > Pushed the fix to master branch as commits: > 1508b538fd8f8c2e00aadcea42ac36013fad02e3 > e5e42cefd7f2eb47d2c8660a7a317e8b08d36a82 Thank you very much. I can use the master branch again. :) [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.68 listed in wl.mailspike.net] 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.68 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 25105 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 4.1 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 21.01.2017 06:02, Tino Calancha wrote: > Pushed the fix to master branch as commits: > 1508b538fd8f8c2e00aadcea42ac36013fad02e3 > e5e42cefd7f2eb47d2c8660a7a317e8b08d36a82 Thank you very much. I can use the master branch again. :) [...] Content analysis details: (4.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.215.68 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.68 listed in wl.mailspike.net] 3.6 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders On 21.01.2017 06:02, Tino Calancha wrote: > Pushed the fix to master branch as commits: > 1508b538fd8f8c2e00aadcea42ac36013fad02e3 > e5e42cefd7f2eb47d2c8660a7a317e8b08d36a82 Thank you very much. I can use the master branch again. :) From unknown Sat Aug 09 13:07:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 Feb 2017 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator