Re: Improving Org Mode for VSCode - Thinking Aloud

2020-05-24 Thread Fabrice Popineau
Le dim. 24 mai 2020 à 15:07, Jack Kamm  a écrit :

> It would be very good indeed for org-babel if it could be ported to
> other editors. One of the biggest drawbacks of org-babel notebooks is
> that I can't collaborate with my colleagues on them, since I can't
> expect them to use Emacs.


+1000 on this one !

Fabrice


Re: Bug: wsl org-open-at-point [9.1.14 (9.1.14-9-g131531-elpa @ /home/boss5/.emacs.d/elpa/org-20181112/)]

2020-02-05 Thread Fabrice Popineau
Le mer. 5 févr. 2020 à 07:25, Bastien  a écrit :

> Hi Steve,
>
> thanks for reporting this issue.  Can you or Fabrice suggests what
> change should be done in Org, if any?  Also, perhaps another solution
> can be found by adapting `org-file-apps'?
>
>
I am not sure that it is an issue that should be solved by org-mode.
It is more a problem of setting up WSL such that it meets well
some expectations. Basically, you need an equivalent of xdg-open
which redirects requests to the w32 system.

The suggestion I made to solve the issue is working for me, but as you see,
it is a crude hack: the paths need to be adapted to each individual
setting.

If someone comes up with a cleaner, more general solution, solution,
it should be published somewhere as an example of how to setup things with
WSL.

Fabrice


Re: debugging why a latex preview fails

2020-01-29 Thread Fabrice Popineau
Le mer. 29 janv. 2020 à 12:02, Fraga, Eric  a écrit :

> On Wednesday, 29 Jan 2020 at 11:20, Fabrice Popineau wrote:
> > First of all: look into the *Org PDF LaTeX Output* buffer to see why
>

Yes sorry !

Some ltximg director is created in the same directory as the Org file you
are editing.
Unfortunately, it seems that the process is removing the .tex file even in
case of errors.
All you can find here is the resulting .png file.

Fabrice


Re: debugging why a latex preview fails

2020-01-29 Thread Fabrice Popineau
Le mer. 29 janv. 2020 à 10:51, Fraga, Eric  a écrit :

> On Wednesday, 29 Jan 2020 at 08:39, Alan Schmitt wrote:
> > I'm trying to add some diagrams in a note, and I want to use latex
> > preview for that. Unfortunately the result is not what I expect: I do
> > see an image, but there seem to be errors in the latex processing. How
> > can I see what latex is produced to find where the issue is?
>
> Your example works for me.  Maybe you need other packages as well
> (e.g. tikz itself)?
>
> I don't know the best way to debug, however


First of all: look into the *Org PDF LaTeX Output* buffer to see why the
compilation failed?
Then look into the .tex file header to see if something is missing.

Fabrice


Re: Bug: wsl org-open-at-point [9.1.14 (9.1.14-9-g131531-elpa @ /home/boss5/.emacs.d/elpa/org-20181112/)]

2019-12-27 Thread Fabrice Popineau
Sent the message too quickly.
Obviously, you will have to adapt the paths in w32-shell-execute with your
own setup and the location of files you want to open.
WSL allows different options to mount your NTFS drive or to create links
between directories.

Regards,

Fabrice

Le ven. 27 déc. 2019 à 18:25, Fabrice Popineau <
fabrice.popin...@centralesupelec.fr> a écrit :

> Hi,
>
> I had to solve this problem too.
>
> I used these functions:
>
>   (defun w32-shell-execute (operation document  parameters
> show-flag)
> (if (and operation (not (string= "open" operation)))
> (error "Don't know how to %s %s" operation document)
>   (call-process "/mnt/c/Windows/System32/cmd.exe" nil nil t "/c"
> "start" "\"\""
> (concat ""
> (replace-regexp-in-string "^/mnt/c/" "c:/"
>
> (replace-regexp-in-string "^\\(/mnt/c\\)?/home/Fabrice/" "c:/home/"
> document))
> ""
>   (defun wsl-open-url (url  args)
> (w32-shell-execute "open" url))
>
> (setq browse-url-browser-function #'wsl-open-url)
> (setq browse-url-mailto-function #'wsl-open-url)
>
> Regards,
>
> Fabrice
>
> Le ven. 27 déc. 2019 à 18:10, Steve Miano  a
> écrit :
>
>> On WSL, using emacs 25.1, in org-mode there is a bug/design issue.
>>
>> It the issue is:
>> When opening a link in org-mode using C-c C-o, org-open-at-point doesn't
>> work. It does find the browser, if you have set
>>
>> (setq browse-url-firefox-program "/mnt/c/PROGRA~1/MOZILL~1/firefox.exe")
>>
>> and does run the process, but it doesn't bring up a browser. You can
>> see the process in list-processes and if you run that command in the
>> console it works, but in org-mode the console never show and the
>> process remains.
>>
>> The function browse-url-default-browse finds and runs the correct
>> browser. However, it runs the browser using the wrong command
>> depending on the case. If you are on WSL, without the graphical
>> interface, you need to run the shell-command to use the windows
>> browser. This is how it is done when it detects cygwin using
>> system-type. However, System-type cannot be used to detect WSL because
>> it doesn't find that you are on windows. The uname command detects it.
>>
>> Obviously this isn't straight forward as in different situations you
>> want to do different things, graphical vs non-graphical. Perhaps
>> modify the function which sets system-type to return wsl then detect
>> graphical environment and use the non shell-command approach?
>>
>> I humbly bring this to your attention. Thanks in advance.
>>
>>
>> Emacs  : GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
>>   of 2017-09-15, modified by Debian
>> Package: Org mode version 9.1.14 (9.1.14-9-g131531-elpa @
>> /home//.emacs.d/elpa/org-20181112/)
>>
>> current state:
>> ==
>> (setq
>>   org-src-lang-modes '(("python" . python) ("plantuml" . fundamental)
>> ("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist)
>> ("asymptote" . asy)
>>("dot" . fundamental) ("sqlite" . sql) ("calc" .
>> fundamental) ("C" . c) ("cpp" . c++) ("C++" . c++) ("screen" .
>> shell-script)
>>("shell" . sh) ("bash" . sh))
>>   org-tab-first-hook '(org-babel-hide-result-toggle-maybe
>> org-babel-header-arg-expand)
>>   org-babel-results-keyword "results"
>>   org-speed-command-hook '(org-speed-command-activate
>> org-babel-speed-command-activate)
>>   org-occur-hook '(org-first-headline-recenter)
>>   org-metaup-hook '(org-babel-load-in-session-maybe)
>>   org-log-done t
>>   org-confirm-shell-link-function 'yes-or-no-p
>>   org-link-search-must-match-exact-headline nil
>>   org-default-notes-file "~/org/notes.org"
>>   org-after-todo-state-change-hook '(org-clock-out-if-current)
>>   org-from-is-user-regexp "\\"
>>   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-table-use-standard-references t
>>   org-font-lock-set-keywor
>>
>>
>>
>
> --
> Fabrice Popineau
> -
> CentraleSupelec
> Département Informatique
> 3, rue Joliot Curie
> 91192 Gif/Yvette Cedex
> Tel direct : +33 (0) 169851950
> Standard : +33 (0) 169851212
> --
>
>

-- 
Fabrice Popineau
-
CentraleSupelec
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: Bug: wsl org-open-at-point [9.1.14 (9.1.14-9-g131531-elpa @ /home/boss5/.emacs.d/elpa/org-20181112/)]

2019-12-27 Thread Fabrice Popineau
Hi,

I had to solve this problem too.

I used these functions:

  (defun w32-shell-execute (operation document  parameters
show-flag)
(if (and operation (not (string= "open" operation)))
(error "Don't know how to %s %s" operation document)
  (call-process "/mnt/c/Windows/System32/cmd.exe" nil nil t "/c"
"start" "\"\""
(concat ""
(replace-regexp-in-string "^/mnt/c/" "c:/"

(replace-regexp-in-string "^\\(/mnt/c\\)?/home/Fabrice/" "c:/home/"
document))
""
  (defun wsl-open-url (url  args)
(w32-shell-execute "open" url))

(setq browse-url-browser-function #'wsl-open-url)
(setq browse-url-mailto-function #'wsl-open-url)

Regards,

Fabrice

Le ven. 27 déc. 2019 à 18:10, Steve Miano  a écrit :

> On WSL, using emacs 25.1, in org-mode there is a bug/design issue.
>
> It the issue is:
> When opening a link in org-mode using C-c C-o, org-open-at-point doesn't
> work. It does find the browser, if you have set
>
> (setq browse-url-firefox-program "/mnt/c/PROGRA~1/MOZILL~1/firefox.exe")
>
> and does run the process, but it doesn't bring up a browser. You can
> see the process in list-processes and if you run that command in the
> console it works, but in org-mode the console never show and the
> process remains.
>
> The function browse-url-default-browse finds and runs the correct
> browser. However, it runs the browser using the wrong command
> depending on the case. If you are on WSL, without the graphical
> interface, you need to run the shell-command to use the windows
> browser. This is how it is done when it detects cygwin using
> system-type. However, System-type cannot be used to detect WSL because
> it doesn't find that you are on windows. The uname command detects it.
>
> Obviously this isn't straight forward as in different situations you
> want to do different things, graphical vs non-graphical. Perhaps
> modify the function which sets system-type to return wsl then detect
> graphical environment and use the non shell-command approach?
>
> I humbly bring this to your attention. Thanks in advance.
>
>
> Emacs  : GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
>   of 2017-09-15, modified by Debian
> Package: Org mode version 9.1.14 (9.1.14-9-g131531-elpa @
> /home//.emacs.d/elpa/org-20181112/)
>
> current state:
> ==
> (setq
>   org-src-lang-modes '(("python" . python) ("plantuml" . fundamental)
> ("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist)
> ("asymptote" . asy)
>("dot" . fundamental) ("sqlite" . sql) ("calc" .
> fundamental) ("C" . c) ("cpp" . c++) ("C++" . c++) ("screen" .
> shell-script)
>("shell" . sh) ("bash" . sh))
>   org-tab-first-hook '(org-babel-hide-result-toggle-maybe
> org-babel-header-arg-expand)
>   org-babel-results-keyword "results"
>   org-speed-command-hook '(org-speed-command-activate
> org-babel-speed-command-activate)
>   org-occur-hook '(org-first-headline-recenter)
>   org-metaup-hook '(org-babel-load-in-session-maybe)
>   org-log-done t
>   org-confirm-shell-link-function 'yes-or-no-p
>   org-link-search-must-match-exact-headline nil
>   org-default-notes-file "~/org/notes.org"
>   org-after-todo-state-change-hook '(org-clock-out-if-current)
>   org-from-is-user-regexp "\\"
>   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-table-use-standard-references t
>   org-font-lock-set-keywor
>
>
>

-- 
Fabrice Popineau
-
CentraleSupelec
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: Display problems

2019-11-12 Thread Fabrice Popineau
Thanks Eric for this explanation!
I can't read emacs-devel as often as I did.

Fabrice

Le mar. 12 nov. 2019 à 07:45, Fraga, Eric  a écrit :

> On Monday, 11 Nov 2019 at 17:12, Fabrice Popineau wrote:
> > - with global-hl-line-mode: the cursor disappears on empty lines,
> > quite disturbing in my opinion
>
> Known problem in latest versions of Emacs with extended faces (hl-line
> face is one such face).  If you customize the face and remove the
> :extend property, everything is fine in terms of the cursor but, of
> course, the face will no longer extend across the window.
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78
>


Display problems

2019-11-11 Thread Fabrice Popineau
Hi,
I noticed a couple of problems recently:
- with global-hl-line-mode: the cursor disappears on empty lines, quite
disturbing in my opinion

[image: image.png] [image: image.png]

- with org-hide-emphasis-markers: when at the end of a line as above, if
turned on, then you can't go past the marker and stay on the same line.
Hiding the markers and going right will put you on next line.

All of this with latest Org mode and Emacs 27.0.50 (master).

Hope someone has an insight in these hairy display things.

Regards,

Fabrice


Re: [O] BUG report [Was: computing the size of a tikz to png image during export]

2018-01-30 Thread Fabrice Popineau
2018-01-30 21:59 GMT+01:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Hello,
>
> Fabrice Popineau <fabrice.popin...@centralesupelec.fr> writes:
>
> > You should have a look at commit  38be85124551083d269.
> > It prevents evaluation of the by-backend form in parameters.
>
> It doesn't.
>
> My mistake: it optionaly prevents :-)


> It prevents evaluation conditionally, i.e., when an optional argument is
> non-nil. The same argument prevents expanding Noweb references because
> I think both features are tied. If I'm wrong, we will use a special
> value to distinguish the cases, or use another argument.
>
> Meanwhile, I think this is fixed.
>

After a quick test, it seems to work ok here.

Thanks a lot because I rely heavily on this feature !

Regards,

Fabrice


Re: [O] BUG report [Was: computing the size of a tikz to png image during export]

2018-01-28 Thread Fabrice Popineau
2018-01-29 2:34 GMT+01:00 Berry, Charles :

> > On Jan 28, 2018, at 3:24 PM, Nicolas Goaziou 
> wrote:
> >
> > Would you have an ECM? I don't know what is "the by-backend trick".
>
> Not a bug AFAICS.
>
> `by-backend' is a macro mentioned here:
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2013-07/msg00500.html
>
> I guess it needs to use `org-export-current-backend' if it is to be
> handled in recent org versions.
>

Thanks for the pointer to the variable but that is not the problem.

You should have a look at commit  38be85124551083d269.
It prevents evaluation of the by-backend form in parameters.

-- 
Fabrice


Re: [O] BUG report [Was: computing the size of a tikz to png image during export]

2018-01-28 Thread Fabrice Popineau
2018-01-29 0:24 GMT+01:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Hello,
>
> Fabrice Popineau <fabrice.popin...@supelec.fr> writes:
>
> > Well, I think there is a problem with the current master
> > since commit 38be85124551083d269.
> >
> > The problem is that the by-backend trick which were tolerated before
> > does not work anymore.
> >
> > Tested between Org 9.1.6 as in current emacs-26.0.91 release versus
> current
> > Org master.
> >
> > More over, ignoring the no-eval parameter
> > in org-babel-parse-header-arguments
> > restores the previous behavior.
>
> Would you have an ECM? I don't know what is "the by-backend trick".
>
>
Example attached.
Actually, I wonder if you can avoid to evaluate arguments in
org-babel-parse-header-arguments
and continue to support the use of by-backend.

Regards,

Fabrice


test.org
Description: Binary data


[O] BUG report [Was: computing the size of a tikz to png image during export]

2018-01-28 Thread Fabrice Popineau
Well, I think there is a problem with the current master
since commit 38be85124551083d269.

The problem is that the by-backend trick which were tolerated before
does not work anymore.

Tested between Org 9.1.6 as in current emacs-26.0.91 release versus current
Org master.

More over, ignoring the no-eval parameter
in org-babel-parse-header-arguments
restores the previous behavior.

Regards,

Fabrice





2018-01-28 16:37 GMT+01:00 Fabrice Popineau <fabrice.popin...@supelec.fr>:

>
>
> 2018-01-24 8:54 GMT+01:00 Alan Schmitt <alan.schm...@polytechnique.org>:
>
>> Hello,
>>
>> I use this great trick to have both a pdf and html export of tikz
>> images:
>>
>> #+header: :file (by-backend (latex "tp6-tree.tikz") (t "tp6-tree.png"))
>> #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions
>> -geometry 800
>> #+header: :results file raw
>> #+header: :fit yes
>> #+header: :headers '("\\usepackage{tikz}")
>> #+begin_src latex
>> \begin{tikzpicture}
>> …
>> \end{tikzpicture}
>> #+end_src
>>
>>
> I jump on this example to ask: does this by-backend trick still work with
> Org 9.1.6?
> Because I used it too and for some reason it fails to evaluate the
> by-backend form now.
> What am I overlooking ?
>
> Thanks,
>
> Fabrice
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] computing the size of a tikz to png image during export

2018-01-28 Thread Fabrice Popineau
2018-01-24 8:54 GMT+01:00 Alan Schmitt :

> Hello,
>
> I use this great trick to have both a pdf and html export of tikz
> images:
>
> #+header: :file (by-backend (latex "tp6-tree.tikz") (t "tp6-tree.png"))
> #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions
> -geometry 800
> #+header: :results file raw
> #+header: :fit yes
> #+header: :headers '("\\usepackage{tikz}")
> #+begin_src latex
> \begin{tikzpicture}
> …
> \end{tikzpicture}
> #+end_src
>
>
I jump on this example to ask: does this by-backend trick still work with
Org 9.1.6?
Because I used it too and for some reason it fails to evaluate the
by-backend form now.
What am I overlooking ?

Thanks,

Fabrice


[O] Datetrees and tags

2018-01-01 Thread Fabrice Popineau
Hi,

It seems that currently, datetrees do not support tags.
IE if I add a tag to some datetree and I try to add another item to the
same date,
then another date is insereted:

*** 2017-12-29 vendredi :perso:
[2017-12-29 ven.]

- Bla-bla-bla-bla

*** 2017-12-29 vendredi
[2017-12-29 ven.]

-

Actually, looking at org-datetree.el, the several regex here do not take
possible tags into account, so this is expected.

So my question: would it make sense to enhance datetrees entries with
optional tags?
Or would that introduce some kind of inconsistency elsewhere?

Happy New Year to everybody.

Fabrice


Re: [O] advice please: best way to export to DOC(X) with maths

2017-12-15 Thread Fabrice Popineau
The best way  is probably to generate a PDF with LaTeX
and to open it with MS-Word. Yes, it can do that, and the math import
is quite good (for what I have seen, at least as good as any other
alternative option).

Fabrice

2017-12-14 13:18 GMT+01:00 Eric S Fraga <esfli...@gmail.com>:

> Hello,
>
> almost all the writing I do that is intended to be exported will be
> exported to LaTeX.  However, every now and again I need to export to
> DOC/DOCX.
>
> My query is: what is the best way (i.e. the state of the art) currently
> in org to export to DOC/DOCX for text that has equations?  I have both
> inline maths, e.g. \(i \in [0,n]\) and displayed equations.  Is there a
> route that will convert these to something Word et al. can process
> directly, other than images?  Maybe via pandoc?
>
> Thanks,
> eric
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.3-168-g7455f4
>



-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Running org-mode (and emacs) inside the Web browser ?

2017-10-27 Thread Fabrice Popineau
2017-10-27 17:49 GMT+02:00 Olivier Berger <
olivier.ber...@telecom-sudparis.eu>:

> Hi.
>
> I've had this crazy idea to try and "port" emacs to the Web browser
> (using some tools like [[https://browsix.org/][browsix]]), for the
> purpose of running org-mode inside a browser tab.
>
> Anyone having had the same idea yet ?
>

Definitely, except I didn't even try to take action :)


> Interestingly, porting a C program to browsix currently seem to rely on
> emscripten and LLVM... which might not be the best toolchain for
> building Gnu Emacs... but trolls aside, I'd be curious of the
> feasability.
>
> I'm not exactly sure why that would be worth doing... but I can imagine
> running that Emacs Web browser port over some kind of versioned file
> system, and Emacs conf files (org + tangling, of course), so that you
> have "your" org-mode at hand from anywhere using a URL and a browser
> tab... of course, using a keyboard for browsing that tab would be better
> than a touch screen, re keyboard shortcuts.
>

I don't think that the approach to port emacs to run into the browser would
be the
one offering the best reward. Once you manage to fix all the difficult
point, you will
probably get something unbearably slow.

I think the best reward would be to build a ShareEmacs in the same vein as
ShareLaTeX
(merged with Overleaf now).
The big step would be to run emacs on a server and render emacs in the
browser.
Then to allow several users to edit concurrently the same org file.

My 0.02€ :-)

Fabrice


Re: [O] default file for any .org file

2017-10-19 Thread Fabrice Popineau
2017-10-19 15:38 GMT+02:00 Joseph Vidal-Rosset <
joseph.vidal.ros...@gmail.com>:

> Hello again,
>
> I am sorry to say that there is certainly something that I do not
> understand. I have defined a firstemplate.org file in
> "/home/joseph/MEGA/git/scimax/user/"  and I have adapted your code in my
> user.el, Sébastien:
>
> (use-package yatemplate
>:ensure t
>:after yasnippet
>:config
>
>;; Define template directory
>(setq yatemplate-dir (concat config-basedir
> "/home/joseph/MEGA/git/scimax/user/firstemplate.org"))
>
>;; Coupling with auto-insert
>
>(setq auto-insert-alist nil)
>(yatemplate-fill-alist)
>(add-hook 'find-file-hook 'auto-insert)
>)
>
> But it does not work for me. If I create a new .org file, I do not see the
> wanted lines that refer to my orgref.bib  file...
>
> Same thing with Fabrice's solution.  "Chou blanc ... " :(
>
>
If you add your setup by
#+setupfile: my-setup.org
you need to refresh it by C-c C-c on this line.
You won't see the content of my-setup.org, but it will be active in your
current orf buffer.

Fabrice


Re: [O] default file for any .org file

2017-10-19 Thread Fabrice Popineau
More flexible imho : use a #+setupfile: directive.

#+setupfile: my-setup.org

http://orgmode.org/manual/In_002dbuffer-settings.html

Fabrice

2017-10-19 9:12 GMT+02:00 Joseph Vidal-Rosset <joseph.vidal.ros...@gmail.com
>:

> Many thanks Sébastien ! You understood perfectly what I am looking for. I
> am going to test your solution and I will be back to inform you.
>
> Again, I am thankful to you, for your quick and certainly helpful reply.
>
> Best wishes
>
> Jo.
>
> 2017-10-19 9:02 GMT+02:00 Sébastien Le Maguer <
> slemag...@coli.uni-saarland.de>:
>
>> Hello,
>>
>> If I understand well, you are looking for a template. On my side, I used
>> yatemplate coupled with auto-insert. Here is the part of configuration I
>> have:
>>
>>  (use-package yatemplate
>>:ensure t
>>:after yasnippet
>>:config
>>
>>;; Define template directory
>>(setq yatemplate-dir (concat config-basedir
>> "/third_parties/templates"))
>>
>>;; Coupling with auto-insert
>>
>>(setq auto-insert-alist nil)
>>(yatemplate-fill-alist)
>>(add-hook 'find-file-hook 'auto-insert)
>>)
>>
>> I use a template like the one attached which is place on the directory
>> "/third_parties/templates". I let you adapt but
>> technically it should work with many adaptations.
>>
>> Kind regards,
>> Sébastien
>>
>>
>>
>>
>>
>> On Thu, Oct 19 2017 (06:55), Joseph Vidal-Rosset <
>> joseph.vidal.ros...@gmail.com> wrote:
>>
>> Hello the list,
>>>
>>> I apologize if the reply to my question has already be given here of if
>>> it
>>> is in the org-mode website.
>>>
>>> I would be happy to get in advance,  for any new .org file that I am
>>> going
>>> to create, some properties given by default, for example the following
>>> links for .bib file:
>>>
>>>
>>> bibliography:/home/joseph/MEGA/org/reforg.bib
>>> bibliographystyle:smfplain
>>>
>>> and others things that I am always constrained to copy from previous .org
>>> files and paste in the new one.
>>>
>>> Your suggestions and your help will be very welcome,
>>>
>>> Joseph
>>>
>>
>>
>> --
>> Save our in-boxes! http://emailcharter.org
>>
>> ====
>> 
>> Dr. Sébastien Le Maguer
>> Postdoctorate researcher
>> Co-chair of SYNSIG (https://synsig.org/index.php/Main_Page)
>>
>> Saarland University
>> Campus C7.4 - room 2.03
>> D-66123 Saarbrücken
>> Germany
>>
>> phone : +49-681-302-70030 <+49%20681%2030270030>
>> Mail: slemag...@coli.uni-saarland.de
>> website :  http://www.coli.uni-saarland.de/~slemaguer/
>> 
>> 
>>
>>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950 <01%2069%2085%2019%2050>
Standard : +33 (0) 169851212 <01%2069%2085%2012%2012>
--


Re: [O] ox-html export bug

2017-09-08 Thread Fabrice Popineau
2017-09-08 19:40 GMT+02:00 kadal :

> On 09/08/2017 10:32 AM, Nicolas Goaziou wrote:
>
>> kadal  writes:
>>
>> Seems like the second one should export to either ""
>>> or "".
>>>
>>
>> Is it valid HTML?
>>
>> Regards,
>>
>> This SO thread has confusing answers: https://stackoverflow.com/ques
> tions/192048/can-an-html-element-have-multiple-ids#192066
>
> Looks like the second option will work.


Not valid according to :

https://www.w3.org/TR/html5/syntax.html#attributes-0

"There must never be two or more attributes on the same start tag whose
names are an ASCII case-insensitive match for each other."


> That said, the first option is better because if I'm setting a CUSTOM_ID,
> that's what should be used for internal links...
>
>
I agree with that. Ideally, if you set a CUSTOM_ID, then it should replace
the default org generated id.

Regards,

Fabrice


Re: [O] Org protocol, Windows 10

2017-08-26 Thread Fabrice Popineau
2017-08-26 10:31 GMT+02:00 Nikolay Kudryavtsev <
nikolay.kudryavt...@gmail.com>:

> Hello Fabrice.
>
> If you set your protocol bookmarklet with a single slash like
> "org-protocol:/capture" everything would work.
>

You are right: using this syntax, emacslientw gets the right url without
the superflous / after capture.
This seems strange to me, because I always thought that urls would always
start with protocol:// .

Maybe this should be advertised more loudly.

Thanks a lot.

Fabrice


> I asked before for someone from the dev team to weight in on it, because
> org test seem to use both.
>
> --
> Best Regards,
> Nikolay Kudryavtsev
>
>


[O] Org protocol, Windows 10

2017-08-25 Thread Fabrice Popineau
Hi,

I am using a recent build of Windows 10 (16251) and  org protocol wasn't
working for me for quite a long time now.
So I decided to look at what went wrong.
I found several annoyances.

The first one is that Windows seems to rewrite itself the url which is sent
to emacsclientw.
Some url sent by Chrome as:

org-protocol://capture?template=c=http%3A%2F%
2Fkitchingroup.cheme.cmu.edu
%2Fblog%2F2014%2F07%2F17%2FPandoc-does-org-mode-now%2F=Pandoc%20does%20org-mode%20now=foobar

is received on emacsclientw command line as:

org-protocol://capture/?template=c=http%3A%2F%
2Fkitchingroup.cheme.cmu.edu
%2Fblog%2F2014%2F07%2F17%2FPandoc-does-org-mode-now%2F=Pandoc%20does%20org-mode%20now=foobar"

notice the capture? changed into capture/?

This is weird and I wonder if I am alone to see this ? I have no idea when
it started to behave this way.

I patched org-protocol.el with this:

diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index d37de1113..ccef9c301 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -649,7 +649,10 @@ to deal with new-style links.")
 (catch 'greedy
   (dolist (var flist)
;; `\' to `/' on windows.  FIXME: could this be done any better?
-(let ((fname  (expand-file-name (car var
+   (setcar var (replace-regexp-in-string
"^\\(org-protocol://[^/\\?]*\\)/\\?" "\\1?" (car var)))
+(let (;; (fname  (expand-file-name (car var)))
+ (fname (car var))
+ )
   (setq fname (org-protocol-check-filename-for-protocol
   fname (member var flist)  client))
   (if (eq fname t) ;; greedy? We need the t return value.


There are 2 other problems related to absolute pathnames under Windows.

You don't want to pass an url to expand-file-name because the current
directory will be prepended to the url, reason why I removed the
expand-file-name call in the patch above.

Finally, there is another place in lisp/server.el where you may not want to
call expand-file-name:

diff --git a/lisp/server.el b/lisp/server.el
index 1ebefe2866..8ce85646e9 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1175,7 +1175,8 @@ server-execute-continuation
(when (and (fboundp
'cygwin-convert-file-name-from-windows)
   (string-match "\\`[A-Za-z]:" file))
  (setq file (cygwin-convert-file-name-from-windows
file)))
-   (setq file (expand-file-name file dir))
+   (unless (string-match "^[^/]+:/" file)
+ (setq file (expand-file-name file dir)))
(push (cons file filepos) files)
(server-log (format "New file: %s %s"
file (or filepos ""))

With these small changes, org-protocol behaves as expected at least with my
configuration.

Curious to hear what you guys think about this ?

Regards,

Fabrice


Re: [O] Display inline images for shortcuts links

2017-08-18 Thread Fabrice Popineau
While we are at it, would it be possible to display an inline image when
the image is in the contents part of the link?

The rationale is that something like:

[[file:book.pdf][file:cover.jpg]]

is exported to html as:



The result would be a clickable image in the Org buffer the same way it is
in HTML.

Is there any drawback in doing this ?

Fabrice

2017-08-17 22:05 GMT+02:00 Fabrice Popineau <fabrice.popin...@gmail.com>:

>
>
> 2017-08-17 15:59 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:
>
>> Hello,
>>
>> I simply extended the link search to all link abbrevs, discarding those
>> that do not ultimately match a file.
>>
>> Does it solve your issue?
>>
>>
> Yes thanks. Much lighter.
>
> I like link abbreviations, because they allow to change the reference
> point where the files are stored (if needed some day)
>
> Regards,
>
> Fabrice
>
>


Re: [O] Display inline images for shortcuts links

2017-08-17 Thread Fabrice Popineau
2017-08-17 15:59 GMT+02:00 Nicolas Goaziou :

> Hello,
>
> I simply extended the link search to all link abbrevs, discarding those
> that do not ultimately match a file.
>
> Does it solve your issue?
>
>
Yes thanks. Much lighter.

I like link abbreviations, because they allow to change the reference point
where the files are stored (if needed some day)

Regards,

Fabrice


[O] Display inline images for shortcuts links

2017-08-17 Thread Fabrice Popineau
Would it be possible to enable inline images for shortcuts links ?
Currently, the function `org-display-inline-images' checks for a hard coded
file: link.
In the case of :


#+LINK: temp file:c:/temp/%h

[[file:cover.jpg]]

[[temp:cover.jpg]]

The first link will be matched, but not the second one.
(Unless I missed something?)

A small patch like the one attached enables to display inline images for
all links.
But maybe relying on the org-element API is not the smarter move here.

( I voluntarily kept the old lines commented in the patch. )

Regards,

Fabrice

diff --git a/lisp/org.el b/lisp/org.el
index b05eac57e..0b45ecec2 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19398,9 +19398,12 @@ boundaries."
 (org-with-wide-buffer
  (goto-char (or beg (point-min)))
  (let ((case-fold-search t)
-  (file-extension-re (image-file-name-regexp)))
-   (while (re-search-forward "[][]\\[\\(?:file\\|[./~]\\)" end t)
-(let ((link (save-match-data (org-element-context
+  (file-extension-re (image-file-name-regexp))
+   (parse-tree (org-element-parse-buffer)))
+   (org-element-map parse-tree 'link
+ (lambda (link)
+   ;; (while (re-search-forward "[][]\\[\\(?:file\\|[./~]\\)" end
t)
+   ;;  (let ((link (save-match-data (org-element-context))
;; Check if we're at an inline image.
(when (and (equal (org-element-property :type link) "file")
   (or include-linked


Re: [O] Escaping links

2017-08-14 Thread Fabrice Popineau
You could also prefix the link by a string holding (in ascii) the number of
bytes of the unencoded link.

But that makes raw/manual editing of an org file much harder.


2017-08-14 18:26 GMT+02:00 Neil Jerram <n...@ossau.homelinux.net>:

> Except if your original string was "%org-9.0"...
>
> For this kind of approach to work, you generally need to prefix
> everything; specifically included the cases that are _not_ encoded.
>
> Regards - Neil
>
>
>
> On 12/08/17 16:01, John Kitchin wrote:
>
>> I was thinking of something like how all PDF files start with something
>> like %PDF-1.3. So any string that started with %org-9.0, for example
>> would be certain to be encoded, whereas any other beginning would not be
>> certain.
>>
>> Nicolas Goaziou writes:
>>
>> Hello,
>>>
>>> John Kitchin <jkitc...@andrew.cmu.edu> writes:
>>>
>>> Could you put some magic at the beginning of the string that indicates it
>>>> is encoded?
>>>>
>>> I don't know. Could you elaborate a bit?
>>>
>>> Regards,
>>>
>>
>>
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Escaping links

2017-08-11 Thread Fabrice Popineau
2017-08-11 19:31 GMT+02:00 John Kitchin :

> Could you put some magic at the beginning of the string that indicates it
> is encoded?
>
>
For my own needs, yes I could probably define a handler for my special kind
of abbreviations.

I have a too small number of such files, so I renamed them.

I mainly wanted to have an update (thanks Nicolas) on the current status
about this escape thing
in case I missed something.

Regards,

Fabrice


[O] Escaping links

2017-08-11 Thread Fabrice Popineau
Hi,

Are links to a file whose name already holds (url-)escaped chars supported?

If I have a directory named "c:/temp/foo bar/"
and files in this directory named
foo.txt
foo bar.txt
foo%2Fbar.txt

I can create links in an Org buffer by using `insert' but I find the
situation a bit confusing.

#+LINK: temp file:c:/temp/%s

1. [[temp:foo bar/foo bar.txt]]
2. [[temp:foo%20bar/foo bar.txt]]
3. [[temp:foo bar/foo%20bar.txt]]
4. [[temp:foo%20bar/foo%20bar.txt]]


All of these links seem to work the same way.

5. [[temp:foo bar/foo%2Fbar.txt]]
6. [[temp:foo bar/foo%252Fbar.txt]]
7. [[temp:foo%20bar/foo%252Fbar.txt]]

Link 5 does not work.

Link 6 and 7 do work: as long as I press enter on the link, I visit the
file.

Unfortunately, if I edit these links with 'C-c C-l', doing nothing
(return), Org replaces the escaped chars and unescape them.

I have grabbed files whose name hold such %2F %3A and so on escaped chars.
Do I have any option to make a link point at them or should I rename them?

Regards,

Fabrice


Re: [O] Slow usage of capture templates

2017-08-07 Thread Fabrice Popineau
2017-08-03 0:12 GMT+02:00 Tim Cross :

> Probably no real help, but win10 is (or soon will be) bundling in bash
> shell, which may address many of the reasons to use Cygwin. From posts
> I've seen on a number of lists, I would not be surprised to see cygwin
> slowly decline into obscurity. I see little interest in the emacs devel
> list for cygwin since the native windows version has matured (and it has
> been suggested, is the largest emacs user base).
>
> I am a Windows user (very long time) and Cygwin has never been an option
to me.
Native Emacs works pretty well under Windows.
There is only one drawback: it is slow (slower than linux) at running
external processes and some emacs packages do that pretty heavily
(ivy/counsel, flycheck).
I have seen reports of slower startup times with the native Windows emacs
than with Linux, however I have not
been able to reproduce them (for example using helm default config or
spacemacs config).

Depending on wheter you use a 32 bits emacs or a 64 bits emacs, you may
want to add
32 bits Gnu utilities (https://sourceforge.net/projects/ezwinports/files/)
or 64 bits Gnu utilities (http://www.msys2.org/, provides a much better
environment than Cygwin in my opinion)

Or you may want to try the new WSL (Windows Subsystem for Linux, as
described by Tim)
which provides a full Ubuntu distribution without the penalty for running
external processes,
and without the penalty of running a VM.
WSL is pretty impressive and emacs works pretty well once you get a good X
server (like MobaXTerm).

Fabrice


Re: [O] ox-ipynb in a new repo

2017-08-05 Thread Fabrice Popineau
Thanks a lot for this piece of work! Very useful (at least to me).

Fabrice

2017-08-05 23:35 GMT+02:00 John Kitchin <jkitc...@andrew.cmu.edu>:

> Hi everyone,
>
> I moved my ipynb exporter to a new repo at https://github.com/
> jkitchin/ox-ipynb. I am planning to submit it to MELPA in the next week
> or two. If anyone is interested in checking it out, it would be helpful to
> spot issues prior to MELPA release!
>
> The TL;DR version is this adds an org export backend to make Jupyter
> notebooks in IPython and R.
>
> John
>
> ---
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Need clarification

2017-06-16 Thread Fabrice Popineau
2017-06-16 9:39 GMT+02:00 Thomas S. Dye <t...@tsdye.com>:

> Aloha Fabrice,
>
> Fabrice Popineau writes:
>
> > Hi,
> >
> > I have this src code block:
> >
> > #+BEGIN_SRC python :exports output :results output html
> > print('Foo!')
> > #+END_SRC
> >
>
> I think the problem might be :exports, which takes one of =code=,
> =results=, =both=, =none=.
>
>
Oh sorry, bad edit from me.

Actually, I can put whatever I want, comprised =none= and I still get the
src block in the export.

So something is overriding :exports but I can't (yet) find what.

Regards,


> hth,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>


[O] Need clarification

2017-06-16 Thread Fabrice Popineau
Hi,

I have this src code block:

#+BEGIN_SRC python :exports output :results output html
print('Foo!')
#+END_SRC


I have setup my own mechanism to export org files, based almost on
#'org-export-as
but I can't get rid of the src block on export.
I must be overlooking something.
At what point is it decided that the src code block shouldn't appear in the
exported document ?


Fabrice


Re: [O] org to static site?

2017-06-06 Thread Fabrice Popineau
I do the same, albeit I won't qualify my setup as 'simple'.
I export all my teaching stuff, personal web page and so on from Org files,
one file per
course or topic. I export html files, reveal presentations, pdf files for
exams or reference documents,
even IPython notebooks (thanks to John Kitchin).
I haven' t found an easy way to rely on ox-publish  for subtree publishing
with this scheme where you keep everything in the same Org file.
The problem was with navigation. I use a templating system
where I compute menus and body documents that are inserted in
some html template. So I had to write all the functions that will
do this computation and resolve cross links (not yet perfect in this are).



2017-06-04 20:26 GMT+02:00 Scott Randby <sran...@gmail.com>:

> On 05/31/2017 11:00 AM, Matt Price wrote:
> > I'm trying to wean myself off of Wordpress for next year's teaching
> > websites, and am wondering what solutions other people are using for
> > turning a collection of org pages and/or subtrees into a static html
> > site. I am leaning towards Hugo but honestly not for any sensible
> > reason; I've seen other people use Jekyll, though the fact that Github
> > doesn't support direct conversion from org-mode removes some of Jekyll's
> > appeal; and I know there are a number of other solutions too.
> >
> > So, I would love to hear what you all recommend.
>
> Maybe this is too primitive, but I keep all the content in one Org file
> and export the text under each top-level headline as a single HTML page.
> I use some simple macros if I need to export more than one top-level
> headline. I keep the CSS code in a separate file. Keeping all the
> content in one file makes it really easy to add new pages and edit old
> pages. I use a preamble for site navigation.
>
> Scott Randby
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Python src blocks indent

2017-05-17 Thread Fabrice Popineau
Thanks Nicolas.

I should have looked closer at ox-ipynb since the problem is in there.
It should make use of  `org-export-unravel-code' and it doesn't. Instead
it trims leading white spaces from the src code.
I'll report it to the scimax github repository.

Best regards,

2017-05-17 15:08 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > I mean that in the Org buffer I have for example :
> >
> > #+BEGIN_SRC ipython :session
> >   def fact(n):
> >   if n == 1:
> >   return 1
> >   else:
> >   return n * fact(n-1)
> > #+END_SRC
> >
> > That is, there is a 2 spaces indentation of the whole code block, and the
> > code block is properly indented.
> > When I export it, I get :
> >
> > def fact(n):
> >   if n == 1:
> >   return 1
> >   else:
> >   return n * fact(n-1)
>
> FWIW I cannot reproduce it. You may want to debug
> `org-export-unravel-code', `org-export-format-code' or
> `org-export-format-code-default'.
>
> Regards,
>


Re: [O] Python src blocks indent

2017-05-17 Thread Fabrice Popineau
Hi,

I mean that in the Org buffer I have for example :

#+BEGIN_SRC ipython :session
  def fact(n):
  if n == 1:
  return 1
  else:
  return n * fact(n-1)
#+END_SRC

That is, there is a 2 spaces indentation of the whole code block, and the
code block is properly indented.
When I export it, I get :

def fact(n):
  if n == 1:
  return 1
  else:
  return n * fact(n-1)

in the IPython cell (basically, the notebook format is JSON and it is easy
to count those spaces in the code string in the JSON file)
and the 2 org-edit-src-content-indentation have been removed
only on the first line. The other ones have 6 or 10 spaces instead of 4 and
8.

Given that changing org-edit-src-content-indentation to 0 fixes this
problem, I wonder if there
is something wrong in the logic where this variable is used (only one place
in org-src).
But that could well be that it is not taken into account in places where it
should.

Regards,

Fabrice


[O] Python src blocks indent

2017-05-16 Thread Fabrice Popineau
Hi,

I have a problem with Python src blocks indentation.
At the moment, I export IPython notebooks with ox-ipynb
(https://github.com/jkitchin/scimax/blob/master/ox-ipynb.el
from scimax by John Kitchin)

All the lines but the first one in src code blocks have 2 superfluous
leading spaces.
If I set
(setq org-edit-src-content-indentation 0)
then the code blocks are ok.

Any idea where to look for to track this problem further down ?

Best regards,

Fabrice


Re: [O] HTML presentations using org-html-slideshow?

2017-03-08 Thread Fabrice Popineau
If only it were written in emacs-lisp, it would have been much easier to
adapt to newer releases of Org.

Fabrice


Re: [O] Release 9.0.5

2017-02-11 Thread Fabrice Popineau
Thanks Nicolas for the confirmation.

I am running Emacs 25.2rc2 under Windows 10 compiled with Mingw64.
2 of the failures seem to be harmless.

This one is about the file system which behaves differently under Windows :

F test-org-export/file-uri
Test ‘org-export-file-uri’ specifications.
(ert-test-failed
 ((should
   (equal "file:///local.org"
 (org-export-file-uri "/local.org")))
  :form
  (equal "file:///local.org" "file://d:/local.org")
  :value nil :explanation
  (arrays-of-different-length 17 19 "file:///local.org" "file://d:/
local.org" first-mismatch-at 7)))

The absolute path has the drive name. So actually not a failure.

F test-org-pcomplete/keyword
Test keyword and block completion.
(ert-test-failed
 ((should
   (equal "#+startup: "
 (org-test-with-temp-text "#+start"
(pcomplete)
(buffer-string
  :form
  (equal "#+startup: " "#+STARTUP: ")
  :value nil :explanation
  (array-elt 2
(different-atoms
 (115 "#x73" "?s")
 (83 "#x53" "?S")

This one is because pcomplete is used to get completion, and the completion
depends on
the pcomplete-ignore-case variable, which makes pcomplete ignore case for
windows-nt and cygwin by default.

The last one is strange:

F test-org-element/link-parser
Test ‘link’ parser.
(ert-test-failed
 ((should
   (equal "id"
 (org-test-with-temp-text "[[id:]]"
(org-element-property :type ...
  :form
  (equal "id" "fuzzy")
  :value nil :explanation
  (arrays-of-different-length 2 5 "id" "fuzzy" first-mismatch-at 0)))

This is complete non sense, because when I evaluate the test form, I
actually get "id" and I have
no idea where this "fuzzy" may come from.

Do you also get a warning like this:
Making org-entities-user local to  *temp*-443480 while let-bound!
in the *Messages* buffer ?

Fabrice

2017-02-11 1:47 GMT+01:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Hello,
>
> Fabrice Popineau <fabrice.popin...@supelec.fr> writes:
>
> > Sorry for the noise.
> > I found the culprit and it was on my side.
> > Everything is working again
> > but there are still 3 unexpected failures to the tests.
>
> FWIW, i cannot reproduce it. Neither can the BuildBot.
>
> Regards,
>
> --
> Nicolas Goaziou
>



-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Release 9.0.5

2017-02-10 Thread Fabrice Popineau
Sorry for the noise.
I found the culprit and it was on my side.
Everything is working again
but there are still 3 unexpected failures to the tests.

Regards


2017-02-10 22:37 GMT+01:00 Fabrice Popineau <fabrice.popin...@supelec.fr>:

> Maybe this explains it :
>
> Ran 670 tests, 667 results as expected, 3 unexpected (2017-02-10
> 22:35:45+0100)
> 14 expected failures
>
> 3 unexpected results:
>FAILED  test-org-element/link-parser
>FAILED  test-org-export/file-uri
>FAILED  test-org-pcomplete/keyword
>
> But it is still not a fix :-/
>
> Fabrice
>
> 2017-02-10 21:25 GMT+01:00 Fabrice Popineau <fabrice.popin...@supelec.fr>:
>
>> Hi Bastien and list,
>>
>> I have updated Org this morning from the master branch and I have a
>> problem.
>> Inserting a link as the first element of a line result in a strange
>> behaviour.
>> Sometimes, the link is not indented as it should relatively to the header
>> above,
>> and the link seems to continue after the eol. Look at the printscreen :
>>
>> [image: Images intégrées 1]
>>
>> I can't add a new line after the link.
>> Anybody has already seen something like this ?
>>
>> Thanks for any clue in fixing this problem.
>>
>> Fabrice
>>
>> 2017-02-10 14:53 GMT+01:00 Bastien <b...@gnu.org>:
>>
>>> Hi all,
>>>
>>> Org 9.0.5, a minor bugfix release, is out.
>>>
>>> Thanks!
>>>
>>> --
>>>  Bastien
>>>
>>>
>>>
>>
>>
>> --
>> Fabrice Popineau
>> -
>> SUPELEC
>> Département Informatique
>> 3, rue Joliot Curie
>> 91192 Gif/Yvette Cedex
>> Tel direct : +33 (0) 169851950 <01%2069%2085%2019%2050>
>> Standard : +33 (0) 169851212 <01%2069%2085%2012%2012>
>> --
>>
>>
>
>
> --
> Fabrice Popineau
> -
> SUPELEC
> Département Informatique
> 3, rue Joliot Curie
> 91192 Gif/Yvette Cedex
> Tel direct : +33 (0) 169851950 <01%2069%2085%2019%2050>
> Standard : +33 (0) 169851212 <01%2069%2085%2012%2012>
> --
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Release 9.0.5

2017-02-10 Thread Fabrice Popineau
Maybe this explains it :

Ran 670 tests, 667 results as expected, 3 unexpected (2017-02-10
22:35:45+0100)
14 expected failures

3 unexpected results:
   FAILED  test-org-element/link-parser
   FAILED  test-org-export/file-uri
   FAILED  test-org-pcomplete/keyword

But it is still not a fix :-/

Fabrice

2017-02-10 21:25 GMT+01:00 Fabrice Popineau <fabrice.popin...@supelec.fr>:

> Hi Bastien and list,
>
> I have updated Org this morning from the master branch and I have a
> problem.
> Inserting a link as the first element of a line result in a strange
> behaviour.
> Sometimes, the link is not indented as it should relatively to the header
> above,
> and the link seems to continue after the eol. Look at the printscreen :
>
> [image: Images intégrées 1]
>
> I can't add a new line after the link.
> Anybody has already seen something like this ?
>
> Thanks for any clue in fixing this problem.
>
> Fabrice
>
> 2017-02-10 14:53 GMT+01:00 Bastien <b...@gnu.org>:
>
>> Hi all,
>>
>> Org 9.0.5, a minor bugfix release, is out.
>>
>> Thanks!
>>
>> --
>>  Bastien
>>
>>
>>
>
>
> --
> Fabrice Popineau
> -
> SUPELEC
> Département Informatique
> 3, rue Joliot Curie
> 91192 Gif/Yvette Cedex
> Tel direct : +33 (0) 169851950 <01%2069%2085%2019%2050>
> Standard : +33 (0) 169851212 <01%2069%2085%2012%2012>
> --
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Release 9.0.5

2017-02-10 Thread Fabrice Popineau
Hi Bastien and list,

I have updated Org this morning from the master branch and I have a problem.
Inserting a link as the first element of a line result in a strange
behaviour.
Sometimes, the link is not indented as it should relatively to the header
above,
and the link seems to continue after the eol. Look at the printscreen :

[image: Images intégrées 1]

I can't add a new line after the link.
Anybody has already seen something like this ?

Thanks for any clue in fixing this problem.

Fabrice

2017-02-10 14:53 GMT+01:00 Bastien <b...@gnu.org>:

> Hi all,
>
> Org 9.0.5, a minor bugfix release, is out.
>
> Thanks!
>
> --
>  Bastien
>
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


[O] org-open-at-point and buffer-name

2016-11-27 Thread Fabrice Popineau
Hi,

I have some foo.org file :

* Section
  This is a [[file:bar.org::#home][link]

and a bar.org file :

* Section
:PROPERTIES:
:CUSTOM_ID: home
:END:
Lorem ipsum ...

If I put the cursor in foo.org on the link ant I try to evaluate (M-:)
(progn (org-open-at-point) (buffer-name))
I get "foo.org" as a result.
However the window displays bar.org and my cursor is in in bar.org.
By which mystery ?

I am missing something here ... but what ?

Fabrice


Re: [O] Bug: Windows-unfriendly filename in org-preview-latex-process-alist customization

2016-11-26 Thread Fabrice Popineau
2016-11-26 16:41 GMT+01:00 Scott Otterson :

> In my Windows build of emacs, when I put the cursor in a latex equation
> and run
>
> M-x org-toggle-latex-fragment
>
>
> then things chug along for a second but then fail.  In the *Org Preview
> LaTex Output* buffer, I see the message:
>
> This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson
> [1
> dvipng: Fatal error, cannot open output file c:/Users/scott/AppData/Local/
> Temp/"orgtex4628hQG.png
>
>
> The reason for the failure is the leftover quote (...Temp/"orgtex...) in
> the expected png output file.  With some hackery, I can see that the
> command that's being run is:
>
> dvipng -fg "rgb 0 0 0" -bg "rgb 1 1 1" -D "102.0" -T tight -o
> "c:/Users/scott/AppData/Local/Temp/""orgtex4628hQG".png
> "c:/Users/scott/AppData/Local/Temp/orgtex4628hQG.dvi"
>
>
> If I paste that into a cygwin xterm, it runs fine on the .dvi file that's
> still in the Temp directory.  But the command fails in a Windows cmd
> window; if I remove the extra quotes, then the command works in the cmd
> window too.
>
> The extra quote comes from the default customization for the dvipng
> image-converter field of org-preview-latex-process-alist:
>
> dvipng -fg %F -bg %B -D %D -T tight -o %o%b.png %f
>
>
>
This command should read :

dvipng -fg %F -bg %B -D %D -T tight -o "%o%b.png" %f

and the args shouldn't be quoted before.
Unquoting those strings will possibly require to change other command
strings.

Fabrice


Re: [O] org-eldoc and shell

2016-10-18 Thread Fabrice Popineau
2016-10-18 13:47 GMT+02:00 Aaron Ecay :

> Hi Fabrice,
>
> shell-mode is a shell emulation mode – what you get when you type M-x
> shell.


But shell-mode is working and I get a cmd.exe prompt (because I'm using
Windows).


> You should use sh (or bash, as applicable) in the header line of
> your src blocks.
>
> Ok! I understand now the problem I have seen in debugging this.
And it seems to work ok with both sh and bash.

Thanks for your help.

Fabrice


[O] org-eldoc and shell

2016-10-15 Thread Fabrice Popineau
Hi,

In org-eldoc.el, org-eldoc-get-mode-local-documentation-function function,
there is this code:

(with-temp-buffer
(funcall mode-func)
(setq doc-func (and eldoc-documentation-function
(symbol-value
'eldoc-documentation-function)))
(puthash lang doc-func org-eldoc-local-functions-cache))

Unfortunately, this code does not work for shell-mode.
Especially, if you get a temp buffer and try to turn it into shell mode,
you get an error because there is no associated process.

Emacs 25.1 uses this in the shell-mode function to find which shell:
(let ((shell (file-name-nondirectory (car
  (process-command (get-buffer-process (current-buffer))

but if there is no process, get-buffer-process returns nil and
process-command fails.

I am only reporting this because I am not sure what to do about it
But surely it is a bit annoying that


Re: [O] Best diagram, image software?

2016-10-04 Thread Fabrice Popineau
2016-10-04 15:11 GMT+02:00 Lawrence Bottorff :

> I know lots of you use Emacs and org mode to prepare scholarly books and
> papers, either doing the HTML or, more probably, the Latex export.
> Question: Let's say I want to produce a math text with
> Emacs/org-mode/Latex. What is the best way to make diagrams and images?
> I've seen things like Inkscape and LibreOffice Draw. But then there is
> Gnuplot and Tikz. Yes, what Tikz does seems optimal, but the learning curve
> is a year's sabbatical. Just wondering what you people are using to do your
> images.
>

Tikz (+stackoverflow to cut on the sabbatical year :-) ) most of the time.
I'm not good at drawing with Inkscape.
Emacs can be setup to preview tikz pictures in the Org buffer, which helps
a lot.

Fabrice


Re: [O] How to use org mode shell with ssh?

2016-09-23 Thread Fabrice Popineau
2016-09-23 10:32 GMT+02:00 Xi Shen :

> Hi,
>
> On my Windows system, I have Cygwin setup, with Emacs as part of the
> Cygwin installation.
>

Cygwin Emacs is not a native Emacs (AFAIK). The difference is in the way it
groks pathnames
and other stuff like the default shell.

I also setup my Cygwin environment to use zsh. I started my Emacs from this
> zsh environment. I think that's where org inherited this setting.
>
> I think when org execute my block, it some how assumed that it should use
> the same shell at the remote end.
>

The portion of code I pointed out does not make sense to me and it may be
responsible for your problem.

Fabrice


Re: [O] How to use org mode shell with ssh?

2016-09-22 Thread Fabrice Popineau
My $0.02

As I'm using Emacs on Windows, with MSYS2+MingW64, I tried this.
There is a problem with using bash from a _native_ MingW64 Emacs:
bash is a MSYS2 app and Emacs is a MingW64 app.

>From emacs, I would have used the plink protocol, so that's what I did.
And I got this message in the *Org-Babel Error Output* buffer

/bin/sh: 1: C:/Local/Emacs/bin/cmdproxy.exe: not found

So I looked at ob-eval.el and the org-babel-eval function.
And there are at least 2 big problems.
1- when entering this function, the `command' parameter is
"C:/Local/Emacs/bin/cmdproxy.exe"
2 - the `shell-file-name' variable has the same value
So the following won't work for Windows :
;; Unfortunately, `executable-find' does not support file name
;; handlers.  Therefore, we could use it in the local case
;; only.
(shell-file-name
(cond ((and (not (file-remote-p default-directory))
(executable-find shell-file-name))
shell-file-name)
  ((file-executable-p
(concat (file-remote-p default-directory) shell-file-name))
shell-file-name)
  ("/bin/sh")))

BTW I don't see the point concatenating shell-file-name with
default-directory when the later is remote.
Do we expect to find the shell in the remote directory ?

Anyway, there is little chance this stuff will work under Windows with a
native Emacs.
If I find time, I may try to propose some fix.

Fabrice


2016-09-22 16:52 GMT+02:00 Nick Dokos <ndo...@gmail.com>:

> Colin Baxter <m43...@yandex.com> writes:
>
>
> >> #+BEGIN_SRC shell :dir /scp:openwrt:/mnt/sda1
> >> ls -al
> >> #+END_SRC
> >>
> >> The error, I think, is from the remote end.
> >>
> >> /bin/sh: /bin/zsh: not found
> >>
> >> Clearly, I am using zsh on my Windows, but my remote OpenWRT system
> only has ash installed. Is
> >> there's way to specify the shell to use on the remote end?
> >>
> >
> > I can't help you here. I've never used openwrt. All I can suggest is to
> > search openwrt documentation or try with cgywin.
> >
>
> IIUC, openwrt is the name of the remote node - nothing to do with OpenWrt
> (except of course, that
> the remote node may be a router which has been flashed with OpenWrt, but
> that should make no
> difference to ssh/tramp).
>
> --
> Nick
>
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Restrict include to some backend

2016-09-06 Thread Fabrice Popineau
2016-09-06 15:59 GMT+02:00 Clément Pit--Claudel :

> Hi Fabrice,
>
> I've run into this issue recently (while writing my first large document
> in Org).  I couldn't find a good natice solution, so I used a rather
> unpleasant trick, and I've been meaning to write emacs-orgmode about it
> since then.
>
> In my documents I have a BEGIN_ONLY environment that I use like this:
>
>
Ok, I understand. I think I know how to preprocess the file (but thanks for
your offer)

Overall, I think that it would be nice to be able to select parts of the
org file
for some backends only.

Thanks everybody,

Fabrice


[O] Restrict include to some backend

2016-09-06 Thread Fabrice Popineau
Hi,

Maybe there is an obvious answer but I wonder how to restrict
including a file to some backend. The following doesn't work:

#+begin_export latex
#+include foo.py src python
#+end_export

(Not that I expected it to actually work, but it shows the goal)
Any idea ? Thanks for your help.

Fabrice


Re: [O] Invalid search bound (wrong side of point) when creating agenda

2016-08-24 Thread Fabrice Popineau
No the problem is this bug that has been fixed recently in 25.1 about
unbalanced changed hooks.
It is a bug that has always existed, so in  24.x also.

Fabrice

2016-08-23 11:53 GMT+02:00 Eric S Fraga <e.fr...@ucl.ac.uk>:

> On Tuesday, 23 Aug 2016 at 09:31, Toby Gee wrote:
> >> What version of emacs are you using?  I know that there was a problem in
> >> the development version of emacs early in July that caused this type of
> >> problem.  I am not sure if it has been fixed -- I've kept to a version
> >> from June for the time being.
> >
> > I'm using 24.4.5 on one machine, and 24.5.4 on another (both on OS X),
> > and having the problem on both machines (and on a third, which is also
> > running some version of 24).
>
> Ah, okay, then the problem is something else.  I hope somebody else on
> the list can help!
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.4-655-g9fb077
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Org links, URLs and HTML export

2016-08-23 Thread Fabrice Popineau
2016-08-23 18:30 GMT+02:00 Achim Gratz <strom...@nexgo.de>:

> Fabrice Popineau writes:
> > I can insert : [[http:bar.html]]
> > However, I would like to be able to insert any kind of relative url.
> > Specifically, there is no mean to insert something
> > like : [[http:/bar.html]] which is exported to  href="http:/bar.html">
> > The corresponding export should be 
>
> But that's an absolute URL, provided a well-defined base URI exists (the
> authority is implied and the path component starts with a slash, so it
> would start in the root).
>
> > Strangely, some browsers grok the former (Chrome), but not all of them
> > (Safari).
>
> Then Safari either has a bug or it determines the base URI differently
> than Chrome.
>
> > Anyway, only the later is correct.
>
> I don't think so.  You might want to read
>
> https://tools.ietf.org/html/rfc3986
>
> specifically the part about the translation of relative URI.
>
> Thanks for the pointer.
It helps because it states that:

"Some parsers allow the scheme name to be present in a relative
   reference if it is the same as the base URI scheme.  This is
   considered to be a loophole in prior specifications of partial URI
   [RFC1630].  Its use should be avoided but is allowed for backward
   compatibility."

And on page 21:

"If the URI scheme defines a default for host, then that default
   applies when the host subcomponent is undefined or when the
   registered name is empty (zero length).  For example, the "file" URI
   scheme is defined so that no authority, an empty host, and
   "localhost" all mean the end-user's machine, whereas the "http"
   scheme considers a missing authority or empty host invalid."

So exporting to  is wrong.

I guess I can solve that with a filter.

Greetings,

Fabrice


Re: [O] Invalid search bound (wrong side of point) when creating agenda

2016-08-23 Thread Fabrice Popineau
Hopefully, it should be fixed in emacs-25.1-rc2 (available now)

Fabrice

2016-08-23 11:31 GMT+02:00 Toby Gee <toby...@gmail.com>:

> > What version of emacs are you using?  I know that there was a problem in
> > the development version of emacs early in July that caused this type of
> > problem.  I am not sure if it has been fixed -- I've kept to a version
> > from June for the time being.
>
> I'm using 24.4.5 on one machine, and 24.5.4 on another (both on OS X),
> and having the problem on both machines (and on a third, which is also
> running some version of 24).
>
> Best,
>
> Toby
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Emacs+org on Windows 7 pro

2016-08-23 Thread Fabrice Popineau
2016-08-23 10:24 GMT+02:00 Eric S Fraga :

> On Tuesday, 23 Aug 2016 at 01:34, Grant Rettke wrote:
> > I found Cygwin to make things more difficult for Emacs so I installed
> > the plain old Windows Emacs and did the following:
> >
> > https://github.com/grettke/help/blob/master/help.md#windows
>
> Thanks.  I'll check this out.
>
> If I ever have to use a Windows system at all, I want bash & emacs and
> cygwin makes it very easy (for me).


I always found Cygwin to be a PIA when working under  Windows.
I vastly prefer to use msys2+mingw64. Emacs 25 compiles out of the box
as a native w64 app and you get bash + all the tools you may want.
My $0.02

Fabrice


[O] Org links, URLs and HTML export

2016-08-22 Thread Fabrice Popineau
Hi,

I'm puzzled by the following.
I write a couple of Org file with HTML export in mind, building a site with
several pages, say:
foo.org -> foo.html
bar.org -> bar.html
I want to insert a link in foo.org that will point to bar.html when
exported.

I can insert : [[http:bar.html]]
However, I would like to be able to insert any kind of relative url.
Specifically, there is no mean to insert something
like : [[http:/bar.html]] which is exported to 
The corresponding export should be 

Strangely, some browsers grok the former (Chrome), but not all of them
(Safari).
Anyway, only the later is correct.

Is there any way to fix exporting relative urls?

If I'm wrong somewhere, please correct me.

Best regards,

Fabrice


Re: [O] proposed modification of org-display-inline-images

2016-07-25 Thread Fabrice Popineau
2016-07-25 14:18 GMT+02:00 John Kitchin :

> Rasmus writes:
>
> > Hi,
> >
> > Thanks for the proposal.
> >
> > John Kitchin  writes:
> >
> >> I would like to propose a change to org-display-inline-images so it can
> >> rescale images even if imagemagick is not built in to emacs. There is
> >> currently no way to rescale images when they are displayed in that case
> >> AFAICS. This is particularly a problem on Windows, as we have never
> >> found a binary linked to imagemagick for that platform.
>

I have built one for the current 25.1-RC1 thanks to a patch found on Github.

https://gist.github.com/rzl24ozi/69c54eb86974fa1cbea1

Unfortunately, the patch is for ImageMagick v6.
I use MSYS2+MingW64 and this distribution has upgraded ImageMagick to v7.0
I had to patch the patch and emacs, because Emacs is not yet ready for this
new version
of ImageMagick.

For those who want to try it:
http://semantic.supelec.fr/Software/downloads/emacs-25.1-rc1-w64.zip
The zip holds a full blown Emacs 25.1 (GnuTLS, all graphic libraries, etc.).

Fabrice


Re: [O] Problem with eldoc and Python

2016-07-07 Thread Fabrice Popineau
Here a 2 very small patches for contrib/lisp/org-eldoc.el

Regards,

Fabrice



2016-07-06 23:27 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > The problem is that the byte code comes from Python mode.
> > I solved the problem with this:
> >
> > $ diff -uw contrib/lisp/org-eldoc.el contrib/lisp/org-eldoc.el
> > --- contrib/lisp/org-eldoc.el   2016-02-29 11:13:22.330099500 +0100
> > +++ contrib/lisp/org-eldoc.el   2016-07-04 07:11:10.466144400 +0200
> > @@ -155,7 +155,8 @@
> >   (string= lang "golang")) (when (require 'go-eldoc nil t)
> >
> >  (go-eldoc--documentation-function)))
> > (t (let ((doc-fun
> > (org-eldoc-get-mode-local-documentation-function lang)))
> > -(when (fboundp doc-fun) (funcall doc-fun
> > +(when (or (and (symbolp doc-fun) (fboundp doc-fun))
> > + (functionp doc-fun)) (funcall doc-fun
>
> Wouldn't
>
>   (when (functionp doc-fun) (funcall doc-fun))
>
> be enough?
>
> Also, would you provide a patch for this?
>
> Thank you.
>
> Regards,
>


0001-The-doc-fun-object-may-be-a-function-object-and-not-.patch
Description: Binary data


0001-When-inserting-a-new-src-block-the-language-may-not-.patch
Description: Binary data


Re: [O] Problem with eldoc and Python

2016-07-06 Thread Fabrice Popineau
2016-07-06 22:41 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Hello,
>
> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > Am I alone to see this recently:
> >
> > insert an src python block with  > moving inside the src block
> > and then some timer function breaking with:
> >
> > Debugger entered--Lisp error: (wrong-type-argument symbolp #[128
> "\300\301
> > \"\206 ... [eldoc-documentation-function apply default-value] 4 "
> > (fn  ARGS)"] nil] 4 nil])
> >   fboundp(#[128 "\300\301...[apply python-eldoc-function #[128
> > "\301\302\300!^B\"\207" [eldoc-documentation-function apply
> default-value]
> > 4 "\n\n(fn  ARGS)"] nil] 4 nil])
> >   org-eldoc-documentation-function()
> >   eldoc-print-current-symbol-info()
> > ...
> > timer-event-handler([t 0 0 50 nil #[0 "... [eldoc-mode
> > global-eldoc-mode eldoc-documentation-function (nil ignore)
> > eldoc-print-current-symbol-info] 2] nil idle 0])
> >
> > This is with the latest emacs-25 "soon to be released" and the latest Org
> > mode.
> >
> > Any help appreciated.
>
> Could you send a backtrace with non byte-compiled code?
>
>
Hi Nicolas,

The problem is that the byte code comes from Python mode.
I solved the problem with this:

$ diff -uw contrib/lisp/org-eldoc.el contrib/lisp/org-eldoc.el
--- contrib/lisp/org-eldoc.el   2016-02-29 11:13:22.330099500 +0100
+++ contrib/lisp/org-eldoc.el   2016-07-04 07:11:10.466144400 +0200
@@ -155,7 +155,8 @@
  (string= lang "golang")) (when (require 'go-eldoc nil t)

 (go-eldoc--documentation-function)))
(t (let ((doc-fun
(org-eldoc-get-mode-local-documentation-function lang)))
-(when (fboundp doc-fun) (funcall doc-fun
+(when (or (and (symbolp doc-fun) (fboundp doc-fun))
+ (functionp doc-fun)) (funcall doc-fun

 ;;;###autoload
 (defun org-eldoc-load ()



In python.el, one can find this around line 5129:

  (if (null eldoc-documentation-function)
  ;; Emacs<25
  (set (make-local-variable 'eldoc-documentation-function)
   #'python-eldoc-function)
(add-function :before-until (local 'eldoc-documentation-function)
  #'python-eldoc-function))

which stores byte code in eldoc-documentation-function, which makes
fboundp fail because the object is not a symbol. However it is a function.

Regards,

Fabrice


[O] Problem with eldoc and Python

2016-07-03 Thread Fabrice Popineau
Hi,

Am I alone to see this recently:

insert an src python block with 

Re: [O] Does org-nofity uses dbus?

2016-06-22 Thread Fabrice Popineau
2016-06-22 14:16 GMT+02:00 Xi Shen :

> Well~that's good news. But I think dbus requires X11 to work. But in
> Cygwin environment, people usually do not configure a full X11 environment.
>

No, dbus doesn't require X11 to work. Neither does emacs require  Cygwin to
work.
Actually, Emacs compiles as a native Windows application (using MinGW32 or
MinGW64) and it is also the case of dbus.


> Besides, for org-notify, could dbus help it playing a notification sound
> on Windows? Or popup a notification message?
>
>
I guess it will work the same way it does elsewhere.



> So what I am thinking is to get some Windows native behavior for
> org-notify on Windows/Cygwin environment.
>
>
I too think that a native, session only module that will provide the same
interface as dbus could be interesting
for Windows users. However, that shouldn't prevent those who want to use
dbus to use it.

AFAIU, using dbus, you could have a distant running emacs (ssh) session and
get notifications on your local desktop,
provided the right setup.

Well, browsing the source code, I see that Eli Zaretskii has already
implemented native win32 tray notifications.
They are a small subset of the dbus notifications.
However, he made them exclusive with dbus. I don't see the reason yet.

Fabrice


Re: [O] Does org-nofity uses dbus?

2016-06-21 Thread Fabrice Popineau
Le 21 juin 2016 16:14, "Xi Shen"  a écrit :
>
> Yeah...getting dbus to work on Windows will be hard.

Actually, not so much. Dbus does work on windows. It doesn't work right now
on emacs. I'm looking into it.

Fabrice


Re: [O] Does org-nofity uses dbus?

2016-06-21 Thread Fabrice Popineau
2016-06-21 8:31 GMT+02:00 Xi Shen :

> Hi,
>
> I got below error after I called (org-notify-start). It seems the
> dbus-error happens very close to the task notification. I wonder if
> org-notify uses dbus.
>
> Error: (dbus-error "No connection to bus" :session)
> Warning: notification for "Go to dental in 30 mins." behind schedule!
> Error: (dbus-error "No connection to bus" :session) [2 times]
> Warning: notification for "Go to dental in 30 mins." behind schedule!
> Error: (dbus-error "No connection to bus" :session) [2 times]
>
> I am using Emacs on Windows, and there's no dbus on Windows...
>
>
It seems so, yes: org-notify calls notifications-notify from the emacs
notifications.el library.
Clearly, notifications.el relies on dbus.

However, if you are using Mingw64, there is a dbus package which should
provide
what is needed. Unfortunately, I tried it and can't tell yet how to
configure it or if it
even works.


Fabrice


Re: [O] org-refile works but dosent work from within a capture window (org-capture-refile)

2016-06-16 Thread Fabrice Popineau
2016-06-17 0:43 GMT+02:00 Nicolas Goaziou :

> Hello,
>
> ...
>


> I guess you are refiling to an empty headline.


Hmmm ... the problem is that there was no chance to specify one.



> Anyway, it is fixed.


Thanks a lot!

Fabrice


Re: [O] org-refile works but dosent work from within a capture window (org-capture-refile)

2016-06-15 Thread Fabrice Popineau
(let ... ...
...))) nil (user-error "The region is not a (sequence of) subtree(s)"
(if (equal arg (quote (16))) (org-refile-goto-last-stored) (if (or (and
(equal arg 2) org-clock-hd-marker (marker-buffer org-clock-hd-marker)
(prog1 (setq it ...) (setq arg nil))) (setq it (or rfloc (let ... ...
(progn (setq file (nth 1 it) pos (nth 3 it)) (if (and (not arg) pos (equal
... file) (if regionp ... ...)) (progn (error "Cannot refile to position
inside the tree or region"))) (setq nbuf (or (find-buffer-visiting file)
(find-file-noselect file))) (if (and arg (not ...)) (progn
(org-pop-to-buffer-same-window nbuf) (goto-char pos) (org-show-context
...)) (if regionp (progn ... ...) (org-copy-subtree 1 nil t))
(save-current-buffer (set-buffer ...) (setq reversed ...) (save-excursion
...)) (if org-refile-keep nil (if regionp ... ...)) (if (featurep ...)
(progn ...)) (setq org-markers-to-move nil) (message (concat actionmsg " to
\"%s\" in file %s: done") (car it) file)))
  org-refile(nil)
  funcall-interactively(org-refile nil)
  #(org-refile nil nil)
  ad-Advice-call-interactively(# org-refile)
  apply(ad-Advice-call-interactively # org-refile)
  call-interactively(org-refile)
  (save-restriction (widen) (goto-char pos) (call-interactively (quote
org-refile)))
  (save-excursion (save-restriction (widen) (goto-char pos)
(call-interactively (quote org-refile
  (save-current-buffer (set-buffer (or base (current-buffer)))
(save-excursion (save-restriction (widen) (goto-char pos)
(call-interactively (quote org-refile)
  (progn (save-current-buffer (set-buffer (or base (current-buffer)))
(save-excursion (save-restriction (widen) (goto-char pos)
(call-interactively (quote org-refile))
  (unwind-protect (progn (save-current-buffer (set-buffer (or base
(current-buffer))) (save-excursion (save-restriction (widen) (goto-char
pos) (call-interactively (quote org-refile)) (set-window-configuration
wconfig))
  (let ((wconfig (current-window-configuration))) (unwind-protect (progn
(save-current-buffer (set-buffer (or base (current-buffer)))
(save-excursion (save-restriction (widen) (goto-char pos)
(call-interactively (quote org-refile)) (set-window-configuration
wconfig)))
  (let ((pos (point)) (base (buffer-base-buffer (current-buffer)))
(org-capture-is-refiling t) (kill-buffer (org-capture-get :kill-buffer
(quote local (org-capture-put :kill-buffer nil) (org-capture-finalize)
(let ((wconfig (current-window-configuration))) (unwind-protect (progn
(save-current-buffer (set-buffer (or base (current-buffer)))
(save-excursion (save-restriction (widen) (goto-char pos)
(call-interactively ...) (set-window-configuration wconfig))) (if
kill-buffer (progn (kill-buffer base
  org-capture-refile()
  funcall-interactively(org-capture-refile)
  #(org-capture-refile nil nil)
  ad-Advice-call-interactively(#
org-capture-refile nil nil)
  apply(ad-Advice-call-interactively #
(org-capture-refile nil nil))
  call-interactively(org-capture-refile nil nil)
  command-execute(org-capture-refile)

2016-05-29 23:53 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > do you mind guiding me on how to produce the backtrace and ECM, im not
> very
> > technical ;-)
>
> The backtrace is easy: M-x toggle-debug-on-error.
>
> Just make sure you're using an un-compiled Org (you can call
> `org-reload' with a C-u prefix).
>
> The ECM is a minimal document that enables me to reproduce the error. It
> may not be needed if the backtrace is obvious enough, but it doesn't
> hurt to provide it either, if it is simple to create.
>
> Regards,
>
> --
> Nicolas Goaziou
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


[O] org-export-resolve-id-link

2016-06-10 Thread Fabrice Popineau
Again in the need of some hint.

I am exporting some subtree.
There is a custom_id pointing in the same org
file but outside of the subtree.

* Foo
:PROPERTIES:
:CUSTOM_ID: foo
:END:

Lorem ipsum...

* Bar

[[#foo]]

When I try to export the second subtree, I get
an error from #'org-export-resolve-id-link.

(user-error Unable to resolve link: "foo")

What is the easiest way to trap this error
so that I can compute something myself for this link ?

Thanks in advance.

Fabrice


Re: [O] org-get-tags-at

2016-06-10 Thread Fabrice Popineau
2016-06-09 13:42 GMT+02:00 Nicolas Goaziou :

> Hello,
>
> Marco Wahl  writes:
>
> > That was a bug and has been fixed now AFAICT.
>
> Thank you for the fix.
>
>
+1

Fabrice


Re: [O] org-get-tags-at

2016-06-09 Thread Fabrice Popineau
2016-06-09 8:41 GMT+02:00 Rasmus <ras...@gmx.us>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > What is the reason for that result?
>
> Don't know.  The function seems a bit complicated for what it does...
>
> Here’s some ways to get local tags.
>
> Oh great !

Thanks a lot.

Fabrice


[O] org-get-tags-at

2016-06-08 Thread Fabrice Popineau
Hi,

I'm trying to program some stuff of my own and
either I misunderstand the documentation or something is wrong
with  #'org-get-tags-at.

I have a heading:

* Bar   :foo:bar:baz:

(org-get-tags-at)
while on the heading returns ("baz")
I would expect ("foo" "bar" "baz")

What is the reason for tat result?

Regards,

Fabrice


Re: [O] org-mode on Windows Emacs doesn't offer html export

2016-03-18 Thread Fabrice Popineau
2016-03-18 14:35 GMT+01:00 Lawrence Bottorff :

> Yes, thanks Eric. Got latest-greatest 8.3. I did a (require 'ox-html) and
> (require 'ox-latex) and the options did show up. Not sure why my Linux side
> had these and the Windows side did not. But still I get this error:
>
> org-latex-compile: PDF file
> c:/Users/Admin/AppData/Local/Temp/babel-6812T7_/latex-6812ivv.pdf wasn't
> produced
>
> Not sure what this is about or what it has to do with exporting to html.
>
>
Something is wrong in your setup.
I can guarantee that HTML export is working out of the box under Windows.
Start by trying with an org file not requiring any babel stuff.
Depending on (possibly complex) image format conversions,
you may need either some TeX distribution (TeXLive prefered AFAIC)
and/or GhostScript and/or ImageMagick.

Fabrice


Re: [O] EXPORT_LATEX_HEADER property

2016-03-03 Thread Fabrice Popineau
2016-03-03 16:49 GMT+01:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > In org reference, 12.7.2, it is said that:
> >
> > ‘LATEX_HEADER’
> > Arbitrary lines added to the preamble of the document, before the
> ‘hyperref’
> > settings. The location can be controlled via org-latex-classes.
> >
> > Note the plural to lines. How can several lines be specified? AFAICS, if
> I
> > do :
> >
> > :EXPORT_LATEX_HEADER: \usepackage{mathptmx} % rm & math
> > :EXPORT_LATEX_HEADER: \usepackage[scaled=0.90]{helvet} % ss
> >
> > The second line will take precedence over the first one.
>
> The manual reference is about keywords, i.e, #+LATEX_HEADER:. You are
> using properties. The two are slightly different.
>
> In particular, each value from a #+LATEX_HEADER keyword becomes a new
> line whereas new values from properties replace the old ones (hence the
> PROP+ syntax).
>

Ok, thanks for the confirmation. There is no strict equivalence in what can
be done
on a subtree and what can be done at the document level.


> Long story short: if you want multiple lines, use keywords.


I think I'll deport the LaTeX stuff into a single external file rather.


> There is no
> support in multi lines properties in Org. Moreover, the use cases are
> sufficiently rare that I don't even think it is worth implementing.


I don't know what it could look like, but rare ... Am I the only one who
has a setup
to export different subtrees from the same Org file?


Best regards,

Fabrice


Re: [O] EXPORT_LATEX_HEADER property

2016-03-03 Thread Fabrice Popineau
2016-03-03 12:26 GMT+01:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Hello,
>
>
Hi Nicolas,


> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > First, I can't find where is documented the difference between
> > :EXPORT_LATEX_HEADER:
> > and
> > :EXPORT_LATEX_HEADER+:
>
> See (info "(org) Property syntax").
>
>
I need to learn to read better because I didn't see that this paragraph was
about it:

If you want to add to the value of an existing property, append a + to the
property name.
The following results in the property var having the value “foo=1 bar=2”.
#+PROPERTY: var foo=1
#+PROPERTY: var+ bar=2



> Second, when I use several lines with
> > :EXPORT_LATEX_HEADER+:
> > they  are concatenated into a single line.
>
> Correct.
>
> > This is annoying because:
> >
> > :PROPERTIES:
> > :EXPORT_LATEX_HEADER+: \usepackage{mathptmx} % rm & math
> > :EXPORT_LATEX_HEADER+: \usepackage[scaled=0.90]{helvet} % ss
> > ...
> > :END:
> >
> > results in
> >
> > \usepackage{mathptmx} % rm & math  \usepackage[scaled=0.90]{helvet} % ss
> >
> > which is obviously unintended.
> >
> > Could it be possible to add a '\n' between those lines?
>
> Not quite what you are asking for, but couldn't you simply not comment
> each line?
>
> Yes, I can remove the comments, however, from time to time, it may be
useful to be able to comment
some \usepackage line, and I don't see how it can be done in Org, except by
killing the whole line.

In org reference, 12.7.2, it is said that:

‘LATEX_HEADER’
Arbitrary lines added to the preamble of the document, before the ‘hyperref’
settings. The location can be controlled via org-latex-classes.

Note the plural to lines. How can several lines be specified? AFAICS, if I
do :

:EXPORT_LATEX_HEADER: \usepackage{mathptmx} % rm & math
:EXPORT_LATEX_HEADER: \usepackage[scaled=0.90]{helvet} % ss

The second line will take precedence over the first one.

Thanks for your help,

Fabrice


[O] EXPORT_LATEX_HEADER property

2016-03-03 Thread Fabrice Popineau
Hi,

I need some help here.

I'm using org 8.3.4.

I am exporting subtrees to LaTeX.
So I configure as much as possible per subtree.

First, I can't find where is documented the difference between
:EXPORT_LATEX_HEADER:
and
:EXPORT_LATEX_HEADER+:

Clearly, I need to use the latter form with my configuration (the former
doesn't output anything), but I'd like to know precisely where the behavior
is described.

Second, when I use several lines with
:EXPORT_LATEX_HEADER+:
they  are concatenated into a single line.

This is annoying because:

:PROPERTIES:
:EXPORT_LATEX_HEADER+: \usepackage{mathptmx} % rm & math
:EXPORT_LATEX_HEADER+: \usepackage[scaled=0.90]{helvet} % ss
...
:END:

results in

\usepackage{mathptmx} % rm & math  \usepackage[scaled=0.90]{helvet} % ss

which is obviously unintended.

Could it be possible to add a '\n' between those lines?

Thanks for any help / clarification

Fabrice


Re: [O] ox-html, top-row-p

2015-12-15 Thread Fabrice Popineau
2015-12-15 0:20 GMT+01:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > I am not fond of eval at all, at least not in this specific case.
> > So yes, your way is at least as good as what I did.
>
> Fine. Would you want to provide a patch along these lines? It may
> require an entry in ORG-NEWS.
>
>
I'll do it but some more urgent things to do right now.

Fabrice


Re: [O] ox-html, top-row-p

2015-12-14 Thread Fabrice Popineau
2015-12-14 23:49 GMT+01:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Hello,
>
> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > So the problem is due to lexical binding (I am using emacs 25 devel
> branch).
> > The following variables can't be dynamically bound anymore in ox-html:
> > row-number, rowgroup-number, start-rowgroup-p, end-rowgroup-p,
> > top-row-p, bottom-row-p
> > .
> > There are 2 options :
> > - declare them with defvar
> > - pass them to eval as an environment.
> > Here is a patch for the second option, but I wonder if the first one
> > wouldn't be better.
>
> Another option would be to remove that ugly `eval' hack altogether, and
> instead use a function returning a string, called with 6 arguments (or
> with 3 arguments: row-number, rowgroup-number, and list of symbols among
> `top', `bottom', `start' and `end').
>
> WDYT?
>

I am not fond of eval at all, at least not in this specific case.
So yes, your way is at least as good as what I did.

Fabrice


Re: [O] ox-html, top-row-p

2015-12-13 Thread Fabrice Popineau
Hi,

So the problem is due to lexical binding (I am using emacs 25 devel branch).
The following variables can't be dynamically bound anymore in ox-html:
row-number, rowgroup-number, start-rowgroup-p, end-rowgroup-p,
top-row-p, bottom-row-p
.
There are 2 options :
- declare them with defvar
- pass them to eval as an environment.
Here is a patch for the second option, but I wonder if the first one
wouldn't be better.

diff --git a/vendor/org-mode/lisp/ox-html.el
b/vendor/org-mode/lisp/ox-html.el
index 6affac4..4e56ab3 100644
--- a/vendor/org-mode/lisp/ox-html.el
+++ b/vendor/org-mode/lisp/ox-html.el
@@ -3336,10 +3336,22 @@ communication channel."
;; Begin a rowgroup?
(when start-rowgroup-p (car rowgroup-tags))
;; Actual table row.
-   (concat "\n" (eval (car (plist-get info :html-table-row-tags)) t)
+   (concat "\n" (eval (car (plist-get info :html-table-row-tags))
+ `((row-number . ,row-number)
+   (rowgroup-number . ,rowgroup-number)
+   (start-rowgroup-p . ,start-rowgroup-p)
+   (end-rowgroup-p . , end-rowgroup-p)
+   (top-row-p . ,top-row-p)
+   (bottom-row-p . ,bottom-row-p)))
   contents
   "\n"
-  (eval (cdr (plist-get info :html-table-row-tags)) t))
+  (eval (cdr (plist-get info :html-table-row-tags))
+`((row-number . ,row-number)
+  (rowgroup-number . ,rowgroup-number)
+  (start-rowgroup-p . ,start-rowgroup-p)
+  (end-rowgroup-p . , end-rowgroup-p)
+  (top-row-p . ,top-row-p)
+  (bottom-row-p . ,bottom-row-p
;; End a rowgroup?
(when end-rowgroup-p (cdr rowgroup-tags))

Best regards,

Fabrice

2015-12-13 0:36 GMT+01:00 Fabrice Popineau <fabrice.popin...@gmail.com>:

> Hi,
>
> I get an error in ox-html.el with the latest org-mode when exporting
> tables to html :
>
> Debugger entered--Lisp error: (void-variable top-row-p)
>   (cond (top-row-p "") (bottom-row-p " class=\"tr-bottom\">") (t (if (= (mod row-number 2) 1) " class=\"tr-odd\">" "")))
>   eval((cond (top-row-p "") (bottom-row-p " class=\"tr-bottom\">") (t (if (= (mod row-number 2) 1) " class=\"tr-odd\">" ""))) t)
>   org-html-table-row((table-row (:type standard :begin 1784 :end 1898
> :contents-begin 1785 :contents-end 1897 :post-blank 0 :post-affiliated 1784
> :parent ...))
>
> Can anybody confirm or is something wrong on my side ?
>
> Greetings,
>
> Fabrice
>


[O] ox-html, top-row-p

2015-12-12 Thread Fabrice Popineau
Hi,

I get an error in ox-html.el with the latest org-mode when exporting tables
to html :

Debugger entered--Lisp error: (void-variable top-row-p)
  (cond (top-row-p "") (bottom-row-p "") (t (if (= (mod row-number 2) 1) "" "")))
  eval((cond (top-row-p "") (bottom-row-p "") (t (if (= (mod row-number 2) 1) "" ""))) t)
  org-html-table-row((table-row (:type standard :begin 1784 :end 1898
:contents-begin 1785 :contents-end 1897 :post-blank 0 :post-affiliated 1784
:parent ...))

Can anybody confirm or is something wrong on my side ?

Greetings,

Fabrice


Re: [O] Macro question

2015-10-25 Thread Fabrice Popineau
2015-10-24 19:02 GMT+02:00 Eric S Fraga <e.fr...@ucl.ac.uk>:

> On Saturday, 24 Oct 2015 at 13:37, Fabrice Popineau wrote:
>
> [...]
>
> > I find that using headers as in beamer is not pleasant (maybe that is
> just
> > me ?)
>
> Just to help you understand the positive aspect of headlines for
> structure in beamer, the use of headlines makes it incredibly easy to
> switch columns around, for instance, or to copy/move them from slide to
> slide.
>

You are right. This needs to be put forward.
In this case, the parameter that has to be made easily editable
is the width of the column. (Thinking about a common interface for
beamer and reveal)


> With respect to the HTML issue, what if you do not put blank lines
> between the different bits?  The blank lines are defining paragraphs, as
> far as I understand it.
>
>
It is possible to hack the reveal/html exporter.
Knowing that

{{{bFoo}}}
...
{{{eFoo}}}

gets exported to









The macros could be defined:
#+macro: bFoo @@html:@@
#+macro: eFoo @@html:@@

and this way you get spurious paragraphs, but valid html
However, I'm not sure I want to follow this path !

Best regards,

Fabrice


Re: [O] Some projects

2015-10-25 Thread Fabrice Popineau
2015-10-25 18:57 GMT+01:00 Thomas S. Dye :


> would suggest an alternate wording.  In this case, it would be super
> helpful to have a function that replaced annotated text with the
> annotation, so the author could easily accept the editor's suggestion.
>
>
In this case, it would be nice if annotations could have an author too!

Regards,

Fabrice


Re: [O] Macro question

2015-10-24 Thread Fabrice Popineau
2015-10-24 0:18 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > I agree that raw html can be output by macros, but it can easily break
> > too.
>
> I think you are missing the "inline part". You cannot use macros to
> generate, or even replace a block element in HTML (e.g., a paragraph).
>
> Well, thinking about it, "raw inline html" needs to be clarified for me,
because
even a mere :

@@html:@@

is surrounded by a paragraph.

My point is that what can be achieved by macros depends on the backend,
which defeats part of the purpose of having a high level markup language.

#+MACRO: newline @@latex:\\@@ @@html:@@

This works for LaTeX, because LaTeX has no markup for paragraphs (I agree
it is pure luck), but fails
for HTML because there is one.

OTOH, resorting to babel blocks to insert a newline is not viable option:
it takes much more to achieve something very simple.

Basically, macros are of no help to solve this :

--
#+MACRO: newline @@latex:\\@@ @@html:@@

* Section 2

Some text.

{{{newline}}}

Some other text.

#+html: 
#+latex: \\

Some other other text.
--

The macro way isn't a proper way: the  will be embedded in a
paragraph, where it shouldn't.
Only the second way achieves cleanly the expected effect. Well, not quite
because in LaTeX, the \\ should stick to the paragraph.
So it should be :

Some other text.
#+latex: \\

#+html: 

If I'm wrong, thanks for pointing me to the right way to use macros.
And if I'm right, maybe in the long term, Org needs another, different,
macro system
to help at this level.

Regards,

Fabrice


Re: [O] Macro question

2015-10-24 Thread Fabrice Popineau
>
>
> I don't get it.
>
> What about simply writing
>
>   Some other text.
>   \\
>
> ?
>
>
Ok for a new line, but I was looking for a way to get 2 columns on a slide,
independently of the backend, beamer or reveal.

One easy way would have been to write :

{{{beginColumns}}}

{{{nextColumn}}}

{{{endColumns}}}

I find that using headers as in beamer is not pleasant (maybe that is just
me ?)
Moreover, it works only in beamer.

At the moment, there is no "easy" way. Either resort to babel, or probably
better, derive a new backend.


Fabrice


Re: [O] org-reveal questions

2015-10-23 Thread Fabrice Popineau
I switched to org-reveal from beamer.
Beamer clutters your slides with too much markup.
(I ended up with much more markup than text in my slides).

Moroever, Reveal offers features that no pdf reader offers at least under
windows :
- separate frame for notes, timer, next slide
- ability to synchronize other clients on the master display
(your students can connect and their slides move as you move yours)
And it is very quick to compile a deck of x100 slides, where beamer can
take minutes.

To answer the first question :
- load bootstrap in the  section of your slides
- then you can add div's with class col-xs-6 for example and split your
frame in 2 columns.

I load bootstrap, mathjax and some personal js and css. It is working
pretty well.
It is not as clean as beamer out of the box, but it is more efficient.
With a good css, it should be  as clean as beamer.

Fabrice

2015-10-23 10:39 GMT+02:00 Eric S Fraga <e.fr...@ucl.ac.uk>:

> On Friday, 23 Oct 2015 at 09:45, Xebar Saram wrote:
> > Thx Eric
> >
> > ill check out beamer..i guess i need to know latex for that right?
>
> Not necessarily.  You can do a lot without any LaTeX knowledge.  Most of
> the issues you had with org-reveal are solved in ox-beamer.
>
> Check out http://orgmode.org/worg/exporters/beamer/ox-beamer.html
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


[O] Macro question

2015-10-23 Thread Fabrice Popineau
I was wondering if macros could be used to output raw html code, but that
doesn't seem to be the case.

Namely:

#+macro: bfoo @@html:@@
#+macro: efoo @@html:@@

The macros {{{bfoo}}} and {{{efoo}}} are expanded surrounded by  ...
.

This is quite a limitation. Is it the intended behavior?
If the reason is that the macro could output text that needs the  ...
, then
the problem is the point at which macros are expanded in the flow.
An option would be to allow #+html: in the macro, but that doesn't work.
The #+html:
directive gets straight on the output.

Sorry if this has already been discussed here.
(I vaguely remember some discussions about recursive macros)

Fabrice


Re: [O] Macro question

2015-10-23 Thread Fabrice Popineau
Hello Nicolas,

2015-10-23 22:37 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Hello,
>
> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > I was wondering if macros could be used to output raw html code, but that
> > doesn't seem to be the case.
> >
> > Namely:
> >
> > #+macro: bfoo @@html:@@
> > #+macro: efoo @@html:@@
> >
> > The macros {{{bfoo}}} and {{{efoo}}} are expanded surrounded by  ...
> > .
>
> Macros can output raw inline HTML code. If you want to generate any HTML
> code, you can use some babel block to do that.
>
>
I agree that raw html can be output by macros, but it can easily break too.

At the moment :

-
#+macro: bfoo @@html:@@
#+macro: efoo @@html:@@

* Section

{{{bfoo}}}

Some text.

{{{efoo}}}
-

is exported as :

-

Section










Some text.







-

But :

-
#+macro: bfoo @@html:@@
#+macro: efoo @@html:@@

* Section

{{{bfoo}}}
Some text.
{{{efoo}}}
-

is exported as :

-

Section







Some text.




-

In the first case, the  ...  are quite annoying.
In the second case,  the  ...  is spurious, but at least it doesn't
break the structure.

I wonder if there is a way to guess where ox-html could avoid to emit
paragraphs.

Regards,

Fabrice


Re: [O] ox-beamer and CUSTOM_ID

2015-10-15 Thread Fabrice Popineau
My small patch worked only for labels with colon.
With more extensive testing, I can propose this one against maint :

diff --git a/vendor/org-mode/lisp/ox-beamer.el
b/vendor/org-mode/lisp/ox-beamer.el
index 73d8a76..ee4f0d7 100644
--- a/vendor/org-mode/lisp/ox-beamer.el
+++ b/vendor/org-mode/lisp/ox-beamer.el
@@ -335,11 +335,11 @@ property, or a fallback value built from headline's
number.  This
 function assumes HEADLINE will be treated as a frame."
   (let ((opt (org-element-property :BEAMER_OPT headline)))
 (if (and (stringp opt)
-(string-match "\\(?:^\\|,\\)label=\\(.*?\\)\\(?:$\\|,\\)" opt))
+(string-match "\\(?:^\\|,\\)label={?\\(.*?\\)}?\\(?:$\\|,\\)"
opt))
(match-string 1 opt)
   (or (and (plist-get info :latex-prefer-user-labels)
   (org-element-property :CUSTOM_ID headline))
- (format "{sec:%s}"
+ (format "sec:%s"
  (org-export-get-reference headline info))

 (defun org-beamer--frame-level (headline info)
@@ -444,8 +444,9 @@ used as a communication channel."
  (or (string-match "\\(^\\|,\\)label="
beamer-opt)
  (string-match "allowframebreaks"
beamer-opt)))
   (list
-   (format "label=%s"
-   (org-beamer--get-label headline info)))
+   (let* ((label (org-beamer--get-label headline info))
+  (fmt (if (string-match ":" label)
"label={%s}" "label=%s")))
+ (format fmt label)))
  ;; Change options list into a string.
  (org-beamer--normalize-argument
   (mapconcat

This way, the org-beamer--get-label function always returns a label without
braces.
Check especially the regexp. I hope I haven't introduce bad matches.

When the frame with the label is written, braces are added if needed.

Regards,

Fabrice

2015-10-15 21:48 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > Oh! I got it.
> >
> > The problem is that beamer expects braces around a label with colon when
> > you setup the label
> > but *not when you ref it* :
> >
> > \begin{frame}[label={sec:orgheadline1}]{Frame 1}
> > bla bla bla bla bla bla bla bla bla bla bla bla
> > \end{frame}
> >
> > \againframe{sec:orgheadline1}
> >
> > The braces at setup are required by the keyval package which is used to
> > parse the options.
> > However, the label is called sec:orgheadline1 and not {sec:orgheadline1}.
> > But at the moment, ox-beamer outputs :
> >
> > \againframe{{sec:orgheadline1}}
> >
> > I fixed it unintentionally by using my own label without colon.
> >
> > So basically you need this:
> >
> > diff --git a/vendor/org-mode/lisp/ox-beamer.el
> > b/vendor/org-mode/lisp/ox-beamer.el
> > index 24dcf19..75b51df 100644
> > --- a/vendor/org-mode/lisp/ox-beamer.el
> > +++ b/vendor/org-mode/lisp/ox-beamer.el
> > @@ -621,7 +623,7 @@ as a communication channel."
> >  (org-export-resolve-id-link link
> > info
> >   ;; Now use user-defined label provided in TARGET
> >   ;; headline, or fallback to standard one.
> > - (format "{%s}" (org-beamer--get-label target
> > info)))
> > + (format "%s" (org-beamer--get-label target
> info)))
> > ;; Case 2: Creation of an appendix is requested.
> > ((equal environment "appendix")
> > (concat "\\appendix"
>
> Thanks for the debugging. Do you want to provide a patch against maint
> for this ? Note that your library needs to be updated.
>
> Regards,
>


Re: [O] ox-beamer and CUSTOM_ID

2015-10-15 Thread Fabrice Popineau
2015-10-15 10:37 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > At some point LaTeX reported an error on some frame heading.
> > I wrongly inferred it could be the label.
>
> It would be nice to investigate about this error, it it persists.
>
>
Beamer is very bad at reporting errors at their true origin.

Actually, I had 2 errors.

First all my Org->TeX files use Babel, and they doesn't seem to cope well
with colons in labels.
(org-lint even reports about it)
Unfortunately, the default naming scheme for internal labels is using
colons.
Hence I wanted to use my own labels.

(Actually, I don't understand what prevents "beamer 2015/01/05 3.36" to use
colons in
labels. I thought that this problem has been solved around beamer 3.30.)

The other error was elsewhere in the slide and it is a separate issue.
Actually I had A_{}_{i+1} somewhere. Unfortunately, it is quite easy to
enter such stuff
in Org mode with the right edit sequence (I need to pick this sequence and
report about it).
When the result is displayed (well, at least in my setup), you don't see
the double
subscript any more. It is displayed the same way A_{i+1} is.
You need to erase everything and retype it. Or turn off the sub/superscript
option (?).

Anyway, now "ox-beamer" should obey to `org-latex-prefer-user-labels'
> for custom ID.
>

Thanks!

Regards,

Fabrice


Re: [O] ox-beamer and CUSTOM_ID

2015-10-15 Thread Fabrice Popineau
2015-10-15 18:54 GMT+02:00 Fabrice Popineau <fabrice.popin...@gmail.com>:

>
>
> 2015-10-15 10:37 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:
>
>> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>>
>> > At some point LaTeX reported an error on some frame heading.
>> > I wrongly inferred it could be the label.
>>
>> It would be nice to investigate about this error, it it persists.
>>
>>
> Beamer is very bad at reporting errors at their true origin.
>
> Actually, I had 2 errors.
>
> First all my Org->TeX files use Babel, and they doesn't seem to cope well
> with colons in labels.
> (org-lint even reports about it)
> Unfortunately, the default naming scheme for internal labels is using
> colons.
> Hence I wanted to use my own labels.
>
> (Actually, I don't understand what prevents "beamer 2015/01/05 3.36" to
> use colons in
> labels. I thought that this problem has been solved around beamer 3.30.)
>

Oh! I got it.

The problem is that beamer expects braces around a label with colon when
you setup the label
but *not when you ref it* :

\begin{frame}[label={sec:orgheadline1}]{Frame 1}
bla bla bla bla bla bla bla bla bla bla bla bla
\end{frame}

\againframe{sec:orgheadline1}

The braces at setup are required by the keyval package which is used to
parse the options.
However, the label is called sec:orgheadline1 and not {sec:orgheadline1}.
But at the moment, ox-beamer outputs :

\againframe{{sec:orgheadline1}}

I fixed it unintentionally by using my own label without colon.

So basically you need this:

diff --git a/vendor/org-mode/lisp/ox-beamer.el
b/vendor/org-mode/lisp/ox-beamer.el
index 24dcf19..75b51df 100644
--- a/vendor/org-mode/lisp/ox-beamer.el
+++ b/vendor/org-mode/lisp/ox-beamer.el
@@ -621,7 +623,7 @@ as a communication channel."
 (org-export-resolve-id-link link
info
  ;; Now use user-defined label provided in TARGET
  ;; headline, or fallback to standard one.
- (format "{%s}" (org-beamer--get-label target
info)))
+ (format "%s" (org-beamer--get-label target info)))
;; Case 2: Creation of an appendix is requested.
((equal environment "appendix")
(concat "\\appendix"


Fabrice


Re: [O] ox-beamer and CUSTOM_ID

2015-10-14 Thread Fabrice Popineau
2015-10-14 0:18 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > This is a pity. Things would be more straightforward.
>
> Straightforward for what? Use againframes? Or force label?
>
>
Force label. Having to explicitly state it twice :

  * Frame 1
  :PROPERTIES:
  :CUSTOM_ID: foo
  :BEAMER_opt: label=foo
  :END:

is not exactly straightforward. The following (crude) patch would avoid it.

Anyway, the BEAMER_opt label= way of setting the label is not Org-y.

Regards,

Fabrice

diff --git a/vendor/org-mode/lisp/ox-beamer.el
b/vendor/org-mode/lisp/ox-beamer.el
index 24dcf19..cc8d241 100644
--- a/vendor/org-mode/lisp/ox-beamer.el
+++ b/vendor/org-mode/lisp/ox-beamer.el
@@ -333,11 +333,13 @@ INFO is a plist used as a communication channel.
 The value is either the label specified in \"BEAMER_opt\"
 property, or a fallback value built from headline's number.  This
 function assumes HEADLINE will be treated as a frame."
+  (if org-latex-prefer-user-labels
+  (org-element-property :CUSTOM_ID headline)
   (let ((opt (org-element-property :BEAMER_OPT headline)))
(if (and (stringp opt)
 (string-match "\\(?:^\\|,\\)label=\\(.*?\\)\\(?:$\\|,\\)"
opt))
(match-string 1 opt)
-  (format "{sec:%s}" (org-export-get-reference headline info)
+ (format "{sec:%s}" (org-export-get-reference headline info))

 (defun org-beamer--frame-level (headline info)
   "Return frame level in subtree containing HEADLINE.


Re: [O] ox-beamer and CUSTOM_ID

2015-10-14 Thread Fabrice Popineau
2015-10-14 13:57 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > 2015-10-14 0:18 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:
>
> I'm not opposed to something like it, but it is no longer related to
> againframe problem, isn't it?
>
>
Sure. I came to the problem because of againframe.


> Out of curiosity, why do you need to force a label?


At some point LaTeX reported an error on some frame heading.
I wrongly inferred it could be the label.
I tried to force my own one and I was surprised CUSTOM_ID was not honoured
as it is in other backends (html).

I switch between ox-beamer and ox-reveal at the moment.
Albeit beamer gives better looking result, it is too much time consuming.

Regards,

Fabrice


[O] ox-beamer and CUSTOM_ID

2015-10-13 Thread Fabrice Popineau
Hi,

Something I don't understand in ox-beamer.
I wanted to use the againframe feature.

I setup a CUSTOM_ID to foo on the first frame.

I use #foo as a BEAMER_REF in the againframe.

But ox-beamer insists in using its own generated label to refer to the
frame.
I trace it to org-beamer--get-label which looks only for label=%s in the
BEAMER_OPT property of the initial frame.
IMHO, it should look for a CUSTOM_ID too.
That would make it more consistent.

Am I missing something ?

Fabrice


Re: [O] ox-beamer and CUSTOM_ID

2015-10-13 Thread Fabrice Popineau
2015-10-13 21:50 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > 2015-10-13 21:26 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:
> >
> >> Hello,
> >>
> >> I don't understand the issue. BEAMER_REF: #foo generates the same
> >> internal reference as :CUSTOM_ID: foo, doesn't it?
> >>
> >>
> > My point is that you need to set :
> >
> > * Frame 1
> > :PROPERTIES:
> > :BEAMER_OPT: label=foo
> > :END:
> >
> > * Frame 2
> > :PROPERTIES:
> > :BEAMER_env: againframe
> > :BEAMER_ref: #foo
> > :END:
>
> If I try to export this file, I get an error:
>
>   user-error: Unable to resolve link: "foo"
>
> which is to be expected since :CUSTOM_ID: foo doesn't exist.
>
> > because if you use CUSTOM_ID in the first frame, the link is not
> > resolved.
>
> It should be. With the following document
>
>   * Frame 1
>   :PROPERTIES:
>   :CUSTOM_ID: foo
>   :END:
>
>   * Frame 2
>   :PROPERTIES:
>   :BEAMER_env: againframe
>   :BEAMER_ref: #foo
>   :END:
>
> I get
>
>   \begin{document}
>
>   \begin{frame}[label={sec:orgheadline1}]{Frame 1}
>   \end{frame}
>
>   \againframe{{sec:orgheadline1}}
>   \end{document}
>
> So, I'm still puzzled.


This time , I'm the one who is puzzled:
what is the point in naming the link "foo" and getting sec:orgheadline1
instead? :-)

If you add :BEAMER_OPT: label=foo
to the properties of the first frame, then you get the foo label.
But that doesn't seem very obvious to me. Why not taking directly the
CUSTOM_ID label ?

Fabrice


Re: [O] ox-beamer and CUSTOM_ID

2015-10-13 Thread Fabrice Popineau
2015-10-13 21:26 GMT+02:00 Nicolas Goaziou :

> Hello,
>
> I don't understand the issue. BEAMER_REF: #foo generates the same
> internal reference as :CUSTOM_ID: foo, doesn't it?
>
>
My point is that you need to set :

* Frame 1
:PROPERTIES:
:BEAMER_OPT: label=foo
:END:

* Frame 2
:PROPERTIES:
:BEAMER_env: againframe
:BEAMER_ref: #foo
:END:

because if you use CUSTOM_ID in the first frame, the link is not resolved.
The code at stake is :
ox-beamer:org-beamer-headline which calls ox-beamer:org-beamer--get-label
at line 624

Clearly, org-beamer--get-label doesn't make use of CUSTOM_ID.

It is a bit strange to have to use another way to set custom labels than a
CUSTOM_ID property.

Regards,

Fabrice


Re: [O] ox-beamer and CUSTOM_ID

2015-10-13 Thread Fabrice Popineau
2015-10-13 22:52 GMT+02:00 Nicolas Goaziou <m...@nicolasgoaziou.fr>:

> Fabrice Popineau <fabrice.popin...@gmail.com> writes:
>
> > This time , I'm the one who is puzzled:
> > what is the point in naming the link "foo" and getting sec:orgheadline1
> > instead? :-)
> >
> > If you add :BEAMER_OPT: label=foo
> > to the properties of the first frame, then you get the foo label.
> > But that doesn't seem very obvious to me. Why not taking directly the
> > CUSTOM_ID label ?
>
> Because CUSTOM_ID's value may contain forbidden characters in LaTeX,
> e.g., "%".


Oh ... thanks for this explanation. Speaking for myself, I would have
prefered to
take the risk to use forbidden characters in CUSTOM_ID.


> See also `org-latex-prefer-user-labels', which is not
> implemented in Beamer, since BEAMER_OPT can already force a value for
> label.
>

This is a pity. Things would be more straightforward.

Regards,

Fabrice


Re: [O] anyone syncing orgmode calendar with google cal, and if so how?

2015-10-05 Thread Fabrice Popineau
I have build a merge of elisp code from 2 people (org-gcal and
google-calendar) and enhanced it a little bit.
I can sync both ways from Emacs.
The code is ugly, so I won't publish it. But if anybody wants to clean it
up and make it more solid, I'll send it.

Fabrice

2015-10-05 19:45 GMT+02:00 Rainer M Krug <rai...@krugs.de>:

> Eric S Fraga <e.fr...@ucl.ac.uk> writes:
>
> > On Monday,  5 Oct 2015 at 09:46, Xebar Saram wrote:
> >> Hi all
> >>
> >> i was wondering if anyone was syncing orgmode calendar with google cal,
> and
> >> if so how? i tried this
> >
> > I sync org with Google's calendar using MobileOrg on my phone as the
> > intermediary.  Generally works quite well.  I would be using MobileOrg
> > regardless so calendar synchronisation is a very nice bonus.
>
> Interesting - Android or iOS? if iOS - I would like to know how you do
> it.
>
> Cheers,
>
> Rainer
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :   +33 - (0)9 53 10 27 44
> Cell:   +33 - (0)6 85 62 59 98
> Fax :   +33 - (0)9 58 10 27 44
>
> Fax (D):+49 - (0)3 21 21 25 22 44
>
> email:  rai...@krugs.de
>
> Skype:  RMkrug
>
> PGP: 0x0F52F982
>



-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Different set of packages for LaTeX export

2015-10-01 Thread Fabrice Popineau
2015-10-02 5:30 GMT+02:00 Manfred Lotz :

> On Thu, 01 Oct 2015 21:21:42 +0200
> Rasmus  wrote:
>
> > Hi Manfred,
> >
> > Manfred Lotz  writes:
> >
> > > When creating slides, i.e using beamer I get an option clash
> > > during compiling the tex file because beamer did already load
> > > hyperref.
> > >
> > > How can I solve it?
> > >
> > > Could I have a different package list if the class is beamer?
> >
> > No you can only discriminate based on the compiler version (and
> > actually only in ox-latex, not ox-beamer).
> >
>
> Hm, I think it would be great if a package list could be mapped to a
> certain LaTeX class.
>
>
To solve this, I set up my own LaTeX class. I find it at least as good as
to rely
on Org configuration. Actually, I removed the list of packages that Org is
exporting.
My LaTeX class can produce slides, course notes, exams and so on. Based on
options, I can chose which kind of document and a few things like the style
(font, etc.).

Fabrice


Re: [O] Outut file name by backend

2015-09-26 Thread Fabrice Popineau
Rasmus  gmx.us> writes:

> 
> Fabrice Popineau  gmail.com> writes:
> 
> > Hi,
> >
> > Could it be made possible that the output file name when exporting 
be
> > chosen by backend ?
> > Something like :
> >
> > :EXPORT_FILE_NAME: (by-backend (latex "PDFL2A/pdf/pdl2a.tex) (html
> > "PDFL2A/projets.html"))
> >
> > Am I missing another option here ?
> 
> Could you use ox-publish?

Possibly yes, I'm not sure.

Actually, I find it easier to write  a couple of elisp functions to 
export a bunch of org files as a web site. I handle my courses material 
this way. I have web pages (ox-html), slides (ox-reveal) and pdf files 
(ox-latex). Sometimes I would like to produce both a pdf file and an 
html file from the same org subtree.

When I will have time, I'll take a look at ox-publish again. In the 
meantime, I think that it would be more flexible to allow the exported
filename to be computed. OTOH, it is unsafe/unsecure.

Fabrice





Re: [O] Outut file name by backend

2015-09-26 Thread Fabrice Popineau
I must add that there is one difference between my setup and ox-publish : I
use PROPERTIES to
parametrize my exports in several ways. I create several html pages and pdf
files from subtrees.
These pages need some navigation to be defined and I collect it by scanning
the org  file. I assemble the menu for the
pages from this information. I'm not sure I could do that with ox-publish.

It seems that if the pub-dir variable is bound at the time of export, then
it is taken into account as
the export dir. However I find it by reading the code. I expect that it is
something that could change
over time.

Fabrice

2015-09-26 13:38 GMT+02:00 Fabrice Popineau <fabrice.popin...@gmail.com>:

> Rasmus  gmx.us> writes:
>
> >
> > Fabrice Popineau  gmail.com> writes:
> >
> > > Hi,
> > >
> > > Could it be made possible that the output file name when exporting
> be
> > > chosen by backend ?
> > > Something like :
> > >
> > > :EXPORT_FILE_NAME: (by-backend (latex "PDFL2A/pdf/pdl2a.tex) (html
> > > "PDFL2A/projets.html"))
> > >
> > > Am I missing another option here ?
> >
> > Could you use ox-publish?
>
> Possibly yes, I'm not sure.
>
> Actually, I find it easier to write  a couple of elisp functions to
> export a bunch of org files as a web site. I handle my courses material
> this way. I have web pages (ox-html), slides (ox-reveal) and pdf files
> (ox-latex). Sometimes I would like to produce both a pdf file and an
> html file from the same org subtree.
>
> When I will have time, I'll take a look at ox-publish again. In the
> meantime, I think that it would be more flexible to allow the exported
> filename to be computed. OTOH, it is unsafe/unsecure.
>
> Fabrice
>
>
>
>


[O] Outut file name by backend

2015-09-24 Thread Fabrice Popineau
Hi,

Could it be made possible that the output file name when exporting be
chosen by backend ?
Something like :

:EXPORT_FILE_NAME: (by-backend (latex "PDFL2A/pdf/pdl2a.tex) (html
"PDFL2A/projets.html"))

Am I missing another option here ?

Best regards,

Fabrice


Re: [O] A book produced using Org

2015-09-19 Thread Fabrice Popineau
I won't be long : very nice job !

Fabrice

2015-09-20 0:26 GMT+02:00 Vikas Rawal <vikasli...@agrarianresearch.org>:

> I am happy to share with fellow Orgers my recent book —  Ending
> Malnutrition: from commitment to action  — published by the Food and
> Agriculture Organisation of the United Nations, Rome and Tulika Books, New
> Delhi (http://www.fao.org/3/a-i4921e.pdf),  The book was written and
> produced entirely in Org.
>
> This would not have been possible without the terrific support provided by
> this community. Over the last few months, I have come to this mailing list
> with several queries about how to do something or the other, and people
> have very patiently provided solutions and suggestions.
>
> I would like to thank everyone for their patience and their support.
>
> Vikas
>
> 
>
> From acknowledgements of the book:
>
> In addition, for all the statistical work and writing, the authors relied
> on R ([[http://www.r-project.org][www.r-project.org]]), org ([[
> http://www.orgmode.org][www.orgmode.org]]),
> and LaTeX. All three are open source projects, freely made available by
> very vibrant communities of developers. During the course of the work, we
> often drew on support from these communities.
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] Exporting an org-file to multiple html pages

2015-09-01 Thread Fabrice Popineau
If you want a fancier solution : http://renard.github.io/o-blog-v2/
It works pretty well.

Fabrice

2015-09-01 11:07 GMT+02:00 Jarmo Hurri <jarmo.hu...@iki.fi>:

> Marcin Borkowski <mb...@mbork.pl> writes:
>
> >> I am writing a relatively extensive document in org, and I am
> >> currently trying to figure out how to split the exported html into
> >> multiple html pages.
>
> > Does this help?
> >
> > https://github.com/mbork/org-one-to-many
>
> Greetings Marcin.
>
> Looks inviting. The built-in html exporter desperately needs something
> like this.
>
> I have to be prepared to share my org-file(s) of this project with other
> people, so I am avoiding code outside the standard org distribution. Now
> if only that famous *someone* would incorporate your solution into the
> core.
>
> The one thing that would need to be added, if I understand your solution
> correctly, is an index and automatic links to index, prev, next etc.
>
> Thanks,
>
> Jarmo
>
>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Fabrice Popineau
On this thread, I will report quite a different user experience.
I have been a long time user of emacs and Gnus (Emacs since 1987).
I have been using (ding) Gnus under Windows NT in the late 90's and up to
about 2010.

But now, I process my mail using the GMail browser interface.
The reasons are mostly due to :
- emacs is slow, chrome displays email more precisely and more quickly
- emacs is not multi-threaded, hence it may get stuck processing stuff.
Using the browser to process mail allows me not to be disturbed when I'm
writing documents or programming using Emacs.

I'll keep and eye on the solutions that have been reported here though.

Best regards,

Fabrice


Re: [O] Block level specification for tex code html export method

2015-08-11 Thread Fabrice Popineau
2015-08-11 10:47 GMT+02:00 Haochen Xie haoch...@acm.org:

 Hi Andreas,

 Thank you for your reply. I've read the whole thread, and found your
 example (the second link) very useful. Although for some reason, SVG
 image is not working well on my machine (not being displayed in
 chrome, nor on IE. I don't have firefox installed), but since the SVG
 image generated by imagemagick is indeed a raster image, I don't see
 any benefit using SVG over PNG, and exporting to PNG works perfectly.


Use dvisvgm instead of imagemagick to generate the svg file.

Fabrice


  1   2   3   >