From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.bugs Subject: bug#17544: 24.3; [PATCH] Improved diff-mode navigation/manipulation Date: Sat, 22 Oct 2016 18:44:15 -0700 Message-ID: <87h983rg9c.fsf@secretsauce.net> References: <87ha4jgw53.fsf@secretsauce.net> <87si0ion1c.fsf@gnus.org> <87k2et8hr4.fsf@secretsauce.net> <83a8fpe1dr.fsf@gnu.org> <87h99w8ynv.fsf@secretsauce.net> <87k2es9weh.fsf@users.sourceforge.net> <87oa4018r3.fsf@secretsauce.net> <87twdi6rm9.fsf@secretsauce.net> <87h997nkqp.fsf@secretsauce.net> <874m44tmge.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1477187117 21588 195.159.176.226 (23 Oct 2016 01:45:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Oct 2016 01:45:17 +0000 (UTC) User-Agent: mu4e 0.9.17; emacs 26.0.50.1 Cc: Andreas Schwab , 17544@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 23 03:45:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by7qa-0004z1-0p for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Oct 2016 03:45:12 +0200 Original-Received: from localhost ([::1]:39368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by7qc-0006XA-6r for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 21:45:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1by7qU-0006VV-UU for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 21:45:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1by7qQ-0003TQ-QP for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 21:45:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1by7qQ-0003TL-N5 for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 21:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1by7qQ-0000AZ-C1 for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 21:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Oct 2016 01:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17544 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 17544-submit@debbugs.gnu.org id=B17544.1477187060576 (code B ref 17544); Sun, 23 Oct 2016 01:45:02 +0000 Original-Received: (at 17544) by debbugs.gnu.org; 23 Oct 2016 01:44:20 +0000 Original-Received: from localhost ([127.0.0.1]:46697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by7pk-00009E-9i for submit@debbugs.gnu.org; Sat, 22 Oct 2016 21:44:20 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:55488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1by7pi-000096-Jp for 17544@debbugs.gnu.org; Sat, 22 Oct 2016 21:44:18 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DBF1F2079C; Sat, 22 Oct 2016 21:44:17 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sat, 22 Oct 2016 21:44:17 -0400 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-sasl-enc:x-sasl-enc; s=mesmtp; bh=DfLpf F6h5lzlHXcsnp62aiOhcUk=; b=Ad+mLiFd+RmlV6acUjU/avBrwCEtVZXAsqSN5 n1zm0mLhb3RLAjnk8QO/t2v74c2+92EgiSawKMrqBikdmx/CMeflSZVo2XBkAxjR M+nfIfX6a2xPft2nQhXpRe9lPX4xHQWXcBB7AnyVGNjg33CW/yWMVstelVrBHpND 6mBKTw= 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-sasl-enc :x-sasl-enc; s=smtpout; bh=DfLpfF6h5lzlHXcsnp62aiOhcUk=; b=TCM31 IYKVzewAEfCpXsdkjwWwO2DNm83CDrRGlYy5k8TLUA1+MhIMZJbxLe6riNsGADdC dPW2f1aSHgok52cun/ZSgprnJl3+Km1yJqECfw0Rm1fDeAg9BlPKrUkyXnmYL0ox FuqdtNeSxraYGjO3iuz6XnqeL8i+cfaGQSOrek= X-Sasl-enc: HsERxI2BH8AP09TBklnmgyaU4WUe7CoQ9iaekYOl+p1T 1477187057 Original-Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 93782F29C9; Sat, 22 Oct 2016 21:44:17 -0400 (EDT) Original-Received: from dima by shorty.local with local (Exim 4.87) (envelope-from ) id 1by7pf-0003jC-TV; Sat, 22 Oct 2016 18:44:15 -0700 In-reply-to: <874m44tmge.fsf@users.sourceforge.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124862 Archived-At: npostavs@users.sourceforge.net writes: > Dima Kogan writes: > >> Here's yet another revised patch. The (call-interactively) at the end of >> (diff-apply-hunk) was important, it turns out. This would force it to >> use the new logic to move to the next hunk, instead of the legacy logic. >> I purposely left the behavior of (diff-next-hunk) unchanged from before >> when running non-interactively, and here I explicitly want the new >> behavior. > > If both behaviours are needed, it would be much better if lisp code > could choose between them without having to use call-interactively, > that's quite an awkward interface. Hi. I'm open to suggestions. The goal was to retain the previous logic for any existing code, but to provide improved user-facing behavior. Given this, it doesn't seem to me to be too awkward to pass-on the "interactive-p" state to child functions. Am I wrong to want to preserve existing behavior for elisp code? If so, then the entire old path can simply go away unconditionally.