Re: [O] Bug: syntax highlighting in ox-odt and emacs26+ broken [9.1.2 (9.1.2-elpa @ /home/jay/Code/tmp/emacs/lisp/org/)]

2017-10-09 Thread Jay Kamat
Hi Tim,

> My recommendation would be to confirm if the problem exists in the org
> bundled with Emacs 26 (9.1.1) and if it is, report this on the emacs
> devel list, making it clear the issue does not exist with emacs
> 25.3. This will at least allow Emacs devel to note that something which
> it is changing is either buggy and needs more work or is an incompatible
> change for org (and possibly other modes) which will need to be
> added to the changes/News file and addressed by mode authors prior to 26
> being released.

This bug does indeed exist in the org bundled with emacs. Reporting this
to emacs-devel sounds like a good plan, and I'll do so in a couple days
to let anyone on the org mailing list have a chance to correct me if I'm
doing anything wrong on the org side. But I do agree this looks like a
bug in emacs core (even though I wansn't able to find the cause).

-Jay





Re: [O] Bug: syntax highlighting in ox-odt and emacs26+ broken [9.1.2 (9.1.2-elpa @ /home/jay/Code/tmp/emacs/lisp/org/)]

2017-10-09 Thread Tim Cross

I'm not an org developer, but I did notice a message on the emacs-devel
list a few days ago stating that Emacs 26 has updated to use org 9.1.1.

As Emacs 26 is a moving target and this problem does not appear in the
latest stable version i.e. 25.3, I would agree this is most likely due
to a change in emacs 26 and may indicate either a bug in Emacs 26 or an
incompatible change in Emacs 26 which may require changes to
org. However, I think it would be unwise to try and address the issue in
org until Emacs 26 is closer to a release as there is too high a chance
that any change we make to org will be undone by further refinements in
Emacs 26.

My recommendation would be to confirm if the problem exists in the org
bundled with Emacs 26 (9.1.1) and if it is, report this on the emacs
devel list, making it clear the issue does not exist with emacs
25.3. This will at least allow Emacs devel to note that something which
it is changing is either buggy and needs more work or is an incompatible
change for org (and possibly other modes) which will need to be
added to the changes/News file and addressed by mode authors prior to 26
being released.

Tim

Jay Kamat writes:

> Hi Everyone,
>
> I think 'francisv' from the #org-mode irc channel found a interesting
> bug in emacs or org mode. I don't know enough about emacs to figure out
> exactly what's going on, so I'll provide as much information as I'm able
> to find out.
>
> orgmode syntax highlighting when exporting to ox-odt in emacs 26 seems
> to be broken. This is not reproducible under emacs 25 at all. In
> addition, this seems to be dependent on which emacs is compiling org
> bytecode.
>
> Steps to Reproduce:
> 1. Compile Emacs *26* from source
> 2. Load an org file with the following (built-in org):
>
> #+BEGIN_SRC c
> int main() {
> return 0;
> }
> #+END_SRC
>
> 3. Export to odt via C-c C-e o o 
> 4. Open file in libreoffice
>
> Expected Results
>
> Syntax highlighting for the code block as in emacs25
>
> Actual Results
>
> Code seems to be colored in a single color, interestingly, this is *not*
> black.
>
> (I can provide screenshots if that would be helpful)
>
> After poking around, I found a bit more information on how to reproduce
> it:
>
> Environments with working syntax export:
> 1. Emacs25, always (unless unrelated errors are present)
> 2. Emacs26, when running org compiled with emacs 25 (from elpa/repo)
> 3. Emacs26, when running org 'interpreted' (not compiled to bytecode)
>
> Environments with broken syntax export:
> 1. Emacs26 when compiled from source, using builtin org
> 2. Emacs26 when org is compiled with Emacs 26 (from elpa/repo)
>
> I tested all emacs versions on org 0b83168465, changing which version
> org was compiled with by modifying the EMACS variable in local.mk in
> org. I also ran everything in ~emacs -Q~.
>
> I attempted to bisect emacs to find which change in emacs is causing
> this, bug I wasn't able to compile some older versions of emacs. I was
> able to find that it was '14 revisions away from 5f3379b338' but I don't
> know if that's helpful.
>
> A stackexchange question about this is here:
> https://emacs.stackexchange.com/questions/36023/how-to-export-babel-source-blocks-with-syntax-highlighting-to-odt-in-org-mode-in
>
> This is probably not a bug in org mode (but rather in emacs 26) but I
> wanted to post it here first to see if anyone had any idea what could be
> causing this. If this dosen't seem like an org bug, I'm happy to
> redirect it to emacs bug reports.
>
> Please let me know if anyone has any questions, and apologies if
> anything is wrong about this report.
>
> Emacs  : GNU Emacs 26.0.60 (build 5, x86_64-pc-linux-gnu, GTK+ Version 
> 3.22.11)
>  of 2017-10-07
> Package: Org mode version 9.1.2 (9.1.2-elpa @ 
> /home/jay/Code/tmp/emacs/lisp/org/)
>
> Thanks,
> -Jay


-- 
Tim Cross



[O] Bug: syntax highlighting in ox-odt and emacs26+ broken [9.1.2 (9.1.2-elpa @ /home/jay/Code/tmp/emacs/lisp/org/)]

2017-10-09 Thread Jay Kamat
Hi Everyone,

I think 'francisv' from the #org-mode irc channel found a interesting
bug in emacs or org mode. I don't know enough about emacs to figure out
exactly what's going on, so I'll provide as much information as I'm able
to find out.

orgmode syntax highlighting when exporting to ox-odt in emacs 26 seems
to be broken. This is not reproducible under emacs 25 at all. In
addition, this seems to be dependent on which emacs is compiling org
bytecode.

Steps to Reproduce:
1. Compile Emacs *26* from source
2. Load an org file with the following (built-in org):

#+BEGIN_SRC c
int main() {
return 0;
}
#+END_SRC

3. Export to odt via C-c C-e o o 
4. Open file in libreoffice

Expected Results

Syntax highlighting for the code block as in emacs25

Actual Results

Code seems to be colored in a single color, interestingly, this is *not*
black.

(I can provide screenshots if that would be helpful)

After poking around, I found a bit more information on how to reproduce
it:

Environments with working syntax export:
1. Emacs25, always (unless unrelated errors are present)
2. Emacs26, when running org compiled with emacs 25 (from elpa/repo)
3. Emacs26, when running org 'interpreted' (not compiled to bytecode)

Environments with broken syntax export:
1. Emacs26 when compiled from source, using builtin org
2. Emacs26 when org is compiled with Emacs 26 (from elpa/repo)

I tested all emacs versions on org 0b83168465, changing which version
org was compiled with by modifying the EMACS variable in local.mk in
org. I also ran everything in ~emacs -Q~.

I attempted to bisect emacs to find which change in emacs is causing
this, bug I wasn't able to compile some older versions of emacs. I was
able to find that it was '14 revisions away from 5f3379b338' but I don't
know if that's helpful.

A stackexchange question about this is here:
https://emacs.stackexchange.com/questions/36023/how-to-export-babel-source-blocks-with-syntax-highlighting-to-odt-in-org-mode-in

This is probably not a bug in org mode (but rather in emacs 26) but I
wanted to post it here first to see if anyone had any idea what could be
causing this. If this dosen't seem like an org bug, I'm happy to
redirect it to emacs bug reports.

Please let me know if anyone has any questions, and apologies if
anything is wrong about this report.

Emacs  : GNU Emacs 26.0.60 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-10-07
Package: Org mode version 9.1.2 (9.1.2-elpa @ 
/home/jay/Code/tmp/emacs/lisp/org/)

Thanks,
-Jay



[O] Fwd: Re: org-open-at-point fails on internal links

2017-10-09 Thread Kyle Meyer
[Forwarding because the list was dropped earlier in the thread but I
 didn't notice.  Scott, please don't drop the list in your replies.]

--- Begin Message ---
Scott Otterson  writes:

>   org-backward-paragraph()
>   org-inside-LaTeX-fragment-p()
>   org-footnote-in-valid-context-p()
>   org-footnote-at-reference-p()
>   ad-Advice-org-open-at-point

[...]

> org-mouse.el  (line 907) adds code to org-mode-hook, and that code adds
> advice to org-open-at-point, and that advice calls
> org-footnote-at-reference-p

Thanks for digging further.  Indeed org-mouse.el's advice would result
in the org-footnote-at-reference-p path being executed.

After loading org-mouse and using your example, I'm still not able to
trigger the error.  Could you debug org-backward-paragraph to find out
where the error is occurring?  You can do that by calling C-u C-M-x on
org-backward-paragraph or by evaluating

(edebug-instrument-function 'org-backward-paragraph)

-- 
Kyle
--- End Message ---


[O] Custom tag exportation - Agenda export?

2017-10-09 Thread Pierre-Luc Gauthier
Praying :
"Please let this first post of mine on this mailing list not be a duplicate…"

Hi there,

Is it possible to have agenda view templates to export a specific tag
hierarchy with all the usual org-export options (e.g.: title, toc,
LaTeX stuff, etc) ?

I have about 30 or so tags in org-tag-persistent-alist that I use in
hierarchy in most of my org file.
e.g. :
 ;; Errands
 (:startgrouptag)
 ("@Errands")
 (:grouptags)
 ("HardwareStore")
 ("GroceryStore")
 ("Bank")
 (:endgrouptag)


I also have about ten+ org files registered in org-agenda-files all of
them using those tags.

All of this is working fine and as expected.
e.g.: Being able to view all subtags of @Errands in my agenda view
which resembles : "Headlines with TAGS match: @Errands"

So my question is,
How can I export this tag filtered agenda view to, say a pdf with
LaTeX customizations and all that nice stuff.
The goal would be to be able to leave the house with a beautifully
typeset document containing all @Errands tagged headers *and* content?

If I use org-agenda-write and write a PDF file, I get basically the
same screen as my view, no content, just the headers and in a rather
crude layout.

I guess what I need (conceptually) is a way to get all headers having
said tag (or being a child of) be compiled in a file. Then I know all
the cool export stuff (e.g.: HTML, LaTeX, etc) will be accessible.

I hope I was clear enough.
Thanks for your help.
--
Pierre-Luc Gauthier



Re: [O] org-toggle-latex-fragment

2017-10-09 Thread Joseph Vidal-Rosset
Thanks Eric for your kind and smart help. I have understood, thanks to you,
what was my problem: in fact in my export settings, I mention some packages
that are useful only when I want to export into the smf class.
http://smf4.emath.fr/Publications/Formats/ that is a nice class to produce
beautiful papers. But these packages produce these strange images when they
are mentioned by default in the packages list.

I have to work on my configuration to solve this problem, and your emails
put me on the right way. Many thanks !

Jo.

2017-10-09 16:16 GMT+02:00 Eric S Fraga :

> Joseph,
>
> can you please post a minimal org example that leads to the strange
> image, including any configuration changes that you have made to include
> the appropriate LaTeX code?
>
> --
> : Eric S Fraga via Emacs 27.0.50, Org release_9.1.2-98-g0b8316-git
>


[O] org-clock-in only in current buffer

2017-10-09 Thread Julian M. Burgos
Dear org-moders,

Until a recent update (or an unintended change in my configuration), I
was able to clock in a task (org-clock-in) *without* org mode trying to
find open clocks.  I cannot figure out what changed, but now
org-clock-in opens all my agenda buffers searching for open clocks, which is 
not very convenient as I have dozens of agenda files.
What would be the best way to a) restrict the search of open clocks to
the current buffer, or b) turn off the search of open clocks?

