Re: [O] emphasis borders, double quotes, and export

2014-04-07 Thread Alan Schmitt
Nicolas Goaziou n.goaz...@gmail.com writes:

 Alan Schmitt alan.schm...@polytechnique.org writes:

 Thanks, I'm aware this works. I was trying not to manually set some
 default values so that, if default changes, I would benefit from the
 change. But from what I understand there is not really a choice here
 without changing org.

 I guess the next stop for this variable will be, hopefully, the dustbin.
 So, if I were you, I wouldn't worry much about future changes.

I won't then. And thank you for putting up with me ;-)

Alan



Re: [O] emphasis borders, double quotes, and export

2014-04-06 Thread Alan Schmitt
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 Thank you for the suggestion. How can I do that? Add an (org-reload)
 in my async init file? Is there a more efficient way than loading org,
 setting the variable, and immediately reloading org again?

 You can set the variable before loading Org for the first time.

I just tried it and I get the following error at start-up time:

 Warning (initialization): An error occurred while loading 
 `/Users/schmitta/.emacs.d/init.el':

 Symbol's value as variable is void: org-emphasis-regexp-components

My init.el is quite short (as most of my configuration is in an org
file).

--8---cut here---start-8---
;; Turn off mouse interface early in startup to avoid momentary display
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))

;; remember this directory
(setq emacsd-dir
  (file-name-directory (or load-file-name (buffer-file-name

;; set this up before loading org
(setcar (nthcdr 2 org-emphasis-regexp-components)  \t\n,)

;; org-setup
(add-to-list 'load-path (concat emacsd-dir org/emacs/site-lisp/org))
(require 'org)

;; Then tangle and load the file
(org-babel-load-file (expand-file-name myconfig.org emacsd-dir))
--8---cut here---end---8---

I assume the problem is that I want to change only one field of
`org-emphasis-regexp-components' but it's not possible to do so because
it's not defined before org is loaded.

I guess one way to proceed is to split up
`org-emphasis-regexp-components' into its four components, to be able to
change only the one I need. Would such a patch be accepted?

Thanks,

Alan



Re: [O] emphasis borders, double quotes, and export

2014-04-06 Thread Nicolas Goaziou
Hello,

Alan Schmitt alan.schm...@polytechnique.org writes:

 I assume the problem is that I want to change only one field of
 `org-emphasis-regexp-components' but it's not possible to do so because
 it's not defined before org is loaded.

 I guess one way to proceed is to split up
 `org-emphasis-regexp-components' into its four components, to be able to
 change only the one I need. Would such a patch be accepted?

This is not needed. You can redefine the four components with an initial
setq:

 (setq org-emphasis-regexp-components
   '( \t('\{ - \t.,:!?;'\)}\\ your-own-string . 1))


Regards,

-- 
Nicolas Goaziou



Re: [O] emphasis borders, double quotes, and export

2014-04-06 Thread Alan Schmitt
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 I assume the problem is that I want to change only one field of
 `org-emphasis-regexp-components' but it's not possible to do so because
 it's not defined before org is loaded.

 I guess one way to proceed is to split up
 `org-emphasis-regexp-components' into its four components, to be able to
 change only the one I need. Would such a patch be accepted?

 This is not needed. You can redefine the four components with an initial
 setq:

  (setq org-emphasis-regexp-components
'( \t('\{ - \t.,:!?;'\)}\\ your-own-string . 1))

Thanks, I'm aware this works. I was trying not to manually set some
default values so that, if default changes, I would benefit from the
change. But from what I understand there is not really a choice here
without changing org.

Thanks again,

Alan



Re: [O] emphasis borders, double quotes, and export

2014-04-06 Thread Nicolas Goaziou
Alan Schmitt alan.schm...@polytechnique.org writes:

 Thanks, I'm aware this works. I was trying not to manually set some
 default values so that, if default changes, I would benefit from the
 change. But from what I understand there is not really a choice here
 without changing org.

I guess the next stop for this variable will be, hopefully, the dustbin.
So, if I were you, I wouldn't worry much about future changes.


Regards,

-- 
Nicolas Goaziou



Re: [O] emphasis borders, double quotes, and export

2014-04-06 Thread Nick Dokos
Nicolas Goaziou n.goaz...@gmail.com writes:

 Alan Schmitt alan.schm...@polytechnique.org writes:

 Thanks, I'm aware this works. I was trying not to manually set some
 default values so that, if default changes, I would benefit from the
 change. But from what I understand there is not really a choice here
 without changing org.

 I guess the next stop for this variable will be, hopefully, the dustbin.

... and there will be great rejoicing throughout the land.

-- 
Nick




Re: [O] emphasis borders, double quotes, and export

2014-04-05 Thread Alan Schmitt
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 I'm afraid it broke again (it was fixed for a while, but I recently
 updated org and it's now broken).

 ECM:

 exp_init.el:
 (add-to-list 'load-path /Users/schmitta/projets/org-mode/lisp)

 (require 'org)
 (require 'ox-html)

 (setcar (nthcdr 2 org-emphasis-regexp-components)  \t\n,)
 (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))

 You need to reload Org after modifying `org-emphasis-regexp-components'.

Thank you for the suggestion. How can I do that? Add an (org-reload)
in my async init file? Is there a more efficient way than loading org,
setting the variable, and immediately reloading org again?

Alan



Re: [O] emphasis borders, double quotes, and export

2014-04-05 Thread Nicolas Goaziou
Hello,

