emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Time called when org-element--cache-sync-keys is nil [8.3.3 (8.3.3-elpa @ /home/mah/.emacs.d/elpa/org-20160108/)]
@ 2016-01-12 19:26 Mark A. Hershberger
  2016-01-31 23:21 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Mark A. Hershberger @ 2016-01-12 19:26 UTC (permalink / raw)
  To: emacs-orgmode


When I open begin to write an email using mu4e, I get an error
complaining that clrhash wants a hash-table and got nil.

Patch that fixes this:

diff --git a/lisp/org-element.el b/lisp/org-element.el
index f407578..0941468 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5055,7 +5055,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)



Partial 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(#<buffer *draft*>)


Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2016-01-10 on flynn, modified by Debian
Package: Org-mode version 8.3.3 (8.3.3-elpa @ /home/mah/.emacs.d/elpa/org-20160108/)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Bug: Time called when org-element--cache-sync-keys is nil [8.3.3 (8.3.3-elpa @ /home/mah/.emacs.d/elpa/org-20160108/)]
  2016-01-12 19:26 Bug: Time called when org-element--cache-sync-keys is nil [8.3.3 (8.3.3-elpa @ /home/mah/.emacs.d/elpa/org-20160108/)] Mark A. Hershberger
@ 2016-01-31 23:21 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-01-31 23:21 UTC (permalink / raw)
  To: Mark A. Hershberger; +Cc: emacs-orgmode

Hello,

"Mark A. Hershberger" <mah@nichework.com> writes:

> When I open begin to write an email using mu4e, I get an error
> complaining that clrhash wants a hash-table and got nil.
>
> Patch that fixes this:
>
> diff --git a/lisp/org-element.el b/lisp/org-element.el
> index f407578..0941468 100644
> --- a/lisp/org-element.el
> +++ b/lisp/org-element.el
> @@ -5055,7 +5055,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)))))))

Actually, I preferred disabling cache for buffers using orgstruct-mode
(and not in Org mode).

Anyway, this is fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-31 23:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12 19:26 Bug: Time called when org-element--cache-sync-keys is nil [8.3.3 (8.3.3-elpa @ /home/mah/.emacs.d/elpa/org-20160108/)] Mark A. Hershberger
2016-01-31 23:21 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).