Many thanks

Julian

--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Botnsjávarsviðs / Demersal Division
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.bur...@hafogvatn.is



Re: [O] org-open-at-point fails on internal links

2017-10-09 Thread Scott Otterson
> Scott Otterson  writes:
>
>> When I click on an internal link to an anchor, I get the error message:
>>
>> "Wrong type argument: number-or-marker-p"

The problem has something do do with org-mouse.el --  if I go to Emacs
customize "Org Modules" and uncheck:

"mouse:   Additional mouse support"

then links work and there's no error message.

Things seem to go wrong at org-mouse.el, which adds code to org-mode-hook,
and that code adds advice to org-open-at-point; the advice calls
org-footnote-at-reference-p, where the problem starts.

I don't know if the call to org-footnote-at-reference-p should be removed
from the advice, or if org-footnote-at-reference-p should be fixed.

Scott

On Sat, Oct 7, 2017 at 5:04 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Kyle Meyer  writes:
>
> > Hello,
> >
> > Scott Otterson  writes:
> >
> >> When I click on an internal link to an anchor, I get the error message:
> >>
> >> "Wrong type argument: number-or-marker-p"
> >>
> >> The same happens if I type C-c C-o on the link.  This is mapped
> >> to org-open-at-point, which should handle internal links.
> >
> > [...]
> >
> >> This behavior is new, I believe since the last org package update.  I'm
> >> currently on org mode version 9.1.2.
> >>
> >> -- Example Org File ---
> >>
> >> * headline 1
> >>   <>
> >> * headline 2
> >> *** [[Anchor 1]]  CLICK ON THIS
> >
> > FWIW I'm not able to reproduce this with 9.1.2.
>
> Ditto. Maybe a backtrace would help.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] org-toggle-latex-fragment

