[O] bug#25487: 26.0.50; org-table-align doesn't work with different face sizes in row

2017-01-19 Thread Eli Zaretskii
> From: Ryan McCarl 
> Date: Thu, 19 Jan 2017 11:26:29 -0700
> 
>  
> (1) Define the faces org-table and org-link with a fixed-width font
> (Inconsolata in
> my case) so table alignment should normally work.
> (2) Define the scale of the org-link face to 0.9 and the scale of the
> org-table face to 1.0.
> (3) Embed a link among other text in the table row.
> 
> The result is that the rightmost column of the table is not vertically
> aligned in the row containing the link, and (org-table-align) adjusts
> the alignment without fixing it.

Could this be an Org bug?  Did you try to report it to the Org
developers?

Thanks.





Re: [O] Emacs hangs sometimes for no reason

2017-01-19 Thread Samuel Loury
Sebastian Christ  writes:

[...]

> So, aren't you restarting Emacs after pkill -SIGUSR2 emacs? 

pkill -SIGUSR2 emacs does not stop emacs. Emacs will start a debugging
session that you can stop to go back to a "normal" emacs. I found out
that it generally makes emacs responsive enough so that I can launch the
org reset cache function.

I found the USR2 signal trick in irreal¹.

¹  here: http://irreal.org/blog/?p=5218
-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


signature.asc
Description: PGP signature


Re: [O] How to pass table to SRC block as strings only?

2017-01-19 Thread Charles C. Berry

On Thu, 19 Jan 2017, Sébastien Brisard wrote:


