Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated

2014-01-15 Thread Bastien
Nicolas Goaziou writes: > (defun org-mode-restart () > (interactive) > (let ((indent-status (org-bound-and-true-p org-indent-mode))) > (funcall major-mode) > (hack-local-variables) > (when (and indent-status (not (org-bound-and-true-p org-indent-mode))) > (org-

Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated

2014-01-15 Thread Nicolas Goaziou
Bastien writes: > Nicolas Goaziou writes: > >> Bastien writes: >> >>> Nicolas Goaziou writes: >>> (cond (org-startup-indented (require 'org-indent) (org-indent-mode 1)) ((org-bound-and-true-p org-indent-mode) (org-indent-mode -1))) >>> >>> This will not work, because (org-b

Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated

2014-01-15 Thread Bastien
Bastien writes: > Try to edebug-defun `org-mode' with the recipe I posted and you'll > see: yes, `org-startup-indented' and `org-indent-mode' are off, > but the org-indent properties have not been removed from the before, ^^

Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated

2014-01-15 Thread Bastien
Nicolas Goaziou writes: > Bastien writes: > >> Nicolas Goaziou writes: >> >>> (cond (org-startup-indented (require 'org-indent) (org-indent-mode 1)) >>> ((org-bound-and-true-p org-indent-mode) (org-indent-mode -1))) >> >> This will not work, because (org-bound-and-true-p org-indent-mo

Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated

2014-01-15 Thread Nicolas Goaziou
Bastien writes: > Nicolas Goaziou writes: > >> (cond (org-startup-indented (require 'org-indent) (org-indent-mode 1)) >> ((org-bound-and-true-p org-indent-mode) (org-indent-mode -1))) > > This will not work, because (org-bound-and-true-p org-indent-mode) > returns nil at the time `org-

Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated

2014-01-15 Thread Bastien
Hi Nicolas, Nicolas Goaziou writes: > There is no attached patch in your mail. Though, I don't understand why > you think your approach is wrong. In `org-mode' mode definition, we can > change: > > (when org-startup-indented (require 'org-indent) (org-indent-mode 1)) > > into: > > (cond (org

Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated

2014-01-15 Thread Nicolas Goaziou
Hello, Bastien writes: > With a file like > > , > | #+STARTUP: indent > | > | * Heading > | ** Subheading > ` > > org-mode will correctly use org-indent-mode when displaying it. > > Now edit the file to deactivate org-indent: > > , > | #+STARTUP: noindent > | > | * Heading > | ** S

[O] [BUG, PATCH] org-indent-mode not correctly deactivated

2014-01-14 Thread Bastien
With a file like , | #+STARTUP: indent | | * Heading | ** Subheading ` org-mode will correctly use org-indent-mode when displaying it. Now edit the file to deactivate org-indent: , | #+STARTUP: noindent | | * Heading | ** Subheading ` Go to #+STARTUP and hit C-c C-c : org-ind