2017-10-09 Thread Eric S Fraga
Joseph,

can you please post a minimal org example that leads to the strange
image, including any configuration changes that you have made to include
the appropriate LaTeX code?

-- 
: Eric S Fraga via Emacs 27.0.50, Org release_9.1.2-98-g0b8316-git


signature.asc
Description: PGP signature


[O] Clocktable Naming

2017-10-09 Thread Shawn Way
Is there a method for automatically naming a timeclock?  For example,

:name table1

to be used in the #+BEGIN line?

This would allow the clocktable to be post processed using something like perl 
or python for in depth analysis.

SHAWN WAY, P.E.




Re: [O] Edit whole session with org-edit-src-edit

2017-10-09 Thread urkud
Hello,

On October 8, 2017 10:40:09 PM EDT, "Berry, Charles"  wrote:
>
>> On Oct 8, 2017, at 3:58 PM, Yury G. Kudryashov 
>wrote:
>> 
>> Hello,
>> 
>> I want to use orgmode for literate programming with Coq.
>> I like the "edit in major mode" org-edit-src-edit feature, but it
>> exports only the current src block to the temprorary buffer, so it's
>> impossible to debug the file in the temporary buffer using coq-mode
>> (proofgeneral) "phrase by phrase" execution.
>> 
>> I think that some other languages may have similar problems. Say,
>> code completion works better, if the whole file is available.
>
>
>I used the babel jump facility proposed here:
It doesn't help, if I want to debug a Coq proof using proofgeneral. I need to 
feed to coqtop all the text that should go before the current "phrase" in a 
file.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: [O] org-toggle-latex-fragment