Thanks Charles for this answer. Let me state the problem more clearly.
Number-like cells *are* converted to numbers (as best illustrated by
the example below (see the use of numberp), which might incur accuracy
loss (see below, the first row has a lot of significant digits).
I am not interested in the number representation of these cells, only
the string matters for my application. Due to this accuracy loss,
converting back the number to a string is not an option for me...

Any ideas? Thanks!


The usual resolution of table references will eventually use
`org-babel--string-to-number' to do what its name suggests.

You can write an elisp function to handle references as you wish and call 
them from :var arguments.


A hackish way to do this for your case is to quash the action of 
`org-babel--string-to-number':


#+BEGIN_SRC emacs-lisp
  (defun get-ref-strings-as-is (ref)
(cl-letf (((symbol-function 'org-babel--string-to-number)
   (lambda (x) x)))
  (org-babel-ref-resolve ref)))
#+END_SRC

#+header: :var table=(get-ref-strings-as-is "table20170119") 
#+BEGIN_SRC emacs-lisp :colnames yes :results pp

table
#+END_SRC

#+RESULTS:
: (("row1" "12345678901234567890")
:  ("row2" "a")
:  ("row3" "b")
:  ("row4" "c"))

You can look at `org-babel-ref-resolve' to get some ideas on how to do 
this more artfully.



Sébastien

= begin example =
#+NAME: table20170119
| col1 | col2 |
|--+--|
| row1 | 12345678901234567890 |
| row2 | a|
| row3 | b|
| row4 | c|



HTH,

Chuck

[O] bug#25132: 26.0.50; emacs hangs when loading org file with python source blocks

2017-01-19 Thread npostavs
Clément Pit--Claudel  writes:

> On 2017-01-19 19:52, npost...@users.sourceforge.net wrote:
>> because even after doing (make-variable-buffer-local 'var), (let
>> ((var 'foo))...) still makes a global binding.
>> `make-variable-buffer-local' only has effect for `setq', which I
>> think will hardly ever happen for `inhibit-modification-hooks'.
>
> On 2017-01-19 19:52, npost...@users.sourceforge.net wrote:
>> because even after doing (make-variable-buffer-local 'var), (let
>> ((var 'foo))...) still makes a global binding.
>> `make-variable-buffer-local' only has effect for `setq', which I
>> think will hardly ever happen for `inhibit-modification-hooks'.
>
> Hi Noam,
>
> Can you explain a bit more? I'm not sure what you meant.
>
> I tried the following to illustrate your point:
>
> (defvar aa 0)
>
> (with-temp-buffer
>   (setq-local aa 1)
>   (let ((b1 (current-buffer)))
> (with-temp-buffer
>   (let ((aa 2))
> (message "In b2: %S" aa)
> (with-current-buffer b1
>   (message "In b1: %S" aa))

My point was that the setq-local (or make-local-variable) is required
and that defvar-local (or make-variable-buffer-local) is not enough.

Compare:

(defvar-local bb 0)

(with-temp-buffer
  (let ((b1 (current-buffer)))
(with-temp-buffer
  (let ((bb 2))
(message "In b2: %S" bb)
(with-current-buffer b1
  (message "In b1: %S" bb))





Re: [O] How to pass table to SRC block as strings only?

2017-01-19 Thread Sébastien Brisard
Thanks Charles for this answer. Let me state the problem more clearly.
Number-like cells *are* converted to numbers (as best illustrated by
the example below (see the use of numberp), which might incur accuracy
loss (see below, the first row has a lot of significant digits).
I am not interested in the number representation of these cells, only
the string matters for my application. Due to this accuracy loss,
converting back the number to a string is not an option for me...

Any ideas? Thanks!
Sébastien

= begin example =
#+NAME: table20170119
| col1 | col2 |
|--+--|
| row1 | 12345678901234567890 |
| row2 | a|
| row3 | b|
| row4 | c|

#+BEGIN_SRC emacs-lisp :var table=table20170119 :colnames yes :results output
  (print (map 'list (lambda (row) (nth 1 row)) table))
#+END_SRC

#+RESULTS:
:
: (1.2345678901234567e+019 "a" "b" "c")

#+BEGIN_SRC emacs-lisp :var table=table20170119 :colnames yes :results value
  (map 'list (lambda (row) (numberp (nth 1 row))) table)
#+END_SRC

#+RESULTS:
| t | nil | nil | nil |

= end example =

2017-01-19 18:07 GMT+01:00 Charles C. Berry :
> On Thu, 19 Jan 2017, Sébastien Brisard wrote:
>
>> Hello all,
>> here is a MWE
>>
>> =BEGIN MWE=
>>
>> #+NAME: table20170119
>> | col1 | col2   |
>> |--+|
>> | row1 | 1234567890 |
>> | row2 | a  |
>> | row3 | b  |
>> | row4 | c  |
>>
>> #+BEGIN_SRC emacs-lisp :var table=table20170119 :colnames yes :results
>> output
>>  (print (map 'list (lambda (row) (nth 1 row)) table))
>> #+END_SRC
>>
>> #+RESULTS:
>> :
>> : (1234567890.0 "a" "b" "c")
>>
>> =END MWE=
>>
>> As you can see, col #1, row #1 is parsed as a float.
>
>
>
> Actually, it is not a float:
>
> #+BEGIN_SRC emacs-lisp :var table=table20170119 :colnames yes :results pp
> (number-to-string (nth 1 (car table)))
> #+END_SRC
>
> #+RESULTS:
> : "1234567890"
>
> Maybe this is what you want:
>
> #+BEGIN_SRC emacs-lisp :var table=table20170119 :colnames yes :results pp
> (map 'list (lambda (row) (format "%s" (nth 1 row))) table)
> #+END_SRC
>
> #+RESULTS:
> : ("1234567890" "a" "b" "c")
>
> HTH,
>
> Chuck




[O] bug#25132: 26.0.50; emacs hangs when loading org file with python source blocks

2017-01-19 Thread Clément Pit--Claudel
On 2017-01-19 19:52, npost...@users.sourceforge.net wrote:
> because even after doing (make-variable-buffer-local 'var), (let
> ((var 'foo))...) still makes a global binding.
> `make-variable-buffer-local' only has effect for `setq', which I
> think will hardly ever happen for `inhibit-modification-hooks'.

On 2017-01-19 19:52, npost...@users.sourceforge.net wrote:
> because even after doing (make-variable-buffer-local 'var), (let
> ((var 'foo))...) still makes a global binding.
> `make-variable-buffer-local' only has effect for `setq', which I
> think will hardly ever happen for `inhibit-modification-hooks'.

Hi Noam,

Can you explain a bit more? I'm not sure what you meant.

I tried the following to illustrate your point:

(defvar aa 0)

(with-temp-buffer
  (setq-local aa 1)
  (let ((b1 (current-buffer)))
(with-temp-buffer
  (let ((aa 2))
(message "In b2: %S" aa)
(with-current-buffer b1
  (message "In b1: %S" aa))

Clément.



signature.asc
Description: OpenPGP digital signature


[O] bug#25132: 26.0.50; emacs hangs when loading org file with python source blocks

2017-01-19 Thread npostavs
Dmitry Gutov  writes:

> On 08.01.2017 00:20, npost...@users.sourceforge.net wrote:
>> -(inhibit-modification-hooks t))
>> +(inhibit-modification-hooks
>> + (progn (make-local-variable 'inhibit-modification-hooks) t)))
>
> Are we not worried that inhibit-modificaiton-hooks will become
> buffer-local even after control flow leaves this let*?

My feeling is that inhibit-modification-hooks should usually be buffer
local anyway.

> If we are not, why not make inhibit-modification-hooks always
> buffer-local instead?

It would have to be in addition to, because even after doing
(make-variable-buffer-local 'var), (let ((var 'foo))...) still makes a
global binding.  `make-variable-buffer-local' only has effect for
`setq', which I think will hardly ever happen for
`inhibit-modification-hooks'.

Actually, I just grepped for inhibit-modification-hooks and the only
non-let I found is this:

(defun read-passwd (prompt &optional confirm default)
   ...
  (minibuffer-with-setup-hook
  (lambda ()
 ...
 (setq-local inhibit-modification-hooks nil) ;bug#15501.
 ...))
   ...)





Re: [O] Bug: "#+BEGIN_EXPORT html" not processed when generating HTML output [8.2.10 (release_8.2.10 @ /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/org/)]

2017-01-19 Thread Carlo Pinciroli
Hello,

Thanks for the speedy reply. Indeed, that was the issue.

Cheers,
Carlo

On Thu, Jan 19, 2017 at 6:56 AM, Nicolas Goaziou  wrote:
> Hello,
>
> Carlo Pinciroli  writes:
>
>> Remember to cover the basics, that is, what you expected to happen and
>> what in fact did happen.  You don't know how to make a good report?  See
>>
>>  http://orgmode.org/manual/Feedback.html#Feedback
>>
>> Your bug report will be posted to the Org-mode mailing list.
>> 
>>
>> I ran this test after launching "emacs -Q":
>>
>> #+OPTIONS: toc:nil title:nil
>> #+BEGIN_EXPORT html
>>
>> ciao
>> #+END_EXPORT html
>
> You could use M-x org-lint on the document: there is a syntax error. It
> should be
>
>   #+END_EXPORT
>
> Regards,
>
> --
> Nicolas Goaziou



-- 
Carlo Pinciroli, Ph.D.
http://carlo.pinciroli.net/



Re: [O] [parser] feature request: column and row numbers available for table-cell elements

2017-01-19 Thread Eric S Fraga
On Thursday, 19 Jan 2017 at 21:15, Nicolas Goaziou wrote:
> Hello,
>
> Eric S Fraga  writes:
>
>> Would it be possible to extend the table-cell element in the parser to
>> add :row and :column attributes that have the internal org values, as
>> used by the formulae?
>
> I don' think this is needed since this information is readily available
> during the export process. For example

Ah, okay.  Sounds good.  Counting each time seems inefficient at first
glance but I guess it's not a real issue, especially in my case where
the tables are all quite small.  I'll give this a try tomorrow.

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-241-gc3d67b


signature.asc
Description: PGP signature


Re: [O] [parser] feature request: column and row numbers available for table-cell elements

2017-01-19 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> Would it be possible to extend the table-cell element in the parser to
> add :row and :column attributes that have the internal org values, as
> used by the formulae?

I don' think this is needed since this information is readily available
during the export process. For example

  (1+ (length (org-export-get-previous-element table-cell info 'all)))

returns the column number table-cell belongs to, whereas

  (1+ (cl-count-if
   (lambda (row) (eq (org-element-property :type row) 'standard))
   (org-export-get-previous-element (org-export-get-parent table-cell) 
'all)))

returns the row number.

Regards,

-- 
Nicolas Goaziou



[O] Selective Expand

2017-01-19 Thread Eyal Erez
Hi,

I was wondering if there is a way to selectively expand similar nodes
in an org-mode tree.  Here is a an simplified example of what I mean:
Let's say I have the following document:

* First
** One
- a
- b
- c
** Two
- d
- e
- f
** Three
- g
- h
- i
** Four
- j
- k
- l
* Second
** One
- a
- b
- c
** Two
- d
- e
- f
** Three
- g
- h
- i
** Four
- j
- k
- l
* Third
** One
- a
- b
- c
** Two
- d
- e
- f
** Three
- g
- h
- i
** Four
- j
- k
- l

With larger documents, I usually work with most of the nodes
collapsed:

* First...
* Second...
* Third...

In this state, I was wondering if there was a way to issue a command
that would, for example, expand all of the "** Two" nodes in all three
sub-trees as follows:

* First
** One...
** Two
- a
- b
- c
** Three...
** Four...
* Second
** One...
** Two
- a
- b
- c
** Three...
** Four...
* Third
** One...
** Two
- a
- b
- c
** Three...
** Four...


-- 
There are 10 types of people, those who know binary and those who don't.


[O] org-agenda-highlight-todo may erroneously pickup icon 'display property.

2017-01-19 Thread Keith David Bershatsky
Depending upon a user's `org-agenda-prefix-format` (e.g., "%i %-10:c% t%s"), 
`org-agenda-highlight-todo` may erroneously pickup an icon `'display` property 
and then include/duplicate that icon in a new space between the todo-keyword 
and the priority.  I chose tho fix this in my own setup with `org-plist-delete` 
to remove the `'display` pair of PROPERTY / VALUE from the plist of text 
properties that are copied to the new space " " that is concatenated between 
the todo-keyword and the priority.

Thanks,

Keith



[O] [PATCH] org-info: Fix html export of info link

2017-01-19 Thread Chunyang Xu
Hi,

I notice the html export (actually, the HTML URL anchor part) of info
link is incorrect in some cases, for example
in (info "(org) Built-in table editor"), the corresponding org link is

  [[info:org#Built-in%20table%20editor][info:org#Built-in table editor]]

org exports it to

  
https://www.gnu.org/software/emacs/manual/html_mono/org.html#Built-in-table-editor

but the correct one is

  
https://www.gnu.org/software/emacs/manual/html_mono/org.html#Built_002din-table-editor

I have submitted a patch to fix this.
>From 3084d1145968d32831270e8f00ca4aaf8c27c820 Mon Sep 17 00:00:00 2001
From: Chunyang Xu 
Date: Fri, 20 Jan 2017 01:08:26 +0800
Subject: [PATCH] org-info: Fix html export of info link

* org-info.el (org-info-map-node-url): New defun.
(org-info-export): Use the new function.
---
 lisp/org-info.el | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/lisp/org-info.el b/lisp/org-info.el
index cbe4289fc..821348b61 100644
--- a/lisp/org-info.el
+++ b/lisp/org-info.el
@@ -113,6 +113,24 @@ See `org-info-emacs-documents' and 
`org-info-other-documents' for details."
((cdr (assoc filename org-info-other-documents)))
(t (concat filename ".html"
 
+(defun org-info-map-anchor-url (node)
+  "Return URL associated to Info NODE."
+  ;; See (info "(texinfo) HTML Xref Node Name Expansion") for the
+  ;; expansion rule
+  (let* ((node (replace-regexp-in-string "[ \t\n\r]+" " " (org-trim node)))
+ (node (mapconcat (lambda (c)
+(if (string-match "[a-zA-Z0-9 ]" (string c))
+(string c)
+  (format "_%04x" c)))
+  (string-to-list node) ""))
+ (node (replace-regexp-in-string " " "-" node))
+ (url (if (string= node "")
+ ""
+   (if (string-match "[0-9]" (substring node 0 1))
+   (concat "g_t" node)
+ node
+url))
+
 (defun org-info-export (path desc format)
   "Export an info link.
 See `org-link-parameters' for details about PATH, DESC and FORMAT."
@@ -123,7 +141,7 @@ See `org-link-parameters' for details about PATH, DESC and 
FORMAT."
  (node (or (match-string 2 path) "Top")))
   (format "%s"
  (org-info-map-html-url filename)
- (replace-regexp-in-string " " "-" node)
+ (org-info-map-anchor-url node)
  (or desc path)
 
 (provide 'org-info)
-- 
2.11.0



Re: [O] run a function during capture

2017-01-19 Thread Nick Dokos
Alan Schmitt  writes:

> Hello,
>
> It is possible to run a function at the end of capture? I would like to
> call org-board-archive (that downloads a web page according to some
> properties) before finishing the capture?
>

There are three hooks that are run from org-capture-finalize:

- org-capture-prepare-finalize-hook
- org-capture-before-finalize-hook
- org-capture-after-finalize-hook

Check their documentation for when they are run and what the context is.
One of them should be good enough for what you want to do.
-- 
Nick




Re: [O] How to pass table to SRC block as strings only?

2017-01-19 Thread Charles C. Berry

On Thu, 19 Jan 2017, Sébastien Brisard wrote:


Hello all,
here is a MWE

=BEGIN MWE=

#+NAME: table20170119
| col1 | col2   |
|--+|
| row1 | 1234567890 |
| row2 | a  |
| row3 | b  |
| row4 | c  |

#+BEGIN_SRC emacs-lisp :var table=table20170119 :colnames yes :results output
 (print (map 'list (lambda (row) (nth 1 row)) table))
#+END_SRC

#+RESULTS:
:
: (1234567890.0 "a" "b" "c")

=END MWE=

As you can see, col #1, row #1 is parsed as a float.



Actually, it is not a float:

#+BEGIN_SRC emacs-lisp :var table=table20170119 :colnames yes :results pp
(number-to-string (nth 1 (car table)))
#+END_SRC

#+RESULTS:
: "1234567890"

Maybe this is what you want:

#+BEGIN_SRC emacs-lisp :var table=table20170119 :colnames yes :results pp
(map 'list (lambda (row) (format "%s" (nth 1 row))) table)
#+END_SRC

#+RESULTS:
: ("1234567890" "a" "b" "c")

HTH,

Chuck

[O] run a function during capture

2017-01-19 Thread Alan Schmitt
Hello,

It is possible to run a function at the end of capture? I would like to
call org-board-archive (that downloads a web page according to some
properties) before finishing the capture?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85


signature.asc
Description: PGP signature


[O] bug#25132: 26.0.50; emacs hangs when loading org file with python source blocks

2017-01-19 Thread Dmitry Gutov

On 08.01.2017 00:20, npost...@users.sourceforge.net wrote:

-(inhibit-modification-hooks t))
+(inhibit-modification-hooks
+ (progn (make-local-variable 'inhibit-modification-hooks) t)))


Are we not worried that inhibit-modificaiton-hooks will become 
buffer-local even after control flow leaves this let*?


If we are not, why not make inhibit-modification-hooks always 
buffer-local instead?






Re: [O] [PATCH] Support time units in est+

2017-01-19 Thread Nick Dokos
Malcolm Matalka  writes:

> Den 18 jan. 2017 22:19 skrev "Nick Dokos" :
>
> Malcolm Matalka  writes:
>
> > Hey, this is my first elisp programming so I'm quite certain this is a
> > big hack.  I just stole elements from elsewhere in the file.  I'm hoping
> > this is good enough to get accepted then perhaps someone with more taste
> > would be able to refactor it to be a bit better.
> >
> > Let me know if I need to change anything.
> >
>
> Yes, indeed: the first thing you should do is explain what you are
> trying to do.  E.g. what does "est+" mean? Once you have explained
> *what* you are trying to do, then somebody might be able to suggest
> *how* to do it better (if it is a worthwhile thing to do in the first 
> place).
>
> I'm not sure I understand your question.  est+ is an existing functionality 
> in columnview that is
> documented. I've brought it closer to the regular effort functionality by 
> supporting time units.
>

My apologies: I didn't know about it.

-- 
Nick




Re: [O] Allowing multiple date trees in a single file

2017-01-19 Thread Carsten Dominik
Hi Samuel,

Yes, this is of course also a very good solution that avoids the
overhead of a date tree.  One of the reasons why the dates
in Org are in ISO format was to make them sortable by
a simple text sort. Thanks for sharing.

Carsten

On Wed, Jan 18, 2017 at 9:19 PM, Samuel Wales  wrote:

> as an aside, just wanted to point out an alternative that i use
> exclusively instead of date trees.  of course it is not for everybody
> and i do not want to hijack the thread, so followups should have a
> different header.
>
>   * CONVERSATION [2017-01-15 Sun 14:09] talked with carsten
>
> i sort these in the outline.  they are always visible at the bottom of
> every subtree, in time order.  i can follow a thread by just reading
> the headers.  i can quickly do a binary search to find a date.  i can
> select a region without selecting parents.  they show up nicely in the
> agenda.  i sort them in the agenda also.  links to them work fine.
> the date information i need is there without changing visibility, yet
> unobtrusive.
>
> it might sound silly to bring it up, but everybody i have told to this
> has had an aha moment and been enthusiastic.
>
> just as an aside.
>
> --
> The Kafka Pandemic: http://thekafkapandemic.blogspot.com
>
> The disease DOES progress.  MANY people have died from it.  And
> ANYBODY can get it.
>
> Denmark: free Karina Hansen NOW.
>   UPDATE 2016-10: home, but not fully free
>


Re: [O] Day agenda no longer shows timed events for some days

2017-01-19 Thread Nicolas Goaziou
Hello,

Jarmo Hurri  writes:

> Just pulled the newest version of Org from repo, and something broke in
> my day agenda. For _some days_ I no longer see any of my daily meetings
> and/or events. The timeline in which these events are located is missing
> completely from the agenda.
>
> Currently, for example, I can not see these timed events for today or
> yesterday, but I can see them for tomorrow.
>
> Has this been reported already, or do I need to start debugging to find
> out what are the specific conditions in which this happens?

I'm not aware of any similar bug report. An ECM would help, too.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: "#+BEGIN_EXPORT html" not processed when generating HTML output [8.2.10 (release_8.2.10 @ /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/org/)]

2017-01-19 Thread Nicolas Goaziou
Hello,

Carlo Pinciroli  writes:

> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.  You don't know how to make a good report?  See
>
>  http://orgmode.org/manual/Feedback.html#Feedback
>
> Your bug report will be posted to the Org-mode mailing list.
> 
>
> I ran this test after launching "emacs -Q":
>
> #+OPTIONS: toc:nil title:nil
> #+BEGIN_EXPORT html
>
> ciao
> #+END_EXPORT html

You could use M-x org-lint on the document: there is a syntax error. It
should be

  #+END_EXPORT

Regards,

-- 
Nicolas Goaziou



[O] Day agenda no longer shows timed events for some days

2017-01-19 Thread Jarmo Hurri

Greetings.

Just pulled the newest version of Org from repo, and something broke in
my day agenda. For _some days_ I no longer see any of my daily meetings
and/or events. The timeline in which these events are located is missing
completely from the agenda.

Currently, for example, I can not see these timed events for today or
yesterday, but I can see them for tomorrow.

Has this been reported already, or do I need to start debugging to find
out what are the specific conditions in which this happens?

Jarmo




Re: [O] Emacs hangs sometimes for no reason

2017-01-19 Thread Sebastian Christ
> "SL" == Samuel Loury  writes:

SL> For what it's worth, when this happens, I generally pkill
SL> -SIGUSR2 emacs. emacs reacts to the USR2 signal by stopping
SL> everything and start a lisp debugging session. From there, I
SL> reset all the org caches with this command:

SL> (defun konix/org-element-cache-reset-all ()
SL>   (interactive)
SL>   (mapc
SL> (lambda (file)
SL>   (save-window-excursion
SL> (save-excursion
SL>   (find-file file)
SL>   (org-element-cache-reset
SL> (org-agenda-files)))

Thanks for this snippet. I know it's a little bit early but setting
`org-element-use-cache' seems to do the trick for me.

SL> Finally, I quit the debugging session and reset the debug on
SL> quit with (toggle-debug-on-quit) and everything comes back to
SL> normal.

So, aren't you restarting Emacs after pkill -SIGUSR2 emacs? 

Regards,
Sebastian 

-- 
Sebastian (Rudolfo) Christ
http://rudolfochrist.github.io
GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061
 CE71 6407 D6F8 2AC5 55DD