Alan Schmitt alan.schm...@polytechnique.org writes:

 Thank you for the suggestion. How can I do that? Add an (org-reload)
 in my async init file? Is there a more efficient way than loading org,
 setting the variable, and immediately reloading org again?

You can set the variable before loading Org for the first time.


Regards,

-- 
Nicolas Goaziou



Re: [O] emphasis borders, double quotes, and export

2014-04-04 Thread Alan Schmitt
Hello Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 Looking a little deeper into this, it seems to be a regression. I had
 files with things like ~'a list~ that exported correctly a couple weeks
 ago that no longer export correctly.

 This should be fixed. Thank you.

I'm afraid it broke again (it was fixed for a while, but I recently
updated org and it's now broken).

ECM:

exp_init.el:
--8---cut here---start-8---
(add-to-list 'load-path /Users/schmitta/projets/org-mode/lisp)

(require 'org)
(require 'ox-html)

(setcar (nthcdr 2 org-emphasis-regexp-components)  \t\n,)
(custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))
--8---cut here---end---8---

bugquote.org:
--8---cut here---start-8---
This is a string: ~Nil~.

This as another string: ~'a list~.
--8---cut here---end---8---

Then run:
  emacs --batch -Q -l exp_init.el bugquote.org -f org-html-export-to-html

The resulting html shows the '~'.

Thanks,

Alan



Re: [O] emphasis borders, double quotes, and export

2014-04-04 Thread Nicolas Goaziou
Hello,

Alan Schmitt alan.schm...@polytechnique.org writes:

 I'm afraid it broke again (it was fixed for a while, but I recently
 updated org and it's now broken).

 ECM:

 exp_init.el:
 (add-to-list 'load-path /Users/schmitta/projets/org-mode/lisp)

 (require 'org)
 (require 'ox-html)

 (setcar (nthcdr 2 org-emphasis-regexp-components)  \t\n,)
 (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))

You need to reload Org after modifying `org-emphasis-regexp-components'.


Regards,

-- 
Nicolas Goaziou



Re: [O] emphasis borders, double quotes, and export

2014-04-04 Thread Nick Dokos
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 I'm afraid it broke again (it was fixed for a while, but I recently
 updated org and it's now broken).

 ECM:

 exp_init.el:
 (add-to-list 'load-path /Users/schmitta/projets/org-mode/lisp)

 (require 'org)
 (require 'ox-html)

 (setcar (nthcdr 2 org-emphasis-regexp-components)  \t\n,)
 (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))

 You need to reload Org after modifying `org-emphasis-regexp-components'.


The custom-set-variables trick should be enough IIUC. org-emphasis-alist
has a :set 'org-set-emph-re i in its property list, so org-set-emph-re
gets called to reinitialize everything.

Nick






Re: [O] emphasis borders, double quotes, and export

2014-04-04 Thread Nicolas Goaziou
Hello,

Nick Dokos ndo...@gmail.com writes:

 The custom-set-variables trick should be enough IIUC. org-emphasis-alist
 has a :set 'org-set-emph-re i in its property list, so org-set-emph-re
 gets called to reinitialize everything.

But `org-set-emph-re' is insufficient at the moment, because it only
updates `org-emph-re', not parts of the parser relying on
`org-emphasis-regexp-components' (namely `org-element--object-regexp').


Regards,

-- 
Nicolas Goaziou



Re: [O] emphasis borders, double quotes, and export

2014-04-04 Thread Nick Dokos
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Nick Dokos ndo...@gmail.com writes:

 The custom-set-variables trick should be enough IIUC. org-emphasis-alist
 has a :set 'org-set-emph-re i in its property list, so org-set-emph-re
 gets called to reinitialize everything.

 But `org-set-emph-re' is insufficient at the moment, because it only
 updates `org-emph-re', not parts of the parser relying on
 `org-emphasis-regexp-components' (namely `org-element--object-regexp').


Ah, thanks! Didn't know about that.

-- 
Nick




Re: [O] emphasis borders, double quotes, and export

2014-03-28 Thread Nicolas Goaziou
Hello,

Alan Schmitt alan.schm...@polytechnique.org writes:

 Looking a little deeper into this, it seems to be a regression. I had
 files with things like ~'a list~ that exported correctly a couple weeks
 ago that no longer export correctly.

This should be fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] emphasis borders, double quotes, and export

2014-03-28 Thread Alan Schmitt
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 Looking a little deeper into this, it seems to be a regression. I had
 files with things like ~'a list~ that exported correctly a couple weeks
 ago that no longer export correctly.

 This should be fixed. Thank you.

I confirm it is, thanks a lot.

Alan



Re: [O] emphasis borders, double quotes, and export

2014-03-28 Thread Alan Schmitt
Alan Schmitt alan.schm...@polytechnique.org writes:

 Hello,

 I have removed the single and double quote characters from my
 configuration of the emphasis borders:

 #+begin_src emacs-lisp
   (setcar (nthcdr 2 org-emphasis-regexp-components)  \t\n,)
   (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))
 #+end_src

 However, the latex export of the following file is not correct.

 This is a string: ~Nil~.

 The generated latex is as follows (I show just the fragment of
 interest):

 #+begin_src latex
 This is a string: \textasciitilde{}Nil\textasciitilde{}.
 #+end_src

 I see the same problem with html export.

 Note that syntax highlighting works correctly.

 Is this a bug?

Looking a little deeper into this, it seems to be a regression. I had
files with things like ~'a list~ that exported correctly a couple weeks
ago that no longer export correctly.

Alan