From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: check that org-element--cache-sync-keys is non-nil before clrhash [8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)] Date: Fri, 06 May 2016 17:21:56 +0200 Message-ID: <874mabciuj.fsf@saiph.selenimh> References: <87vb2wctgv.fsf@flynn.nichework.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayhaF-0001Zb-8L for emacs-orgmode@gnu.org; Fri, 06 May 2016 11:22:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayha3-0005I7-6q for emacs-orgmode@gnu.org; Fri, 06 May 2016 11:22:21 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:42088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayha2-0005E5-Ux for emacs-orgmode@gnu.org; Fri, 06 May 2016 11:22:15 -0400 In-Reply-To: <87vb2wctgv.fsf@flynn.nichework.com> (Mark A. Hershberger's message of "Mon, 02 May 2016 12:31:12 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "Mark A. Hershberger" Cc: emacs-orgmode@gnu.org Hello, "Mark A. Hershberger" writes: > Emacs : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) > of 2015-03-07 on trouble, modified by Debian > Package: Org-mode version 8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/) > > I'm using org-mode by default for most buffers and, when using > gnus-alias-use-identity, I get a backtrace because > org-element--cache-sync-keys is set to nil. > > Patch to fix this: > > diff --git a/lisp/org-element.el b/lisp/org-element.el > index d02b36c..760fce8 100644 > --- a/lisp/org-element.el > +++ b/lisp/org-element.el > @@ -5121,7 +5121,8 @@ updated before current modification are actually submitted." > ;; Otherwise, reset keys. > (if org-element--cache-sync-requests > (org-element--cache-set-timer buffer) > - (clrhash org-element--cache-sync-keys)))))) > + (when org-element--cache-sync-keys > + (clrhash org-element--cache-sync-keys))))))) > > (defun org-element--cache-process-request > (request next threshold time-limit future-change) > > > Edited backtrace: > > Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil) > clrhash(nil) > (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)) > (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* ((v next)) (aset v 3 (+ ... ...))) (aset next 2 (aref request 2)))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))) > (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* (...) (aset v 3 ...)) (aset next 2 (aref request 2)))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)))) > (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add ... org-element-cache-sync-duration)) future-change) (if next (progn (let* ... ...) (aset next 2 ...))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))))) > (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next ...) threshold (and ... ...) future-change) (if next (progn ... ...)) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests)))) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)))))) > org-element--cache-sync(#>) I'm surprised about this. Cache mechanism in available in Org mode buffers only. Not even when using `orgstruct-mode' (see 0b97a551704d50ae848c59d00b0d425554891e53). Could you investigate about how this happens in your case? Thank you. Regards, -- Nicolas Goaziou