From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 24 14:27:53 2013 Received: (at submit) by debbugs.gnu.org; 24 Jan 2013 19:27:54 +0000 Received: from localhost ([127.0.0.1]:48157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TySSn-0003XK-KN for submit@debbugs.gnu.org; Thu, 24 Jan 2013 14:27:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34450) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TySSk-0003XC-LP for submit@debbugs.gnu.org; Thu, 24 Jan 2013 14:27:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TySSc-0001fw-IL for submit@debbugs.gnu.org; Thu, 24 Jan 2013 14:27:46 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TySSc-0001fs-F1 for submit@debbugs.gnu.org; Thu, 24 Jan 2013 14:27:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TySSZ-0007lJ-O8 for bug-gnu-emacs@gnu.org; Thu, 24 Jan 2013 14:27:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TySSX-0001f6-RY for bug-gnu-emacs@gnu.org; Thu, 24 Jan 2013 14:27:39 -0500 Received: from mail-ve0-f174.google.com ([209.85.128.174]:62210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TySSX-0001ew-I5 for bug-gnu-emacs@gnu.org; Thu, 24 Jan 2013 14:27:37 -0500 Received: by mail-ve0-f174.google.com with SMTP id c13so1669517vea.19 for ; Thu, 24 Jan 2013 11:27:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:user-agent:date:message-id:mime-version :content-type:content-transfer-encoding; bh=l44gwx2KMRGSEIeUuPQ11FhV4O4RL7/VX3rCvUho19s=; b=bmQyZoU5dZpsdqW/ndLLQqRXObRP8CLwIM55mklKqUZHykjrt33gmoZiPBQ18ubrGL ucHHz0VTazl2yk9/ilmQUS8Zmsqu/XUpRg6F7UY3c4saS4fBc151X9B9imqGhqmxnTO9 sjFOJ+r9tmO0NZ9NgTvbgefM+R9VfXTrFXHeZI128KbZiXWgQlt9D6ZdjallWQh9m7iP n3I+IefZdWomuK8qNSpuMOZqtS2qLi4fR7jh9JwZH0m53ZSb2W8o/5uUS+vfpXT9BPy9 opVezHnGbf9e62ioGK0kblVbVwTDBIgQRlX+1rvIJOFS3DDbQihBCLq8LhPCYb5Lo2Sx 2fvA== X-Received: by 10.52.34.170 with SMTP id a10mr2849226vdj.41.1359055656103; Thu, 24 Jan 2013 11:27:36 -0800 (PST) Received: from localhost (vagvlan532.111.wlan.wireless-pennnet.upenn.edu. [128.91.71.240]) by mx.google.com with ESMTPS id p10sm13776234vdh.4.2013.01.24.11.27.33 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 24 Jan 2013 11:27:34 -0800 (PST) From: Aaron Ecay To: bug-gnu-emacs@gnu.org Subject: 24.3.50; args-out-of-range in jit-lock-fontify-now User-Agent: Notmuch/0.14+247~g7fad82b (http://notmuchmail.org) Emacs/24.3.50.6 (x86_64-unknown-linux-gnu) Date: Thu, 24 Jan 2013 14:27:32 -0500 Message-ID: <87mwvyxty3.fsf@gmail.com> 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 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Related to the recent change to raise (as opposed to ignoring) errors generated in timers, I have started seeing backtraces similar to the following: Debugger entered--Lisp error: (args-out-of-range 1 23) text-property-any(1 23 fontified t) jit-lock-fontify-now(1 501) jit-lock-stealth-fontify(t) apply(jit-lock-stealth-fontify t) byte-code("r\301^H\302H^H\303H\"\210)\301\207" [timer apply 5 6] 4) timer-event-handler([t 0 7 37086 nil jit-lock-stealth-fontify (t) idle 943000]) This shows up (for example) in a message-mode buffer with some of the mail headers hidden by narrowing. The issue is that the min value for the region to be fontified is calculated with the buffer temporarily widened (by the function =E2=80=98jit-lock-stealth-chunk-start=E2=80=99), but =E2=80=98jit-lock-font= ify-now=E2=80=99 does not widen the buffer. I think the solution is either: 1) add a (save-restriction (widen) ...) to jit-lock-fontify-now* 2) add (setq start (max start (point-min))) at line 357 of jit-lock.el I don=E2=80=99t know enough about the fontification code to know which is correct. (But note that strategy 2 is used for the =E2=80=98end=E2=80=99 a= rgument to =E2=80=98jit-lock-fontify-now=E2=80=99, also at line 357). * If widening should be done in general when fontifying, perhaps the =E2=80=98with-buffer-prepared-for-jit-lock=E2=80=99 macro should do it. Thanks, --=20 Aaron Ecay From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 30 12:06:44 2013 Received: (at 13542) by debbugs.gnu.org; 30 Jan 2013 17:06:45 +0000 Received: from localhost ([127.0.0.1]:55968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0b7U-0001hx-LR for submit@debbugs.gnu.org; Wed, 30 Jan 2013 12:06:44 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:20913) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0b7T-0001hr-Il for 13542@debbugs.gnu.org; Wed, 30 Jan 2013 12:06:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgEFABK/CFG4rw3e/2dsb2JhbABEhke0boNZF3OCHgEBBAEjMyMFCwsaAhgOAgIUGA0kiB4Grl+SToEjjlSBEwOIYZwZgV6DFYFIJA X-IPAS-Result: AgEFABK/CFG4rw3e/2dsb2JhbABEhke0boNZF3OCHgEBBAEjMyMFCwsaAhgOAgIUGA0kiB4Grl+SToEjjlSBEwOIYZwZgV6DFYFIJA X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35665" Received: from 184-175-13-222.dsl.teksavvy.com (HELO ceviche.home) ([184.175.13.222]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Jan 2013 12:06:05 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 76183660D9; Wed, 30 Jan 2013 12:06:05 -0500 (EST) From: Stefan Monnier To: Aaron Ecay Subject: Re: bug#13542: 24.3.50; args-out-of-range in jit-lock-fontify-now Message-ID: References: <87mwvyxty3.fsf@gmail.com> Date: Wed, 30 Jan 2013 12:06:05 -0500 In-Reply-To: <87mwvyxty3.fsf@gmail.com> (Aaron Ecay's message of "Thu, 24 Jan 2013 14:27:32 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13542 Cc: 13542@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.5 (/) > The issue is that the min value for the region to be fontified is > calculated with the buffer temporarily widened (by the function > =E2=80=98jit-lock-stealth-chunk-start=E2=80=99), but =E2=80=98jit-lock-fo= ntify-now=E2=80=99 does not > widen the buffer. That's a left over from the 2002-10-01 change that decided that jit-lock should not widen. I've installed the patch below which should fix the problem. Stefan =3D=3D=3D modified file 'lisp/jit-lock.el' --- lisp/jit-lock.el 2013-01-13 01:23:48 +0000 +++ lisp/jit-lock.el 2013-01-30 16:59:53 +0000 @@ -439,8 +435,6 @@ Value is nil if there is nothing more to fontify." (if (zerop (buffer-size)) nil - (save-restriction - (widen) (let* ((next (text-property-not-all around (point-max) 'fontified t)) (prev (previous-single-property-change around 'fontified)) (prop (get-text-property (max (point-min) (1- around)) @@ -473,7 +467,7 @@ ((null next) start) ((< (- around start) (- next around)) start) (t next)))) - result)))) + result))) =20 (defun jit-lock-stealth-fontify (&optional repeat) "Fontify buffers stealthily. @@ -564,6 +558,8 @@ (when jit-lock-context-unfontify-pos ;; (message "Jit-Context %s" (buffer-name)) (save-restriction + ;; Don't be blindsided by narrowing that starts in the middle + ;; of a jit-lock-defer-multiline. (widen) (when (and (>=3D jit-lock-context-unfontify-pos (point-min)) (< jit-lock-context-unfontify-pos (point-max))) From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 30 12:07:36 2013 Received: (at control) by debbugs.gnu.org; 30 Jan 2013 17:07:36 +0000 Received: from localhost ([127.0.0.1]:55972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0b8J-0001jQ-W5 for submit@debbugs.gnu.org; Wed, 30 Jan 2013 12:07:36 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:63769) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0b8I-0001jI-O1 for control@debbugs.gnu.org; Wed, 30 Jan 2013 12:07:35 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rw3e/2dsb2JhbABEuzWDWRdzgh8BBVYzCzQSFBgNiEjBLY1hgykDiGGcGYFegxU X-IPAS-Result: Av8EABK/CFG4rw3e/2dsb2JhbABEuzWDWRdzgh8BBVYzCzQSFBgNiEjBLY1hgykDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35734" Received: from 184-175-13-222.dsl.teksavvy.com (HELO ceviche.home) ([184.175.13.222]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Jan 2013 12:06:56 -0500 Received: by ceviche.home (Postfix, from userid 20848) id BA2BD660D9; Wed, 30 Jan 2013 12:06:56 -0500 (EST) From: Stefan Monnier To: control@debbugs.gnu.org Subject: Re: bug#13542: 24.3.50; args-out-of-range in jit-lock-fontify-now Message-ID: References: <87mwvyxty3.fsf@gmail.com> Date: Wed, 30 Jan 2013 12:06:56 -0500 In-Reply-To: <87mwvyxty3.fsf@gmail.com> (Aaron Ecay's message of "Thu, 24 Jan 2013 14:27:32 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) close 13542 thanks From unknown Thu Aug 21 14:53:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 28 Feb 2013 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