From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.bugs Subject: bug#21262: 25.0.50; Diff-mode gets confused about its narrowing if hunk source not found Date: Fri, 14 Aug 2015 22:12:09 -0700 Message-ID: <87lhdd5e52.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1439618545 31567 80.91.229.3 (15 Aug 2015 06:02:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Aug 2015 06:02:25 +0000 (UTC) To: 21262@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 15 08:02:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZQUXj-0003tL-Jp for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Aug 2015 08:02:11 +0200 Original-Received: from localhost ([::1]:49110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQUXi-0006BT-M8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Aug 2015 02:02:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQUXe-0006Ak-WB for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 02:02:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQUXa-0002WI-1P for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 02:02:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQUXZ-0002WC-Vg for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 02:02:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZQUXZ-0004Fg-PH for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 02:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Aug 2015 06:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21262 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143961850016315 (code B ref -1); Sat, 15 Aug 2015 06:02:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Aug 2015 06:01:40 +0000 Original-Received: from localhost ([127.0.0.1]:56181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQUXE-0004F4-4s for submit@debbugs.gnu.org; Sat, 15 Aug 2015 02:01:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36755) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZQUXB-0004Ew-PQ for submit@debbugs.gnu.org; Sat, 15 Aug 2015 02:01:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQUXA-0002N0-HK for submit@debbugs.gnu.org; Sat, 15 Aug 2015 02:01:37 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQUXA-0002Mw-FU for submit@debbugs.gnu.org; Sat, 15 Aug 2015 02:01:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQUX9-00063z-JR for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 02:01:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQUX3-0002Ip-LH for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 02:01:35 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:51126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQUX3-0002Hw-Ch for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2015 02:01:29 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 8BD02209E8 for ; Sat, 15 Aug 2015 02:01:27 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Sat, 15 Aug 2015 02:01:27 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=fzTCVWV56dqkRdsy2u4c2p/BF3c =; b=FbaKyVQrHeYcFzH0MT9sbqO9+th2dnhJkkrVaQvEPcBzDrjl+sDIP0iAVZN Xl4JRShHyvqkGdujwyihSe4CD/cmPsH2tZc0eOWtmvmQV+Wtu38ElhGLO36XITmC Kn653KuDKXREXPykdIeMyA3pxh35mrm/UpKr9o0dsyDM2e8k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=fz TCVWV56dqkRdsy2u4c2p/BF3c=; b=n9OT+Yw1dDlMG+Hf3bnyP4qRd6fhlYUN4u A6k8m4uZs+dgwgfX1y/EETO5zO41fA5gLoqimfwWclfbxtFtBJ9AboMZ3SYDVmRv /sWJ6KDKgFBuu87HL1nUvSirneT9POnTbIhvsucjUS8Kw2OFewrhKVKO/Sj+g90o N2Kd9sVoU= X-Sasl-enc: WrzzYaART5+RsP5mFFn5Hhx3Ue0AdNaR9OmdVDV6Ls62 1439618487 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 45DBDC00018 for ; Sat, 15 Aug 2015 02:01:27 -0400 (EDT) Original-Received: from [::1] (helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1ZQTlT-00017t-VL for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2015 22:12:20 -0700 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105489 Archived-At: --=-=-= Content-Type: text/plain Hi. This bug has been there since at least emacs23 it seems like. To reproduce: 1. emacs -Q 2. Open any patch file that has hunks from more than one file in it. For instance, the attached patch file works, but it really doesn't matter 3. Narrow to just the second file's diffs. For instance: M-N M-N C-SPC C-> C-x n n SPC (last SPC to confirm the narrowing) 4. Try to see the source of the hunk. Move the point to the guts of the hunk, and M-enter. Emacs asks for the directory where the sources live. In the process, it changes the narrowing to the wrong hunk. This is wrong. The narrowing shouldn't change. 5. If we cancel with C-g, the wrong narrowing persists --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=tst2.diff diff --git a/src/charset.c b/src/charset.c index b19e344..eeebf17 100644 --- a/src/charset.c +++ b/src/charset.c @@ -555,7 +555,7 @@ load_charset_map_from_vector (struct charset *charset, Lisp_Object vec, int cont if (len % 2 == 1) { - add_to_log ("Failure in loading charset map: %V", vec, Qnil); + add_to_log ("Failure in loading charset map: %V", vec); return; } diff --git a/src/image.c b/src/image.c index 066db74..313419b 100644 --- a/src/image.c +++ b/src/image.c @@ -629,16 +629,19 @@ valid_image_p (Lisp_Object object) } -/* Log error message with format string FORMAT and argument ARG. +/* Log error message with format string FORMAT and trailing arguments. Signaling an error, e.g. when an image cannot be loaded, is not a good idea because this would interrupt redisplay, and the error message display would lead to another redisplay. This function therefore simply displays a message. */ static void -image_error (const char *format, Lisp_Object arg1, Lisp_Object arg2) +image_error (const char *format, ...) { - add_to_log (format, arg1, arg2); + va_list ap; + va_start (ap, format); + vadd_to_log (format, ap); + va_end (ap); } --=-=-=--