[O] Org export buffer opens at buffer's end

2017-03-19 Thread David Mann
When I do C-c C-e to start an org export, the export buffer opens at its
bottom, with the top cut off in the window.  In past versions the buffer
opened at the top.

I am using GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.3.0, NS
appkit-1404.34 Version 10.11.3 (Build 15D21)) of 2016-03-13
and Org mode version 9.0.5 (release_9.0.5-361-g7b4269 @
/Users/mannd/git/org-mode/lisp/).

Thanks,
David Mann




Re: [O] Fontification error

2017-03-19 Thread Aaron Jensen
On Sun, Mar 19, 2017 at 3:58 PM, Nicolas Goaziou  wrote:
> Hello,
>
> Applied. Thank you.
>
> I added TINYCHANGE at the end of the commit message since I don't know
> whether you signed FSF papers or not.

Thank you! I have not yet.

Aaron



Re: [O] Fontification error

2017-03-19 Thread Nicolas Goaziou
Hello,

Aaron Jensen  writes:
> From cdf2c445e46d5691ee82adb1a6ca0bb0ae6bbd1b Mon Sep 17 00:00:00 2001
> From: Aaron Jensen 
> Date: Sun, 19 Mar 2017 12:49:18 -0700
> Subject: [PATCH] Reduce scope of inhibit-modification-hooks
>
> This fixes a fontification error that some users were having.

Applied. Thank you.

I added TINYCHANGE at the end of the commit message since I don't know
whether you signed FSF papers or not.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Error when trying to set a countdown timer [8.2.10 (release_8.2.10 @ /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/org/)]

2017-03-19 Thread Nicolas Goaziou
Hello,

Parham Doustdar  writes:

> Emacs  : GNU Emacs 25.1.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 
> Version 10.11.6 (Build 15G1108))
>  of 2016-11-25
> Package: Org-mode version 8.2.10 (release_8.2.10 @
> /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/org/)

This is an old release. Could you update to latest release? I cannot
reproduce the issue, AFAICT.

Regards,

-- 
Nicolas Goaziou



[O] Bug: Error when trying to set a countdown timer [8.2.10 (release_8.2.10 @ /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/org/)]

2017-03-19 Thread Parham Doustdar


backtrace
Description: Binary data
Hi,
I tried setting a countdown timer in an Org buffer today for my first
time ever, but it failed with an error saying that Emacs expected a
string, but got nil.
Here is what I do:
1. Press C-x test RET to create a new buffer named 'test'.
2. Press M-x org-mode to run org-mode.
3. Press C-c C-x ; to start a countdown timer, and in the prompt that
appears, enter 1
Here is where the error occurs.
My bug report information is below, and the backtrace is attached.
Thanks!

Emacs  : GNU Emacs 25.1.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 
10.11.6 (Build 15G1108))
 of 2016-11-25
Package: Org-mode version 8.2.10 (release_8.2.10 @ 
/usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 outline-minor-mode-hook '(emacspeak-outline-setup-keys)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-show-block-all) (quote append) (quote local))
  )
 (lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-babel-show-result-all) (quote append)
   (quote local))
  )
 emacspeak-org-mode-setup emacspeak-org-update-keys
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-load-hook '(#[0 "\301B\211\207"
   [org-store-link-functions org-eww-store-link] 2]
 )
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 outline-mode-hook '(emacspeak-outline-setup-keys)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



Re: [O] Fontification error