2017-10-09 Thread Joseph Vidal-Rosset
Le lun.  09 oct. 2017 à  09:22:23 , Eric S  Fraga  a
envoyé ce message:
> On Monday,  9 Oct 2017 at 09:22, Joseph Vidal-Rosset wrote:
>> I sent two days ago this message to John Kitchin, because I am a
>> scimax user. I meet a problem with gnus when I want to export a png
>> image: the comment « 48=-plain definitionremarkplain » appears with
>> any png image, as with imagemagick and with dvipng either. John told
>> me that is probably an org-mode problem. Therefore I post my question
>> to the list.
>
> I found your email difficult to process.  Would you maybe please post a
> small example that illustrates what you wish to accomplish that is not
> working?

Example :

\[
\infer[^{\lnot E}]{\bot}{\lnot A & A}
\]


regards,
Joseph Vidal-Rosset


Re: [O] org-toggle-latex-fragment

2017-10-09 Thread Joseph Vidal-Rosset
Le lun.  09 oct. 2017 à  09:22:23 , Eric S  Fraga  a
envoyé ce message:
> On Monday,  9 Oct 2017 at 09:22, Joseph Vidal-Rosset wrote:
>> I sent two days ago this message to John Kitchin, because I am a
>> scimax user. I meet a problem with gnus when I want to export a png
>> image: the comment « 48=-plain definitionremarkplain » appears with
>> any png image, as with imagemagick and with dvipng either. John told
>> me that is probably an org-mode problem. Therefore I post my question
>> to the list.
>
> I found your email difficult to process.  Would you maybe please post a
> small example that illustrates what you wish to accomplish that is not
> working?