2017-03-19 Thread Noam Postavsky
On Sun, Mar 19, 2017 at 1:05 PM, Kyle Meyer  wrote:
>>
>> * lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind
>> `inhibit-modification-hooks' to nil, since this function can be called
>> from jit-lock-function which binds that variable to t (Bug#25132).
>>
>> Call modification hooks in org-src fontify buffers
>> ae8264c5cccf19d5b25a340a605bf2f07de1577e
>> Noam Postavsky
>> Sun Jan 29 11:01:32 2017 -0500
>>
>> At the moment, the minimum ECM I know of is to install spacemacs and
>> open an org file containing:
>
> [+cc Noam because I'm not sure if he follows this list.]

[Thanks, I don't follow this list indeed]

>
> I backported this commit to the Org repo, but I don't have any good
> guesses at what's leading to the error below.

I think the problem is that the let-binding's scope is too big, it's
applying to a text property change on the original org buffer, which
seems to cause problems with one of its modifcation hooks due to
narrowing. Actually, I initially posted the patch with a smaller
binding, but then enlarged it before I pushed it; I don't remember
why...

Could someone who can reproduce this problem try shrinking the scope
of (let ((inhibit-modification-hooks nil))...) to stop after the
(insert " ") as in [1], and see if that fixes it?

[1]: 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25132;att=3;filename=v1-0001-Call-modification-hooks-in-org-src-fontify-buffer.patch;msg=22



Re: [O] Bug: habit module [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.5/lisp/org/)]

2017-03-19 Thread Daniel Fortes
Maybe this is language related? My weekdays appear in portuguese, when I
remove the weekday it works

Em seg, 13 de mar de 2017 às 18:31, Daniel Fortes 
escreveu:

> 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've tried everything, but the consistency graph of habit tasks won't
> show up.
>
> Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
>  of 2016-04-17 on lgw01-04, modified by Debian
> Package: Org-mode version 8.2.10 (release_8.2.10 @
> /usr/share/emacs/24.5/lisp/org/)
>
> current state:
> ==
> (setq
>  org-tab-first-hook '(org-hide-block-toggle-maybe
>  org-src-native-tab-command-maybe
>  org-babel-hide-result-toggle-maybe
>  org-babel-header-arg-expand)
>  org-speed-command-hook '(org-speed-command-default-hook
>  org-babel-speed-command-hook)
>  org-occur-hook '(org-first-headline-recenter)
>  org-metaup-hook '(org-babel-load-in-session-maybe)
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-after-todo-state-change-hook '(org-clock-out-if-current)
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer
> org-src-mode-configure-edit-buffer)
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-mode-hook '(#[nil "\300\301\302\303\304$\207"
>   [org-add-hook change-major-mode-hook org-show-block-all
>append local]
>   5]
> #[nil "\300\301\302\303\304$\207"
>   [org-add-hook change-major-mode-hook
>org-babel-show-result-all append local]
>   5]
> org-babel-result-hide-spec org-babel-hide-all-hashes)
>  org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
>  org-babel-execute-safely-maybe)
>  org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
>  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
>  org-optimize-window-after-visibility-change)
>  org-modules '(org-bbdb org-bibtex org-docview org-gnus org-habit org-info
>   org-irc org-mhe org-rmail org-w3m)
>  org-confirm-elisp-link-function 'yes-or-no-p
>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>  org-agenda-files '("~/org/test.org")
>  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>  )
>
>


[O] Bug: habit module [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.5/lisp/org/)]

2017-03-19 Thread Daniel Fortes
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've tried everything, but the consistency graph of habit tasks won't
show up.

Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-17 on lgw01-04, modified by Debian
Package: Org-mode version 8.2.10 (release_8.2.10 @
/usr/share/emacs/24.5/lisp/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe
 org-src-native-tab-command-maybe
 org-babel-hide-result-toggle-maybe
 org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
 org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
  [org-add-hook change-major-mode-hook org-show-block-all
   append local]
  5]
#[nil "\300\301\302\303\304$\207"
  [org-add-hook change-major-mode-hook
   org-babel-show-result-all append local]
  5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
 org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
 org-cycle-hide-inline-tasks org-cycle-show-empty-lines
 org-optimize-window-after-visibility-change)
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-habit org-info
  org-irc org-mhe org-rmail org-w3m)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-files '("~/org/test.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )


[O] Schedule next READY item under heading

2017-03-19 Thread Alex Branham
Hello -

I asked this on stackexchange and didn't get an answer so I figure that I would 
try here, apologies for cross-posting.

I have a situation where I have a lot of similar tasks under a header like so:

* Header 
** READY Task 1
** NREADY Task 2
** READY Task 3
** READY Task 4
** NREADY Task 5

and so on. What I would like is to have the next READY task (the highest READY 
task under Header) appear in my agenda every other day or so. Is that possible?

You can imagine how this would be helpful for (e.g.) keeping track of the state 
of blog posts and when to publish the next one.

Thanks in advance!
Alex



[O] Bug: Errors when saving from babel block [9.0.5 (9.0.5-elpa @ ~/.emacs.d/elpa/org-20170210/)]

2017-03-19 Thread Alex Branham
In the latest org release (9.0.5), I get errors when trying to save a buffer 
while editing inside a babel source block. I can reproduce this using Emacs 
25.1 and 25.2rc2.

Using:

emacs -Q -l ~/org-debug.el

where org-debug.el just consists of (package-initialize) since I've previously 
installed org 9.0.5 using ELPA:

Open an org file,

Try to edit an org file:

#+BEGIN_SRC emacs-lisp
(+ 1 2)
#+END_SRC

Navigate inside the source block, press C-c '

Then try to save: C-x C-s

I get a fontification error at that point and the file does not save. If I use 
my whole config, this apparently snowballs into larger errors which sometimes 
cause Emacs to crash. 

Emacs  : GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.9)
 of 2017-03-09
Package: Org mode version 9.0.5 (9.0.5-elpa @ ~/.emacs.d/elpa/org-20170210/)



[O] [PATCH] Reduce scope of inhibit-modification-hooks

2017-03-19 Thread Aaron Jensen
This fixes the fontification error discussed here:

http://lists.gnu.org/archive/html/emacs-orgmode/2017-03/msg00423.html

and here:

http://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00280.html
---
 lisp/org-src.el | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index dfc422b..b0f952f 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -525,19 +525,19 @@ as `org-src-fontify-natively' is non-nil."
  (let ((inhibit-modification-hooks nil))
(erase-buffer)
;; Add string and a final space to ensure property change.
-   (insert string " ")
-   (unless (eq major-mode lang-mode) (funcall lang-mode))
-   (org-font-lock-ensure)
-   (let ((pos (point-min)) next)
- (while (setq next (next-property-change pos))
-   ;; Handle additional properties from font-lock, so as to
-   ;; preserve, e.g., composition.
-   (dolist (prop (cons 'face font-lock-extra-managed-props))
- (let ((new-prop (get-text-property pos prop)))
-   (put-text-property
-(+ start (1- pos)) (1- (+ start next)) prop new-prop
-org-buffer)))
-   (setq pos next)
+   (insert string " "))
+ (unless (eq major-mode lang-mode) (funcall lang-mode))
+ (org-font-lock-ensure)
+ (let ((pos (point-min)) next)
+   (while (setq next (next-property-change pos))
+ ;; Handle additional properties from font-lock, so as to
+ ;; preserve, e.g., composition.
+ (dolist (prop (cons 'face font-lock-extra-managed-props))
+   (let ((new-prop (get-text-property pos prop)))
+ (put-text-property
+  (+ start (1- pos)) (1- (+ start next)) prop new-prop
+  org-buffer)))
+ (setq pos next
;; Add Org faces.
(let ((src-face (nth 1 (assoc-string lang org-src-block-faces t
   (when (or (facep src-face) (listp src-face))
--
2.10.0



Re: [O] Fontification error

2017-03-19 Thread Aaron Jensen
That appeared to fix it for me! Thanks.

>From cdf2c445e46d5691ee82adb1a6ca0bb0ae6bbd1b Mon Sep 17 00:00:00 2001
From: Aaron Jensen 
Date: Sun, 19 Mar 2017 12:49:18 -0700
Subject: [PATCH] Reduce scope of inhibit-modification-hooks

This fixes a fontification error that some users were having.
---
 lisp/org-src.el | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index dfc422b..b0f952f 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -525,19 +525,19 @@ as `org-src-fontify-natively' is non-nil."
  (let ((inhibit-modification-hooks nil))
(erase-buffer)
;; Add string and a final space to ensure property change.
-   (insert string " ")
-   (unless (eq major-mode lang-mode) (funcall lang-mode))
-   (org-font-lock-ensure)
-   (let ((pos (point-min)) next)
- (while (setq next (next-property-change pos))
-   ;; Handle additional properties from font-lock, so as to
-   ;; preserve, e.g., composition.
-   (dolist (prop (cons 'face font-lock-extra-managed-props))
- (let ((new-prop (get-text-property pos prop)))
-   (put-text-property
-(+ start (1- pos)) (1- (+ start next)) prop new-prop
-org-buffer)))
-   (setq pos next)
+   (insert string " "))
+ (unless (eq major-mode lang-mode) (funcall lang-mode))
+ (org-font-lock-ensure)
+ (let ((pos (point-min)) next)
+   (while (setq next (next-property-change pos))
+ ;; Handle additional properties from font-lock, so as to
+ ;; preserve, e.g., composition.
+ (dolist (prop (cons 'face font-lock-extra-managed-props))
+   (let ((new-prop (get-text-property pos prop)))
+ (put-text-property
+  (+ start (1- pos)) (1- (+ start next)) prop new-prop
+  org-buffer)))
+ (setq pos next
;; Add Org faces.
(let ((src-face (nth 1 (assoc-string lang org-src-block-faces t
   (when (or (facep src-face) (listp src-face))
--
2.10.0

On Sun, Mar 19, 2017 at 11:04 AM, Noam Postavsky  wrote:
> On Sun, Mar 19, 2017 at 1:05 PM, Kyle Meyer  wrote:
>>>
>>> * lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind
>>> `inhibit-modification-hooks' to nil, since this function can be called
>>> from jit-lock-function which binds that variable to t (Bug#25132).
>>>
>>> Call modification hooks in org-src fontify buffers
>>> ae8264c5cccf19d5b25a340a605bf2f07de1577e
>>> Noam Postavsky
>>> Sun Jan 29 11:01:32 2017 -0500
>>>
>>> At the moment, the minimum ECM I know of is to install spacemacs and
>>> open an org file containing:
>>
>> [+cc Noam because I'm not sure if he follows this list.]
>
> [Thanks, I don't follow this list indeed]
>
>>
>> I backported this commit to the Org repo, but I don't have any good
>> guesses at what's leading to the error below.
>
> I think the problem is that the let-binding's scope is too big, it's
> applying to a text property change on the original org buffer, which
> seems to cause problems with one of its modifcation hooks due to
> narrowing. Actually, I initially posted the patch with a smaller
> binding, but then enlarged it before I pushed it; I don't remember
> why...
>
> Could someone who can reproduce this problem try shrinking the scope
> of (let ((inhibit-modification-hooks nil))...) to stop after the
> (insert " ") as in [1], and see if that fixes it?
>
> [1]: 
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25132;att=3;filename=v1-0001-Call-modification-hooks-in-org-src-fontify-buffer.patch;msg=22



Re: [O] Fontification error

2017-03-19 Thread Sébastien Le Maguer
Hello,

I actually have this problem without using spacemacs. However, I didn't have 
time to debug that yet (that's a shame :().

Kind regards,
Sébastien

On Sun, Mar 19 2017 (18:05), Kyle Meyer  wrote:

> Aaron Jensen  writes:
>
>> This is in reply to the Fontification error Thomas S. Dye reported on
>> Feb 13 2017:
>>
>> http://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00280.html
>>
>> I was able to bisect this error to the following commit:
>>
>> f2a5104e45b6f44a08960ae49ba20c124a8fa9d8 is the first bad commit
>> commit f2a5104e45b6f44a08960ae49ba20c124a8fa9d8
>> Author: Noam Postavsky 
>> Date:   Sat Jan 7 16:05:19 2017 -0500
>>
>> Backport commit ae8264c5cc from Emacs
>>
>> * lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind
>> `inhibit-modification-hooks' to nil, since this function can be called
>> from jit-lock-function which binds that variable to t (Bug#25132).
>>
>> Call modification hooks in org-src fontify buffers
>> ae8264c5cccf19d5b25a340a605bf2f07de1577e
>> Noam Postavsky
>> Sun Jan 29 11:01:32 2017 -0500
>>
>> At the moment, the minimum ECM I know of is to install spacemacs and
>> open an org file containing:
>
> [+cc Noam because I'm not sure if he follows this list.]
>
> I backported this commit to the Org repo, but I don't have any good
> guesses at what's leading to the error below.  It's unfortunate that
> only spacemacs users seem to be able to reproduce this.  Are there
> spacemacs users on the list who aren't running into this?
>
>> #+begin_src emacs-lisp
>> ()
>> #+end_src
>>
>> This is the stack trace if I remove the condition-case that leads to
>> the fontification error warning:
>>
>> Debugger entered--Lisp error: (args-out-of-range 6 23)
>>   put-text-property(23 6 fontified nil)
>>   jit-lock-after-change(23 24 1)
>>   put-text-property(23 24 face nil #)
>>   (let ((new-prop (get-text-property pos prop))) (put-text-property (+
>> start (1- pos)) (1- (+ start next)) prop new-prop org-buffer))
>>   (let ((prop (car --dolist-tail--))) (let ((new-prop
>> (get-text-property pos prop))) (put-text-property (+ start (1- pos))
>> (1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail--
>> (cdr --dolist-tail--)))
>>   (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (let
>> ((new-prop (get-text-property pos prop))) (put-text-property (+ start
>> (1- pos)) (1- (+ start next)) prop new-prop org-buffer)) (setq
>> --dolist-tail-- (cdr --dolist-tail--
>>   (let ((--dolist-tail-- (cons (quote face)
>> font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
>> (car --dolist-tail--))) (let ((new-prop (get-text-property pos prop)))
>> (put-text-property (+ start (1- pos)) (1- (+ start next)) prop
>> new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--)
>>   (while (setq next (next-property-change pos)) (let ((--dolist-tail--
>> (cons (quote face) font-lock-extra-managed-props))) (while
>> --dolist-tail-- (let ((prop (car --dolist-tail--))) (let ((new-prop
>> (get-text-property pos prop))) (put-text-property (+ start (1- pos))
>> (1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail--
>> (cdr --dolist-tail--) (setq pos next))
>>   (let ((pos (point-min)) next) (while (setq next
>> (next-property-change pos)) (let ((--dolist-tail-- (cons (quote face)
>> font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
>> (car --dolist-tail--))) (let ((new-prop ...)) (put-text-property (+
>> start ...) (1- ...) prop new-prop org-buffer)) (setq --dolist-tail--
>> (cdr --dolist-tail--) (setq pos next)))
>>   (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert
>> string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode))
>> (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
>> (next-property-change pos)) (let ((--dolist-tail-- (cons (quote face)
>> font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
>> ...)) (let (...) (put-text-property ... ... prop new-prop org-buffer))
>> (setq --dolist-tail-- (cdr --dolist-tail--) (setq pos next
>>   (save-current-buffer (set-buffer (get-buffer-create (format "
>> *org-src-fontification:%s*" lang-mode))) (let
>> ((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ")
>> (if (eq major-mode lang-mode) nil (funcall lang-mode))
>> (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
>> (next-property-change pos)) (let ((--dolist-tail-- (cons ...
>> font-lock-extra-managed-props))) (while --dolist-tail-- (let (...)
>> (let ... ...) (setq --dolist-tail-- ... (setq pos next)
>>   (let ((string (buffer-substring-no-properties start end)) (modified
>> (buffer-modified-p)) (org-buffer (current-buffer)))
>> (remove-text-properties start end (quote (face nil)))
>> (save-current-buffer (set-buffer (get-buffer-create (format "
>> *org-src-fontification:%s*" lang-mode))) (let
>> 

Re: [O] Fontification error

2017-03-19 Thread Kyle Meyer
Aaron Jensen  writes:

> This is in reply to the Fontification error Thomas S. Dye reported on
> Feb 13 2017:
>
> http://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00280.html
>
> I was able to bisect this error to the following commit:
>
> f2a5104e45b6f44a08960ae49ba20c124a8fa9d8 is the first bad commit
> commit f2a5104e45b6f44a08960ae49ba20c124a8fa9d8
> Author: Noam Postavsky 
> Date:   Sat Jan 7 16:05:19 2017 -0500
>
> Backport commit ae8264c5cc from Emacs
>
> * lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind
> `inhibit-modification-hooks' to nil, since this function can be called
> from jit-lock-function which binds that variable to t (Bug#25132).
>
> Call modification hooks in org-src fontify buffers
> ae8264c5cccf19d5b25a340a605bf2f07de1577e
> Noam Postavsky
> Sun Jan 29 11:01:32 2017 -0500
>
> At the moment, the minimum ECM I know of is to install spacemacs and
> open an org file containing:

[+cc Noam because I'm not sure if he follows this list.]

I backported this commit to the Org repo, but I don't have any good
guesses at what's leading to the error below.  It's unfortunate that
only spacemacs users seem to be able to reproduce this.  Are there
spacemacs users on the list who aren't running into this?

> #+begin_src emacs-lisp
> ()
> #+end_src
>
> This is the stack trace if I remove the condition-case that leads to
> the fontification error warning:
>
> Debugger entered--Lisp error: (args-out-of-range 6 23)
>   put-text-property(23 6 fontified nil)
>   jit-lock-after-change(23 24 1)
>   put-text-property(23 24 face nil #)
>   (let ((new-prop (get-text-property pos prop))) (put-text-property (+
> start (1- pos)) (1- (+ start next)) prop new-prop org-buffer))
>   (let ((prop (car --dolist-tail--))) (let ((new-prop
> (get-text-property pos prop))) (put-text-property (+ start (1- pos))
> (1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail--
> (cdr --dolist-tail--)))
>   (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (let
> ((new-prop (get-text-property pos prop))) (put-text-property (+ start
> (1- pos)) (1- (+ start next)) prop new-prop org-buffer)) (setq
> --dolist-tail-- (cdr --dolist-tail--
>   (let ((--dolist-tail-- (cons (quote face)
> font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
> (car --dolist-tail--))) (let ((new-prop (get-text-property pos prop)))
> (put-text-property (+ start (1- pos)) (1- (+ start next)) prop
> new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--)
>   (while (setq next (next-property-change pos)) (let ((--dolist-tail--
> (cons (quote face) font-lock-extra-managed-props))) (while
> --dolist-tail-- (let ((prop (car --dolist-tail--))) (let ((new-prop
> (get-text-property pos prop))) (put-text-property (+ start (1- pos))
> (1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail--
> (cdr --dolist-tail--) (setq pos next))
>   (let ((pos (point-min)) next) (while (setq next
> (next-property-change pos)) (let ((--dolist-tail-- (cons (quote face)
> font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
> (car --dolist-tail--))) (let ((new-prop ...)) (put-text-property (+
> start ...) (1- ...) prop new-prop org-buffer)) (setq --dolist-tail--
> (cdr --dolist-tail--) (setq pos next)))
>   (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert
> string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode))
> (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
> (next-property-change pos)) (let ((--dolist-tail-- (cons (quote face)
> font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
> ...)) (let (...) (put-text-property ... ... prop new-prop org-buffer))
> (setq --dolist-tail-- (cdr --dolist-tail--) (setq pos next
>   (save-current-buffer (set-buffer (get-buffer-create (format "
> *org-src-fontification:%s*" lang-mode))) (let
> ((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ")
> (if (eq major-mode lang-mode) nil (funcall lang-mode))
> (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
> (next-property-change pos)) (let ((--dolist-tail-- (cons ...
> font-lock-extra-managed-props))) (while --dolist-tail-- (let (...)
> (let ... ...) (setq --dolist-tail-- ... (setq pos next)
>   (let ((string (buffer-substring-no-properties start end)) (modified
> (buffer-modified-p)) (org-buffer (current-buffer)))
> (remove-text-properties start end (quote (face nil)))
> (save-current-buffer (set-buffer (get-buffer-create (format "
> *org-src-fontification:%s*" lang-mode))) (let
> ((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ")
> (if (eq major-mode lang-mode) nil (funcall lang-mode))
> (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
> (next-property-change pos)) (let ((--dolist-tail-- ...)) (while
> --dolist-tail-- (let ... ... ...))) (setq pos next) (let
> 

Re: [O] Fontification error

2017-03-19 Thread Aaron Jensen
This is in reply to the Fontification error Thomas S. Dye reported on
Feb 13 2017:

http://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00280.html

I was able to bisect this error to the following commit:

f2a5104e45b6f44a08960ae49ba20c124a8fa9d8 is the first bad commit
commit f2a5104e45b6f44a08960ae49ba20c124a8fa9d8
Author: Noam Postavsky 
Date:   Sat Jan 7 16:05:19 2017 -0500

Backport commit ae8264c5cc from Emacs

* lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind
`inhibit-modification-hooks' to nil, since this function can be called
from jit-lock-function which binds that variable to t (Bug#25132).

Call modification hooks in org-src fontify buffers
ae8264c5cccf19d5b25a340a605bf2f07de1577e
Noam Postavsky
Sun Jan 29 11:01:32 2017 -0500

At the moment, the minimum ECM I know of is to install spacemacs and
open an org file containing:

#+begin_src emacs-lisp
()
#+end_src

This is the stack trace if I remove the condition-case that leads to
the fontification error warning:

Debugger entered--Lisp error: (args-out-of-range 6 23)
  put-text-property(23 6 fontified nil)
  jit-lock-after-change(23 24 1)
  put-text-property(23 24 face nil #)
  (let ((new-prop (get-text-property pos prop))) (put-text-property (+
start (1- pos)) (1- (+ start next)) prop new-prop org-buffer))
  (let ((prop (car --dolist-tail--))) (let ((new-prop
(get-text-property pos prop))) (put-text-property (+ start (1- pos))
(1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail--
(cdr --dolist-tail--)))
  (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (let
((new-prop (get-text-property pos prop))) (put-text-property (+ start
(1- pos)) (1- (+ start next)) prop new-prop org-buffer)) (setq
--dolist-tail-- (cdr --dolist-tail--
  (let ((--dolist-tail-- (cons (quote face)
font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
(car --dolist-tail--))) (let ((new-prop (get-text-property pos prop)))
(put-text-property (+ start (1- pos)) (1- (+ start next)) prop
new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--)
  (while (setq next (next-property-change pos)) (let ((--dolist-tail--
(cons (quote face) font-lock-extra-managed-props))) (while
--dolist-tail-- (let ((prop (car --dolist-tail--))) (let ((new-prop
(get-text-property pos prop))) (put-text-property (+ start (1- pos))
(1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail--
(cdr --dolist-tail--) (setq pos next))
  (let ((pos (point-min)) next) (while (setq next
(next-property-change pos)) (let ((--dolist-tail-- (cons (quote face)
font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
(car --dolist-tail--))) (let ((new-prop ...)) (put-text-property (+
start ...) (1- ...) prop new-prop org-buffer)) (setq --dolist-tail--
(cdr --dolist-tail--) (setq pos next)))
  (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert
string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode))
(org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
(next-property-change pos)) (let ((--dolist-tail-- (cons (quote face)
font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
...)) (let (...) (put-text-property ... ... prop new-prop org-buffer))
(setq --dolist-tail-- (cdr --dolist-tail--) (setq pos next
  (save-current-buffer (set-buffer (get-buffer-create (format "
*org-src-fontification:%s*" lang-mode))) (let
((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ")
(if (eq major-mode lang-mode) nil (funcall lang-mode))
(org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
(next-property-change pos)) (let ((--dolist-tail-- (cons ...
font-lock-extra-managed-props))) (while --dolist-tail-- (let (...)
(let ... ...) (setq --dolist-tail-- ... (setq pos next)
  (let ((string (buffer-substring-no-properties start end)) (modified
(buffer-modified-p)) (org-buffer (current-buffer)))
(remove-text-properties start end (quote (face nil)))
(save-current-buffer (set-buffer (get-buffer-create (format "
*org-src-fontification:%s*" lang-mode))) (let
((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ")
(if (eq major-mode lang-mode) nil (funcall lang-mode))
(org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
(next-property-change pos)) (let ((--dolist-tail-- ...)) (while
--dolist-tail-- (let ... ... ...))) (setq pos next) (let
((src-face (nth 1 (assoc-string lang org-src-block-faces t (if (or
(facep src-face) (listp src-face)) (progn
(font-lock-append-text-property start end (quote face) src-face)))
(font-lock-append-text-property start end (quote face) (quote
org-block))) (add-text-properties start end (quote
(font-lock-fontified t fontified t font-lock-multiline t)))
(set-buffer-modified-p modified))
  (progn (let ((string (buffer-substring-no-properties start end))
(modified (buffer-modified-p)) (org-buffer (current-buffer)))

Re: [O] The name attribute is obsolete. Consider putting an id attribute

2017-03-19 Thread Jean Louis
On Sun, Mar 19, 2017 at 02:25:15PM +0100, Nicolas Goaziou wrote:
> You may have a mixed installation.
> 
> > Even if I run with the -Q, I get same result, and that is without
> > personal config:
> > emacs -Q tmp/test.org --batch -f org-mode -f org-md-export-to-markdown
> 
> This will load Org 8.2. You need a bare config to load latest Org.
> 
> > Any clues?
> 
> You could try to update Org.

I have now upgraded Org, to 9.5, latest version. When I do C-e, m-M or
m-m, I have the correct HTML output without name="" tag.

And after more searching, I found that this line is working well now:

emacs -l ~/.emacs.d/elpa/org-20170210/org-autoloads.el tmp/test.org --batch -f 
org-mode -f org-md-export-to-markdown

So it is solved for me, and I understood how to use latest
version. Thank you.


Jean Louis






Re: [O] The name attribute is obsolete. Consider putting an id attribute

2017-03-19 Thread Nicolas Goaziou
Hello,

Jean Louis  writes:

> I am using this Org version: Version: 20170105.1723, and I am using
> GNU Emacs from "GNU Emacs 26.0.50.1 (x86_64-unknown-linux-gnu, X
> toolkit, Xaw3d scroll bars) of 2016-12-07"

You may have a mixed installation.

> Even if I run with the -Q, I get same result, and that is without
> personal config:
> emacs -Q tmp/test.org --batch -f org-mode -f org-md-export-to-markdown

This will load Org 8.2. You need a bare config to load latest Org.

> Any clues?

You could try to update Org.

Regards,

-- 
Nicolas Goaziou



Re: [O] The name attribute is obsolete. Consider putting an id attribute

2017-03-19 Thread Jean Louis
On Sun, Mar 19, 2017 at 02:06:55PM +0100, Nicolas Goaziou wrote:
> Hello,
> 
> Jean Louis  writes:
> 
> > Here below is the org file, and if I process it with:
> > emacs tmp/test.org --batch -f org-mode -f org-md-export-to-markdown
> >
> > Then I get the file, where I can see the following line:
> > # What is GNU CLISP?
> 
> I cannot reproduce it. Are you using latest Org? Did you try without
> your personal config?
> 
> > And the option org-html-allow-name-attribute-in-anchors is off, and I
> > am not sure if it influences markdown export at all.
> 
> It does. Markdown back-end is built on top of HTML back-end (e.g., to
> translate tables).

I am using this Org version: Version: 20170105.1723, and I am using
GNU Emacs from "GNU Emacs 26.0.50.1 (x86_64-unknown-linux-gnu, X
toolkit, Xaw3d scroll bars) of 2016-12-07"

Option org-html-allow-name-attribute-in-anchors is nil.

Even if I run with the -Q, I get same result, and that is without
personal config:
emacs -Q tmp/test.org --batch -f org-mode -f org-md-export-to-markdown

where I can see in test.md, the following line:

# What is GNU CLISP?


Any clues?

Jean




Re: [O] The name attribute is obsolete. Consider putting an id attribute

2017-03-19 Thread Nicolas Goaziou
Hello,

Jean Louis  writes:

> Here below is the org file, and if I process it with:
> emacs tmp/test.org --batch -f org-mode -f org-md-export-to-markdown
>
> Then I get the file, where I can see the following line:
> # What is GNU CLISP?

I cannot reproduce it. Are you using latest Org? Did you try without
your personal config?

> And the option org-html-allow-name-attribute-in-anchors is off, and I
> am not sure if it influences markdown export at all.

It does. Markdown back-end is built on top of HTML back-end (e.g., to
translate tables).

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] The name attribute is obsolete. Consider putting an id attribute

2017-03-19 Thread Jean Louis
On Sun, Mar 19, 2017 at 10:26:45AM +0100, Nicolas Goaziou wrote:
> Hello,
> 
> Jean Louis  writes:
> 
> > I am exporting Org to Markdown, and when used with:
> >
> > 
> >
> > What is GNU CLISP?
> 
> This is not Markdown syntax. You should check the part of your process
> responsible for turning Markdown into HTML.
> 
> For the record, by default, Org uses "id" instead of "name" when it
> generates HTML. See `org-html-allow-name-attribute-in-anchors'.

Here below is the org file, and if I process it with:
emacs tmp/test.org --batch -f org-mode -f org-md-export-to-markdown

Then I get the file, where I can see the following line:
# What is GNU CLISP?

And the option org-html-allow-name-attribute-in-anchors is off, and I
am not sure if it influences markdown export at all.

Do you know how to turn name= off in org-md-export-to-markdown ?

Jean

-- org file below 

#+TITLE: GNU CLISP is an ANSI Common Lisp Implementation

* What is GNU CLISP?

[[http://www.lisp.org][Common Lisp]] is a high-level, general-purpose, 
object-oriented,
dynamic, functional programming language. 

[[http://clisp.org][GNU CLISP]] is a Common Lisp implementation by 
[[http://www.haible.de/bruno/][Bruno Haible]], then of
Karlsruhe University, and [[http://www.faculty.iu-bremen.de/mstoll/][Michael 
Stoll]], then of Munich University,
both in Germany. It implements the language described in the 
[[http://www.lispworks.com/documentation/HyperSpec/Front/][ANSI
Common Lisp standard]] with many extensions.
* What is LISP?

LISP is a list-processing programming language, a flexible functional
programing language that manipulates symbols in the form of lists.




Re: [O] [PATCH] org-clock: Align formula column in clock tables

2017-03-19 Thread Nicolas Goaziou
Hello,

Yasushi SHOJI  writes:

> * lisp/org-clock.el (org-clocktable-write-default): Align formula
>   column in clock tables.
>
>   Here is an ECM:
>
>   * foo
>   ** sub
>  :LOGBOOK:
>  CLOCK: [2017-03-18 Sat 15:00]--[2017-03-18 Sat 15:15] =>  0:15
>  :END:
>   ** sub2
>  :LOGBOOK:
>  CLOCK: [2017-03-18 Sat 15:15]--[2017-03-18 Sat 15:30] =>  0:15
>  :END:
>   ** sub3
>   *** subsub1
>   :LOGBOOK:
>   CLOCK: [2017-03-18 Sat 13:00]--[2017-03-18 Sat 13:15] =>  0:15
>   :END:
>   *** subsub1
>   :LOGBOOK:
>   CLOCK: [2017-03-18 Sat 14:00]--[2017-03-18 Sat 14:15] =>  0:15
>   :END:
>   * bar
> :LOGBOOK:
> CLOCK: [2017-03-18 Sat 13:15]--[2017-03-18 Sat 13:30] =>  0:15
> :END:
>   * table
>
>   #+BEGIN: clocktable :maxlevel 3 :scope file :formula %
>   #+CAPTION: Clock summary at [2017-03-18 Sat 16:50]
>
>   | Headline  |   Time |  |  | % |
>   |---++--+--+---|
>   | *Total time*  | *1:15* |  |  | 100.0 |
>   |---++--+--+---|
>   | foo   |   1:00 |  |  |  80.0 |
>   | \_  sub   || 0:15 |  |  20.0 |
>   | \_  sub2  || 0:15 |  |  20.0 |
>   | \_  sub3  || 0:30 |  |  40.0 |
>   | \_subsub1 ||  | 0:15 |  20.0 |
>   | \_subsub1 ||  | 0:15 |  20.0 |
>   | bar   |   0:15 |  |  |  20.0 |
>   #+END:
> ---
>  lisp/org-clock.el | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
> index ffa1b3003..73afd87e6 100644
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -2622,6 +2622,7 @@ from the dynamic block definition."
>;; Empty fields for higher levels.
>(make-string (max 0 (1- (min time-columns level))) ?|)
>hlc (org-minutes-to-clocksum-string time) hlc "|" ; time
> +  (make-string (max 0 (- time-columns level)) ?|)
>(if (eq formula '%)
>(format "%.1f |" (* 100 (/ time (float total-time
>  "")

Applied, with a proper commit message. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] The name attribute is obsolete. Consider putting an id attribute

2017-03-19 Thread Nicolas Goaziou
Hello,

Jean Louis  writes:

> I am exporting Org to Markdown, and when used with:
>
> 
>
> What is GNU CLISP?

This is not Markdown syntax. You should check the part of your process
responsible for turning Markdown into HTML.

For the record, by default, Org uses "id" instead of "name" when it
generates HTML. See `org-html-allow-name-attribute-in-anchors'.

Regards,

-- 
Nicolas Goaziou