Sorry to be unclear. Here is my problem in gnus.  Suppose that I want to
post a formal  deduction for example in Gentzen style  via the proof.sty
code:

\[
\infer[^{\lnot E}]{\bot}{\lnot A & A}
\]


the  function org-toggle-latex-fragment  shows me  the image  that I  am
going to get in my email via org-mime-htmlize . But now, I get always an image 
that
preceded by  the words  "48=-plain definitionremarkplain"  and I  do not
know what in my emacs configuration is the cause of this
behavior. I send this  message first in plain text and  after in html to
show the problem. 

Thanks for your help !

regards,
Joseph Vidal-Rosset



Re: [O] [RFC] org-agenda: Jump directly to line in case of a timestamp

2017-10-09 Thread Alan Schmitt
On 2017-10-09 09:19, Eric S Fraga  writes:

> On Monday,  9 Oct 2017 at 08:54, Alan Schmitt wrote:
>> One thing I would really like is the timestamp behavior of
>> org-agenda-goto with the windows behavior of org-agenda-switch-to.
>
> You could "advise" the function?
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html

Yes, this is something I could do. Thanks for the suggestion.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-09: 403.38, 2016-09: 401.03


signature.asc
Description: PGP signature


Re: [O] org-toggle-latex-fragment

2017-10-09 Thread Eric S Fraga
On Monday,  9 Oct 2017 at 09:22, Joseph Vidal-Rosset wrote:
> I sent two days ago this message to John Kitchin, because I am a
> scimax user. I meet a problem with gnus when I want to export a png
> image: the comment « 48=-plain definitionremarkplain » appears with
> any png image, as with imagemagick and with dvipng either. John told
> me that is probably an org-mode problem. Therefore I post my question
> to the list.

I found your email difficult to process.  Would you maybe please post a
small example that illustrates what you wish to accomplish that is not
working?

-- 
: Eric S Fraga via Emacs 27.0.50, Org release_9.1.1-87-g3c83f1


signature.asc
Description: PGP signature


Re: [O] [RFC] org-agenda: Jump directly to line in case of a timestamp

2017-10-09 Thread Eric S Fraga
On Monday,  9 Oct 2017 at 08:54, Alan Schmitt wrote:
> One thing I would really like is the timestamp behavior of
> org-agenda-goto with the windows behavior of org-agenda-switch-to.

You could "advise" the function?
https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html
-- 
: Eric S Fraga via Emacs 27.0.50, Org release_9.1.1-87-g3c83f1


signature.asc
Description: PGP signature


[O] org-export and open odt files always opened in emacs

2017-10-09 Thread Amos Bird

Greetings!

I'm trying to export and open odt files outside emacs. I've set

#+BEGIN_SRC elisp
 (setq org-file-apps
   `(("\\.org$" . emacs)
 ("\\.cpp$" . emacs)
 (t . ,(cond (IS-MAC "open -R \"%s\"")
 (IS-LINUX "xdg-open \"%s\"")
#+END_SRC

However exported files are still opened inside emacs. What can I 
do?


regards,
Amos


[O] org-toggle-latex-fragment

2017-10-09 Thread Joseph Vidal-Rosset



regards,
Joseph Vidal-Rosset


Re: [O] [RFC] org-agenda: Jump directly to line in case of a timestamp

2017-10-09 Thread Alan Schmitt
Hello,

On 2017-10-07 22:23, Matt Lundin  writes:

> The only difference, if I remember correctly, is that
> org-agenda-switch-to replaces the agenda buffer with the target org
> buffer, whereas org-agenda-goto shows the target org buffer in another
> window. 

One thing I would really like is the timestamp behavior of
org-agenda-goto with the windows behavior of org-agenda-switch-to.

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-09: 403.38, 2016-09: 401.03


signature.asc
Description: PGP signature