Re: First steps exporting to tex

2021-04-03 Thread Martin Steffen
>>>>> "Ypo" == Ypo   writes:

Ypo> Good morning

Ypo> After reading your interesting advices, I've decided to start
Ypo> my path through LaTeX. I have been some hours trying to start,
Ypo> with little result, but I hope that once established a
Ypo> *workflow* the results will come and the new invested time will
Ypo> be directed just to get better and better results.

Ypo> My doubts:

Ypo>  a. As first step for my workflow, it seems convenient to use a
Ypo> "template" with the LaTeX preambles. So maybe the many existing







Ypo> LaTeX templates can be used quickly with orgmode. I found
Ypo> several options and opinions. Which one is the best way?

I say my advice as a "LaTeX-first" person (i.e., I was familiar with
LaTeX before org was around. When I discovered org, which I found
useful in many ways, so I tried to familiarize myself also to find out
how I could make it useful in tandem with latex.

So, for me, stuff that works well in LaTeX, I did not port for myself to
org, things where org helps me to make better use of latex, I tried to
figure out.

For you, being familiar with org, but not (yet) with latex, you may
follow different patterns.

For the "preamble" of a latex document, the general setup that comes
_before_ \begin{document} and before any output is generated, I use
native latex using  instructions like

#+latex_header: \input{switches}
#+latex_header: \input{preamble}
#+latex_header: \input{style/style-common}
#+latex_header: \input{macros}

I often separate the preamble from macros. preamble.tex is (for me) the
file which contains loading of packages and classes (usepackage  etc,
and corresponding adapations or settings for that package). macros.tex is
things I define using \newcommand (or \def or \newenvironment or
similar)


As far controlling input is concerned, I also rely on latex-specific
setting (outside org, also outside emacs), things like environment
settings like $TEXINPUT, a path-specification, where one can control
where LaTeX finds (additional) stylefiles, outside of the standard
``load-path''.

Thus, I often try to avoid to use hardcoded things, like

>>> \input{~//export//template.tex}

I would use \input{template} (".tex" is not needed) and I make sure, the
templatex.tex file is included in the $TEXINPUTS-path. Typically, the
current directory "./"  should be included by default (and stuff from
the latex-installation is also routinely found)

BTW: also when working with pics (with includegraphs), there is a
variable (inside latex) that controls where to find figures. So, what I
typically would to is things like

\usepackage{graphicx}
\graphicspath{{./figures/}}   

That specifies that the pics for \includegrapic are found in a direcory
figures, and then I would use

\includegraphics[width=4cm]{jpgfigure}

not jpgfigure.jpg; \includegraphics can figure it out, if it's a PDF or
a jpg; it would also chose ps, if you don't use pdflatex, but latex (I
still prefer the xdvi-viewer as faster and more fluent to navigate, I
never like any PDF viewer when doing latex, only at the end, I generate
the PDF).


One can of course ``inline'' all that inside org (like doing a
\newcommand inside ``org'', it's just I prefer to keep all the stuff in
one (or more) latex files; for those parts I rely on latex (since org
does not bring much additional value to the table for the premable
stuff, at least for me)

Martin









Ypo> 1 #+SETUPFILE: template.setup -> doesn't seem the ideal way,
Ypo> because the template.setup file must be modified adding
Ypo> #+latex_class to each of the lines.  2 template.tex -> this
Ypo> could be added to the SETUPFILE: #+LATEX_HEADER:
Ypo> \input{template.tex}. But it seems to have no effect on the PDF
Ypo> output. BTW, I can't use emacs HOME path (~/) in the input
Ypo> header, like \input{~//export//template.tex}. This is my
Ypo> template.tex file content: \usepackage{fancyhdr}
Ypo> \thispagestyle{fancy}
Ypo> \lhead{\includegraphics[width=4cm]{jpg.jpg}} \rhead{Student
Ypo> Name: Name\\ Student ID: 1234\\ Course: IDB 601 (Fall 2020)} 3
Ypo> Another friend told me that .sty templates were the best way.
Ypo> 4 I see some people that create customized LaTeX classes and
Ypo> add the desired class to the orgmode buffer.  5 Also we can see
Ypo> this intricate transformation of a LaTeX template into
Ypo> orgmode. How to Migrate LaTeX Template into org-mode 6 ...

Ypo>  b. I think that in a good integration, every character shown
Ypo> on orgmode should be exported into the PDF output. For example
Ypo> "CENTRE LINE SYMBOL": ℄ How can this integration be done?

Ypo>  I have more doubts, but I will keep reading and trying to
Ypo> solve them

Ypo>  Best regards




Re: About exporting

2021-03-31 Thread Martin Steffen
>>>>> "Eric" == Eric S Fraga  writes:

Eric> On Tuesday, 30 Mar 2021 at 17:44, Juan Manuel Macías wrote:
>> However, *I would not recommend anyone to use LaTeX for
>> writing*. A light markup language is more comfortable and
>> efficient for me.

Eric> Totally agree!  Although, over the years, I have written many
Eric> papers in LaTeX directly, in the past decade I have
Eric> increasingly relied on org as the writing tool.  It imposes
Eric> much less friction on the creative process and, as you say, it
Eric> enables better management of the writing task.  And, as it
Eric> gives direct access to LaTeX when necessary, you lose nothing
Eric> by writing in org.

I would not go so far as not recommend latex (over org) for _anyone_ at
all. I for my part will stick with latex for a certain documents; for
others, org is better (has to do with the mentioned creative process,
and other advantages).


However, I write papers heavy in  math-notation (in the more theoretical
corners of conmputer science). There is a lot of math discplay (and I
like to rely heavily on macros etc).

For me, part of the preference of latex is the ratio between math and
similar things over ``text''. a blog-like text (not heavy on math), or a
note, or a wiki-like document etc, all that's great with org.

For math-typesetting, that's less of a ``creative flow of ideas
thing''. Of course, as having been mentioned, I can always escape to
latex inline or for displays etc. And I can also import my
macro-definitions etc (and I do that).

But actually, when typing, I think I am faster in latex. There are a
couple of features, I like (and my muscle-memory of my fingers rely in
them) in latex-modes of emacs.

Tab completion for environments and macros, remembering the last
environments I used, support of bibtex (like also completion or showing
the reference). Indentention of environments plus highlighting. And last
not least; if I ``compile'' the document (firing off latex, bibtex, or
index or whatever), the compilation runs in the background. As far as I
do that in org (exporting to pdf), it blocks emacs. Not that it's a
huge  delay even, at least for smaller documents, I hate that an editor
or some tool is slower than me, it gets on my nerves if the computer
slows me down. And there is a final thing which (for me) seem to work
better in latex-mode compared to org. That's jumping to the ``next
error'' with some key stroke. That's important,  LaTeX's own error
output it quite poor, but jumping to error locations is vital.


I would not be surprised if some of that is somehow supported by org as
well (for TeX), only I have not figured it out, or perhaps I was too
lazy to figure it out how. Too lazy because LateX mode works for me fine
even for challenging and long documents (where for simpler ones or where
the focus is not on typesetting org works).

Martin






Eric> And *tables*!  Enough said. :-)

Eric> But, as always, YMMV.

Eric> -- : Eric S Fraga via Emacs 28.0.50, Org
Eric> release_9.4.4-254-g37749c




Re: About exporting

2021-03-30 Thread Martin Steffen
>>>>> "autofrettage" == autofrettage   writes:

autofrettage> Hi,


autofrettage> Not even the most streamlined DTP-wysiwyg-program is

I agree. I did not want to imply that. 
autofrettage> safe from this.  Far from. I even doubt typewritten
autofrettage> documents can be written colla- boratively, without
autofrettage> someone messing things up.

Also that is common (I wrote many publications collaboratively with
latex. One can mess up at every level (from the line where a revision
merge conflict occurs, to latex incompatibilities (though that's not a
big problem resp. one can get that under control) up to notational,
linguistic or ``semantic'' incompatibilities (section 4 contradicts
content-wise what has been written is section 3). None of that can (or
should) be prevented by any form of tool. it depends on communicating
with each other, using one's brain, and a few other qualities.


As far as LaTeX vs. org is concerned (for producing readable documents
in varying degree of requirements as far as the complexity of document
is concerned and the typesetting quality), in my experience it's as
follows: of course everything that can be done by latex can be done with
org (trivially). As far as collaboration is concerned, if you get more
experienced with latex (and learn from mistakes and get better making
use of it), you will somehow rely on provided classed and other things
offered (and making good use of macros etc), and not messing it up,
knowing better than latex how it should looks like. That may including
writing class files yourself or style files (and sharing them with your
collaborators), but with experience you get more "disciplined" (if you
are willing to follow that discipline).


Though one can do the same in org (to disipline oneself to avoid messing
up collaboratively working on a shared document), I simply think it's
harder.

Both latex and org gives you freedom whatever you do (and you can use it
to mess it up; and as you send, also in a restrictive DTP or a harsh
straightjacket of producing "text" by filling out many small web-forms,
each free-form text at most 200 characters, like in a web-questionnaire,
you still can mess it up).

I enjoy the freedom that editing latex (and the support given by emacs)
for the same reason I enjoy the freedom of org (and the support given
many org-packages).


The difference is, in latex I don't want to explore the freedom I have
(like messing up things that styles prepared from me, or write
{\Large\textbf{Chapter 1: \hspace{4mm} Introduction}} instead of using
the command \chapter{Introduction}. And this experience of NOT using
parts of the freedom is shared with between experienced latex users
(especially those that collaborate in a good way with latex together on
shared documents) In org, getting experienced with org for me leads me
doing more and more creative things.  I have one or two colleagues, they
do completely different things than me or do it completely differntly,
and that's fine. But it's not a basis for using org for collaboratively
writing books. Of course it's doable, but requires more
(self-)discipline. I have also seen people I collaborate with that do in
LaTeX things like {\Large\textbf{Chapter 1: \hspace{4mm} Introduction}},
though this are either beginners (if they stick to this for them
established use of how to write LaTeX, makes a text-based collaboration
not useful for me On can still talk things through etc but not write
a common text :-))

In my experience, ith latex, it's possible to write text together for
well-intended people. Publishing houses tell you ``these are the classes
and style files (among perhaps others) that you _have_ to use, and also
do the following...''  (same possible for wisiwyg-editors, I assume),
and if you don't mess that up (like overwriting the defaults) you have a
chance to get a uniformely looking output (and on a halfway portable
platform, like a CTAN compatible latex installation). I cannot imagine
that publishers would prescibe ``this is the org-settings and features
you as author must to use to publish with us''.

Org (for the discussed usecase of exporting documents) is just a way to
produce LaTeX, latex takes care of portability and can assist with
uniformity and quality of type setting, but org intends (many) other
(useful) things.

Martin










autofrettage> There should be something like pilot licences for
autofrettage> using certain computer tools, not to speak about
autofrettage> programming, but let's not sink into squabbles about
autofrettage> that...

autofrettage> cheers Rasmus



Re: About exporting

2021-03-30 Thread Martin Steffen



Hi, here's my angle (which works for myself) how I use org-exporting in
connection with doing documents (I use in the meantime also org to
export as input for jekyll to produce HTML, but that's a different use,
the heavy lifting there is done in jekyll).


I am a LaTeX user since quite some time (also a bit TeX and texinfo)
ever since students. For LaTeX, I consider myself close to carrying a
black belt, maybe brown :-), for TeX and texi it's more dabbling (actually
for texinfo, I in the meantime use org and export to texinfo)

My (academic) environment and my field encourages use of LaTeX, that or
at least tolerates it; there are colleagues not to mention the
administration, who never would consider touching something
"unprofessional" like LaTeX, not mention org


Evern since I picked up org, I use org also to produce LaTeX. Often
diferent versions of Latex-src from the same org file. Sometimes LaTeX +
HTML side by side, sometimes ODT.

For ODT, it's often that someone forces me to ``it must be doc-file''
(or docx), because for some document and "doc-file" is synonymous.


The more the use-case for the document is proper typesetting /and
nothing else/, so the focus is on one single typeset output, the more I
simply work in LaTeX only. I have the feelinga it's faster, and the
fancy stuff (macros, enviorinments, styles, classes), I rely on LaTeX's
facilities anyway, even if I use org as pre-stage.

If I have a multi-purpose use-case, I often use org, or actually, it's a
mixure. Still the fancy stuff (typesetting specification, macros,
environments) is done in latex. By multi-purpose, I for instance
mean I do for some courses. The slides are in LaTeX, which means, beamer
mode,and org supports that reasonably. A different version of the
"slides" contains more text (sentences, expanations, etc). So I export a
different version (different export tags).

Still some portions of the overall document are native LaTeX. those are
typically included (not ``inlined''), often formulas and math
definitions, one reason being that editing LaTeX is faster in that case
than editing that in org.

And a third version could be HTML for webpages etc.  Of course one can
have conditional text in LaTeX as well, but org is quite good in that as
well. One can export latex to html, but generating it from org is
better.


There is one case where I do _NOT_ use org for such documents (though I
use org basically most things I do), and that is

 collaborative editing,

working together on a document (maybe shared by git), at least with a
document of some amount of complexity and typesetting requirement.

Even if I know that some colleagues use org (very few only, though), I
have the distinct feeling it gives too much headaches. Org would work
fine, being text, so revisioning is easy.

However, it's TOO flexible. I do quite complex documents with org
(exporting to latex), but I am not sure how sure to make it reliably
work when working together with one or more persons, and how much
``debugging'' and headache it would take.  I for instance like to test
out new packages, have the newest org. For LaTeX, that seems mostly
unproblematic, for org, not sure.

And then comes the personal habits: One great thing is that org is
flexible and one can make use of useful ``workflows'' or conventions
that profitable for oneself, and one gets used to it, one can adapt, and
then I have extra packages and adaptations. I can handle that (because I
adapt that myself), but it may conflict with other people's fiddlings.

Of course, in latex you can fiddle endlessly as well; even if one has
agreed on common macros and class files and conventios, one can easily
mess it up (typically for novices, who start changing layout or
typesetting, injecting manual spacing etc). But in LaTeX it seems more
under control, the purpose is to provide uniform typesetting of text
documents, it allows you to imposes "discipline" on the format (if you
are willing to stick to the agreed style files etc) Org, on the other
hand, is not about "uniform, classy output", it's not about
"discipline", it offers freedom and encourages playing around with, and
people who like to work with org _like_ to play around with it and to
stuff with it that others did not though of.

That's why I have not dared to write challenging (latex) documents with
org collaboratively (complex documents alone, yes, simple documents
jointly, but not all)
[
Martin














>>>>> "Ypo" == Ypo   writes:

Ypo> Hi

Ypo> After some years of using orgmode, and exporting using its
Ypo> defaults, I would like to take a quality leap and find a way of
Ypo> exporting for life. My options: LaTeX, ODT, HTML.

Ypo> LaTeX: I can see some masters here that make professional
Ypo> books, and I have some friends that publish scientific papers
Ypo> using LaTeX. But, it looks li

Re: Problems while trying to load feature

2021-03-15 Thread Charles R (Charlie) Martin
This is a problem I’ve noticed as well. Now, I am a programmer — my code or
it’s descendants is still in the distribution — I do update org mode
regularly, and I get messages when I start up Emacs about Org mode files
that can’t be loaded. I wouldn’t be surprised if the cause is this
renaming. But honestly I stopped having time to hack emacs 30 years ago.
Wouldn’t it be desirable if changes that aren’t backward-compatible
included some kind of assistance for users?

On Mon, Mar 15, 2021 at 11:16 Nick Dokos  wrote:

> The renaming was e.g org-bbdb to ol-bbdb, *NOT* to ol-org-bbdb.
>
> Similarly for all the rest: you won't find any of them in any installation.
>
> --
> Nick
>
> "There are only two hard problems in computer science: cache
> invalidation, naming things, and off-by-one errors." -Martin Fowler
>
>
>


Bug: Clock date range with the enclosing markup <> are not fully supported [9.4.4 (9.4.4-27-gb712b9-elpaplus)]

2021-03-12 Thread Firmin Martin


I have manually changed a clock date range in a task's logbook using the
shortcut =C-c .= (org-time-stamp). It modified the Org timestamp to the
date I wanted, but changed the enclosing markup from [] to <>. I didn't
pay much attention on it as C-c C-c (org-ctrl-c-ctrl-c) updated
correctly the total time.

But it happens that the change from [] to <> markup is enough to let

- clock table
- org-agenda-columns' CLOCKSUM_T property

completely ignore the clock entry I modified. I tested that after
changing the enclosing markup from <> to [], everything works as
expected. BTW, org-lint reports nothing on this.

Below is a minimal not working example.

1. In ~/test.org, put the following content.

* TODO Task
  SCHEDULED:<2021-03-13 sam. ++1d>
  :PROPERTIES:
  :Effort:   1:00
  :LAST_REPEAT: [2021-03-12 ven. 12:39]
  :END:
  :LOGBOOK:
  - State "DONE"   from "TODO"   [2021-03-12 ven. 12:39]
  CLOCK: <2021-03-12 ven. 09:15>--<2021-03-12 ven. 12:15> =>  3:00
  :END:

2. Insert the dynamic clock table and press C-c C-c on it

#+BEGIN: clocktable :scope ("~/test.org") :maxlevel 8 :block 2021-03-12
#+END:

the task does not show up. 

3. Put this file in your agenda files and set agenda columns 

(add-to-list org-agenda-files "~/test.org")
(setq org-columns-default-format-for-agenda "%50ITEM(Task) %2PRIORITY 
%10Effort(Effort){:} %10CLOCKSUM_T")

4. Now open org agenda in "columns mode"

(org-agenda-list)
(org-agenda-columns)

The task's CLOCKSUM_T field is empty.

5. Finally, replace the CLOCK property timestamp enclosing markup from <> to [] 
in
test.org. Try again 2. and 4.



Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
cairo version 1.16.0)
 of 2021-01-20
Package: Org mode version 9.4.4 (9.4.4-27-gb712b9-elpaplus)



Re: content management in emacs

2021-02-27 Thread Martin Steffen
>>>>> "Ian" == Ian Garmaise  writes:

Ian> Hi Bob,

Ian> How do you send mail to mailing lists with BBDB?  Do you use a

I am not sure about the question. If I send to an email list, it's an
address in BBDB. So I ``invoke'' BBDB (M-x bbdb) and give it the name of
the entry (say org-mode). That's analogous to send to a person: If you
remember the name (or part of the name), you find the entry, send then
compose an email ("m") on the entry.

Tab-completion may help.

If the question is: how do I send an email to all members of my chess
club or drinking buddies? If you have added some field to persons of
that circle (like "bridgeclub" or "drinkingbuddy", then you invoke bbdb
with that match, and then there is a possibility to send an email to
/all/ members of a matching list.


For phoning, I am not sure. I think there is (or was) a functionality to
initiate a call (probably with skype or ekiga or some such) but I never
used that.

Basically, for phoning, for me it's more like a rolodex, but a fast and
big one

Martin




Ian> templating tool?  Also, how do you start a phone call?

Ian> Ian

Ian>  Message: 28 Date: Sat, 27 Feb 2021 06:53:57 -1000 From: Bob
Ian> Newell  To: "emacs-orgmode"
Ian>  Subject: Re: contact management in
Ian> emacs Message-ID: 
Ian> Content-Type: text/plain

Ian>  I've used BBDB for years, and have tried org-contact, but it
Ian> didn't seem to scale to the now rather large size of my BBDB
Ian> database.

Ian>  I've looked at migrating to EBDB but as I have many custom
Ian> functions I haven't yet made the move.

Ian>  BBDB can do amazing things. I've mentioned some of them
Ian> before. Of course org links are supported, and in conjunction
Ian> with the 'gnorb' package, Gnus email can be associated with
Ian> BBDB entries in interesting ways.

Ian>  I use BBDB to easily maintain a slew of mailing lists. I also
Ian> have custom functions to set the input language mode for those
Ian> with whom I correspond in non-English languages. I even use
Ian> BBDB to initiate phone calls when I'm on my desktop computer.

Ian>  I hadn't thought to put BBDB under version control but that
Ian> would be very easy.

Ian>  However you don't need to get fancy right away. All the basics
Ian> are there. Like many things Emacs, it does take time to get
Ian> things set up the way you wish, but that time is well repaid
Ian> down the road a little.

Ian>  -- Bob Newell Honolulu, Hawai`i

Ian>  - Via GNU/Linux/Emacs/Gnus/BBDB

Ian>  End of Emacs-orgmode Digest, Vol 180, Issue 30
Ian> **

Ian> -- = Ian Garmaise Consultant Phorix Solutions Group
Ian> ia...@phorixsol.com Toronto cell: 416.432.2251 NYC:
Ian> 917.512.9535

Ian> https://www.linkedin.com/in/igarmaise/

Ian> http://www.PhorixSol.com




Re: contact management in emacs

2021-02-27 Thread Martin Steffen
>>>>> "Eric" == Eric S Fraga  writes:

Eric> How do you get these to appear?  Or is the "could" a wish?

It's ``automatic''. The entry of the person needs a field "anniversary",
if that's filled with a date in -mm-dd format, it's included
(perhaps one has to set a variable like ``show-bbdb-anniversaries''
and/or load a corresponding elisp-addition.)


Martin




Eric> thank you, eric -- : Eric S Fraga via Emacs 28.0.50, Org
Eric> release_9.4.4-231-gf46925




Re: contact management in emacs

2021-02-27 Thread Martin Steffen




I use bbdb (big-brother data base). I use it since a looong time
already, and amassed 15000 or so contracts. It does what I want, it's
text-based, so versioning is not a problem.

I think it can do vcard export (though when I used vcards is a long
time ago, I can't remember if that was smooth, I think it was with one
of my first smart phone, and I wanted to quick fill up the phone book
there with my ``emacs-managed'' contact data base.).

One can add used defined fields (where one can ``match'' all contacts
for some criterion, and send then ``bulk'' email.

Org is also bbdb-aware, insofar one can do those links: instead of
[[file:][yyy]] one can use [[bbdb:somecriterion]].

I don't know if it matches your needs, but I can't say bad things about
that bbdb-thing.

Martin





Re: In-Buffer LaTeX previews in org-mode

2021-01-12 Thread Martin Schöön
Fragtog?
https://github.com/io12/org-fragtog

Disclaimer: I have not managed to get it to work but then I have not tried
very hard.

/Martin


Re: Bug: LaTeX: inline maths expression in \textrm is not fully supported

2020-12-13 Thread Firmin Martin
> I think you may be expecting too much of org's simple inline LaTeX
> parser.  As soon as you have complex LaTeX, it's best to be explicit
> about it being LaTeX, e.g.:
>
> 1. @@latex:$A = \{n : \textrm{$n$ odd in $X$}\}$@@

Thank you for the advice! This does work for LaTeX export, but if one
would also want to export in HTML, the LaTeX expression is lost. I will
stay with the "multiple \textrm" solution for now. 

Best,

Firmin

Eric S Fraga  writes:

> On Sunday, 13 Dec 2020 at 02:30, Firmin Martin wrote:
>> Sometimes, we want to nest inline maths expression in \textrm to
>> handle spaces easily and avoid repetition.
>>
>> Examples:
>>
>> 1. $A = \{n : \textrm{$n$ odd in $X$}\}$
>
> I think you may be expecting too much of org's simple inline LaTeX
> parser.  As soon as you have complex LaTeX, it's best to be explicit
> about it being LaTeX, e.g.:
>
> 1. @@latex:$A = \{n : \textrm{$n$ odd in $X$}\}$@@
>
> HTH,
> eric
>
> -- 
> : Eric S Fraga via Emacs 28.0.50, Org release_9.4-160-g7c8dce



Bug: LaTeX: inline maths expression in \textrm is not fully supported

2020-12-12 Thread Firmin Martin
Sometimes, we want to nest inline maths expression in \textrm to
handle spaces easily and avoid repetition.

Examples:

1. $A = \{n : \textrm{$n$ odd in $X$}\}$
2. $A = \{n : \textrm{\(n\) odd in \(X\)}\}$
3. \(A = \{n : \textrm{\(n\) odd in \(X\)}\}\)
4. \(A = \{n : \textrm{$n$ odd in $X$}\}\)

are all equivalent to 

- $A = \{n : n \textrm{ odd  in } X}\}$

But Org mode exports them in LaTeX as 

\begin{enumerate}
\item \$A = $\backslash${n : \textrm{$n$ odd in $X$}$\backslash$}\$
\item \(A = \{n : \textrm{\(n\) odd in \(X\)}\}\)
\item \(A = \{n : \textrm{\(n\) odd in \(X\)\}$\backslash$}$\backslash$)
\item \(A = \{n : \textrm{$n$ odd in $X$}\}\)
\end{enumerate}

Namely, only cases 2. and 4., where nested maths delimiters are different
than the outer-most maths delimiters, are correctly exported.
On the other hand, Cases 1. and 3. introduced extra $\backslash$.

Interestingly, display style maths expressions are correctly exported.

5. $$A = \{n : \textrm{$n$ odd in $X$}\}$$
6. $$A = \{n : \textrm{\(n\) odd in \(X\)}\}$$
7. \[A = \{n : \textrm{\(n\) odd in \(X\)}\}\]
8. \[A = \{n : \textrm{$n$ odd in $X$}\}\]

exports to

\begin{enumerate}
\item $$A = \{n : \textrm{$n$ odd in $X$}\}$$
\item $$A = \{n : \textrm{\(n\) odd in \(X\)}\}$$
\item \[A = \{n : \textrm{\(n\) odd in \(X\)}\}\]
\item \[A = \{n : \textrm{$n$ odd in $X$}\}\]
\end{enumerate}

without extra $\backslash$.

Best,

Firmin

Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
cairo version 1.16.0) of 2020-10-16
Package: Org mode version 9.4 (9.4-55-g706ba9-elpaplus @ 
~/.emacs.d/elpa/org-20201207/)



Re: Bug: LaTeX inline maths expression \(+\) wrongly toggles strike-through face

2020-12-03 Thread Firmin Martin
Thank you Tomas, it works like a charm! Hope that it will be patched.

Best,

Firmin Martin



Bug: LaTeX inline maths expression \(+\) wrongly toggles strike-through face

2020-12-01 Thread Firmin Martin


Consider the following lines: 
- $+$ foobar $+$
- \[+\] foobar \[+\]
- $$+$$ foobar $$+$$
- \(+\) foobar \(+\)
Each of them is correct LaTeX inline/display maths expressions, but only the
  last one toggles strike-through face when it shouldn't. 

Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
cairo version 1.16.0)
 of 2020-10-16
Package: Org mode version 9.4 (9.4-53-gc97446-elpa)

Best,

Firmin Martin



S-left / S-right with (double) prefix C-u without scheduled time (only date)

2020-10-30 Thread Martin Rottensteiner
Hi list,

i often use shift with left or right arrow keys to change the date in
org-(super-)agenda. These key combinations can be used with prefix C-u and
double prefix C-u C-u.

In my setup in org 9.4 the behaviour is like this for a scheduled date
without scheduled time (for example SCHEDULED: <2020-10-27>:
C-u S-left: Date changes to date before (26th)
C-u S-right: Date does not change
C-u C-u S-left: Date changes to date before (26th)
C-u C-u: S-right: Date does not change

I would prefer this behaviour instead (my proposal):
C-u S-left: Add a default time (e.g. 6:00)
C-u S-right: Add a default time (e.g. 6:00)
C-u C-u S-left: Add a default time (e.g. 6:00)
C-u C-u: S-right: Add a default time (e.g. 6:00)

Scheduled date+time Timestamps can afterwards be changed as expected with
C-u prefix(es).

What I found out until now:
( org-schedule nil "12:00" ) adds a time 12:00 to a SCHEDULED date property.
(if (< (length (org-entry-get nil "SCHEDULED")) 16) (print
'scheduled_time_missing) (print 'scheduled_time_existent))
org-timestamp-has-time-p: could maybe better be used instead for finding
out if time is not present.

I think this would be a better default behaviour or the current behaviour
might even be a bug.

   Thanks, Martin :)


Re: preserving (zero-space) indenting in begin_src when exporting/publishing (to mark-down)

2020-10-28 Thread Martin Steffen



Great, thanks, That was it. It never occured to me that it's not
begin_src that I wanted, I just tried to tweak that one.

So, indeed:  #+begin_export markdown etc. is exactly what I need.

Thanks again.

Martin
>>>>> "Julius" == Julius Dittmar  writes:

Julius> Hi Martin,

Julius> if I understand correctly, you do not want to have a section
Julius> that quotes source code, but literal source code.




preserving (zero-space) indenting in begin_src when exporting/publishing (to mark-down)

2020-10-28 Thread Martin Steffen



Hi,

I have troubles to export (or publish) some orgfiles, which contain
``src'' snippets intended for markdown. The (for me) unwelcome behavior
is the same for org-export and org-publish, I guess, since it has the
same core reason.

The problem currently for me is for the markdown format. I have seen
similar behavior for other exports, though did not care since it for
those situations, it was/is ``good enough''. Now, however, I do some
export to md, to be used for Jekyll webpages, and it's no longer good
enough.

For concreteness sake: I got some section


#+begin_src markdown
---
layout: default
title: Some Title
description: Some information
---
#+end_src


which is exported to md literally, but with 4 leading spaces as
indentation, like

---
layout: default
title: Some Title
description: Some information
---

That's insofar unwelcome, as Jekyll wants those pieces of information
without indentation.

Alright, that's the situation, and the question is:

  is there a way to get rid of that

(during org-exporting/publishing, of course, not just post-processing
the md file).

This is what I tried so far. There are some variables one can tweak

1) org-src--preserve-indentation 
2) org-src-preserve-indentation 
3) org-edit-src-content-indentation

I set the 1) and 2) to "t" (also locally to the file to export). For 3),
the docs state it's about

  "Indentation for the content of a source code block."


So that sounded like it had something to do with my issue. Actually, the
original value was 2, and I set it to 0. There was no effect, the
indentation, when doing export, is still 4, as it was before setting
that to 0.


Any ideas? Thanks, Martin











Interview with Rainer König - who's content made me go from vim to emacs for coding :D

2020-10-21 Thread Martin Schröder
Today I had the chance to do a lengthy interview with Rainer König who is
known for creating a very popular Org Mode course.

The first part is about how Rainer got started and the story of how Org
Mode saved his life during a very difficult time:
https://www.youtube.com/watch?v=L_DYO0_eJ6A

In the second part of the interview we look at how Rainer manages his org
mode setup with multiple files and weekly reviews. Rainer is tremendously
methodical and a really good teacher.

Here is the recording of the second part:
https://www.youtube.com/watch?v=kPKhS-QDn7c

Enjoy!

-- 
Best regards,

*Martin Schröder*
*Embedded Systems Consultant, Firmware Expert*

Tel: +46-733-38-76-94
LinkedIn: https://www.linkedin.com/in/martinschroder/

*Learn How To Build Embedded Products From Step 1 to Step 90:*
https://swedishembedded.com/learn/


Re: Bug: Incorrect done TODO keywords highlighting in column view

2020-10-18 Thread Martin Kampas
Hi Kyle,

You are right, I completely forgot about columns view under the "regular" 
buffers. 
Updated patch below.

BR,
Martin

>From 288c157ea95e00de4b508e0fd257b51857e097b9 Mon Sep 17 00:00:00 2001
From: Martin Kampas 
Date: Mon, 19 Oct 2020 07:22:57 +0200
Subject: [PATCH] org-colview: Fix done keywords highlighting in agenda buffers

* lisp/org-colview.el (org-agenda-columns): Populate
org-done-keywords from org-done-keywords-for-agenda or the done keywords
will use the same face as those not-done.
---
 lisp/org-colview.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index e50a4d7c8..565bdb2dd 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1586,6 +1586,7 @@ PARAMS is a property list of parameters:
   (move-marker org-columns-begin-marker (point))
 (setq org-columns-begin-marker (point-marker)))
   (let* ((org-columns--time (float-time))
+(org-done-keywords org-done-keywords-for-agenda)
 (fmt
  (cond
   ((bound-and-true-p org-overriding-columns-format))
-- 
2.28.0




Bug: Incorrect done TODO keywords highlighting in column view

2020-10-08 Thread Martin Kampas
Hi,

In columns view, all TODO keywords except those with face set explicitly with 
org-todo-
keyword-faces are red. Done keywords should be green.

Patch below.

BR,
Martin

>From a4df0da1057afbe90ea0e457158082b15386a164 Mon Sep 17 00:00:00 2001
From: Martin Kampas 
Date: Fri, 9 Oct 2020 07:43:17 +0200
Subject: [PATCH] org-colview: Fix done TODO keywords highlighting

* lisp/org-colview.el (org-columns--overlay-text): Populate
org-done-keywords from org-done-keywords-for-agenda or the done keywords
will use the same face as not-done keywords.
---
 lisp/org-colview.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index e50a4d7c8..827f57e5e 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -365,7 +365,9 @@ ORIGINAL is the real string, i.e., before it is modified by
   org-tags-special-faces-re
   (lambda (m) (propertize m 'face (org-get-tag-face m)))
   v nil nil 1)))
-  ("TODO" (propertize v 'face (org-get-todo-face original)))
+  ("TODO"
+   (let ((org-done-keywords org-done-keywords-for-agenda))
+ (propertize v 'face (org-get-todo-face original
   (_ v)
 
 (defvar org-columns-header-line-remap nil
-- 
2.28.0




Re: Website revamp?

2020-09-05 Thread Martin Schöön
On Fri, 4 Sep 2020 at 11:37, Bastien  wrote:

> Hi Timothy,
>
> TEC  writes:
>
> > If you haven't already please give my revamp project a look:
> > http://orgmode.tecosaur.com, and let me know if you've got any feedback
> > or suggestions.
>
> Sorry for being so late in commenting but here are my two cents:

* Nice, 'modern' look and feel.
* Code examples are over-sized. I think they should be smaller and yet
would not be hard to read. Disclaimer: I have only tried your work on my
Linux desk-top computer and its 24 inch screen.
* The link to the documentation is a one-way link. I have to use the 'back'
functionality of my browser to get back to the main site.

That's all for now. I have not had time for anything ambitious such as
proof reading the text.

-- 
Martin Schöön

http://hem.bredband.net/b262106/index.html


Re: Asynchronous LaTeX Preview

2020-05-27 Thread Martin Schöön
org-fragtog maybe?
https://github.com/io12/org-fragtog
(I have not managed to make it work myself but I haven't tried hard.)

/Martin

On Wed, 27 May 2020 at 08:21, Faye Jackson 
wrote:

> Hi!
>
> I think the subject of the post says it all. While using org-mode I often
> have a lot of LaTeX fragments scattered in my documents for mathematics,
> and I typically use the startup functionality to load all those previews
> when a file is loaded.
>
> Due to this, I'd be really interested in seeing an option to make that
> process asynchronous, so that it doesn't block me while I'm trying to view
> a document. I looked into doing this using emacs-async and emacs advice,
> but the org-mode project is fairly complex and this seems like a feature
> that would be nice to include by default.
>
> Thanks,
>
> -- Fay


Re: Bug: open pdfview link causes severe memory allocation

2020-05-01 Thread Firmin Martin


> 1. Follow a *file link* doesn't open pdf with pdfview mode anymore,
>instead, it opens the pdf using the default system's pdf reader. 
> 2. Open *pdfview link* now causes severe memory allocation which freezes
>quickly my PC. 

I found the reason behind it: I was trying to open a djvu. By default, a
djvu is opened by my system's pdf reader. So, the first point is fine.

> N.B. I just noticed that there is a relatively new package
>  "org-pdftools" which may fix this behavior. But this is a severe bug
>  that shouldn't happen.

But the second point is still relevant. I reported this issue to
~org-pdftools~ which inherit the issue from the unmaintained ~org-pdfview~ :

https://github.com/fuxialexander/org-pdftools/issues/35

Best,

Firmin Martin



Bug: open pdfview link causes severe memory allocation [9.3.6 (9.3.6-60-gf3c137-elpaplus @ /home/firmart/.emacs.d/elpa/org-plus-contrib-20200427/)]

2020-05-01 Thread Firmin Martin
Hello,

After a package update (especially org-mode and pdf-tools), I remark two
changes about *pdfview links* :

1. Follow a *file link* doesn't open pdf with pdfview mode anymore,
   instead, it opens the pdf using the default system's pdf reader. 
2. Open *pdfview link* now causes severe memory allocation which freezes
   quickly my PC. 

I tested if it's pdftools issue, but it's not: editing a pdf opens
successfully the pdf with pdfview mode.

Emacs: GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.8, cairo 
version 1.16.0) of 2020-01-13
Packages:
- Org mode version 9.3.6 (9.3.6-60-gf3c137-elpaplus @ 
/home/firmart/.emacs.d/elpa/org-plus-contrib-20200427/)
- pdf-tools version: 20200427.2136
- org-pdfview version: 20180225.1006

N.B. I just noticed that there is a relatively new package
 "org-pdftools" which may fix this behavior. But this is a severe bug
 that shouldn't happen.  

Best,

Firmin Martin



modify frame title in beamer export

2020-04-05 Thread Gürtler , Martin

Hi,

I'd like to modify the frame title in beamer export based on
properties or priority as this is possible in latex export.

In latex export, one can set the variable
org-latex-format-headline-function to the name of a function that
creates the content of the headline. I was able to use this in
latex export.

As beamer export is derived from latex export I had hoped that 
this

would automatically work for beamer export as well, but this
is not the case, the headlines in beamer export are not modified.

A second question is, whether one could also use properties to
format the headlines. The arguments of the user supplied function
include tags, but not properties. 


Thanks,

Martin


signature.asc
Description: PGP signature


Bug: Effort prompt write malformed input in agenda file even after reporting the error [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.3/lisp/org/)]

2019-11-09 Thread Firmin Martin


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


In the agenda buffer, I've called the `org-set-effort` function
with the `e` key, and input "-" which is malformed. I did receive
an error `Invalid duration format: "-"`, but the "-" has still been
written in the entry as an effort property.

As a consequence of this bug, opening the agenda buffer raise again
the error `Invalid duration format: "-"` which results that the agenda
buffer cannot be opened. The malformed line  

 :Effort:   -

can only be found by a dichotomic search which is quite annoying.
For a similar issue, see here

https://emacs.stackexchange.com/questions/36111/invalid-duration-format-org-agenda/53637#53637

Maybe other functions have the same behavior (writing
malformed value on the agenda even after reporting the error).


Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.8)
 of 2019-10-22
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/local/share/emacs/26.3/lisp/org/)




[O] beamer export: misplaced \end{frame} with \lecture structure

2019-10-14 Thread Gürtler , Martin
Hi,

I was trying to use the \lecture command in latex to structure my lecture.

As org-modeis not able to convert , say, first-level headlines into
\lecture statements, I placed the \lecture statement directly before
first level headlines. Unfortunately,in the resulting tex document, the
\end{frame} statement appears only after the \lecture statement. So, in
the resulting pdf, the information about a new lecture (which is created
from a \AtBeginLecture macro) appears as part of the last slide of the
previous lecture and not as a new frame.

1. What can I do in the org mode file in order to enforce ending the
  frame before the \lecture statement.
2. Would anybody be willing to implement \lecture and maybe \part in the
  exporter?

Thanks a lot

Martin Gürtler
-- 
  Prof. Dr. rer. nat. Martin Gürtler
 Professur für Produktions- und Logistiksysteme
  H T W K Leipzig,  Fakultät Ingenieurwissenschaften
 Inst. f. Technologie und Produktion im Maschinenbau
 Tel. +49-341-3076 4129
 - Besucher -   - Post -
 Büro N234 (Nieper-Bau) PF 30 11 66
 Karl-Liebknecht-Str. 134   04251 Leipzig
 04277 Leipzig

[O] Specifying ATTR_HTML class for source blocks

2019-10-03 Thread Martin G . Skjæveland

Hi all,

I would like my source blocks to be exported to HTML as textareas with a 
class attribute -- so I can later use this in my javascript code. I can 
use ":textarea t" [1], but it seems that other attributes except width 
and height are ignored:


#+ATTR_HTML: :textarea t :class testing
#+BEGIN_SRC n3
My code
#+END_SRC

gives

My code


and, testing without ":textarea",

#+ATTR_HTML: :class testing
#+BEGIN_SRC n3
My code
#+END_SRC

gives

My code



Preferably, I want the following html:

My code


Is there a way to achieve this?

Thanks,
Martin

[1] https://orgmode.org/manual/Text-areas-in-HTML-export.html



Re: [O] Best practice for providing an Org-based application?

2019-09-11 Thread Martin Alsinet
Neil,

You could use transient[1], the tool used to build the menus of magit[2].
I really like magit's discoverability and ease of use.

There is a video of a talk where it is used to control kubernetes from
inside emacs in magit style:
https://www.youtube.com/watch?v=w3krYEeqnyk

[1] transient: https://github.com/magit/transient
[2] magit: https://magit.vc


On Wed, Sep 11, 2019 at 2:17 AM Marcin Borkowski  wrote:

>
> On 2019-09-11, at 01:11, John Kitchin  wrote:
>
> > This sounds like an interesting application with a lot of complexities.
> > It definitely blurs the lines between a database where you could run
> > queries to find/update records, and a human readable, structured data
> > file that also does this.
>
> This reminds me of this:
> https://www.joelonsoftware.com/2012/01/06/how-trello-is-different/
>
> I just had a minor enlightenment why Org-mode is so successful (within
> its niche, of course).  It implements a bunch of very general data
> structures - a tree, a table, a dictionary - and a few slightly more
> specific - a clock table, TODOs/tags, markup...
>
> Best,
>
> --
> Marcin Borkowski
> http://mbork.pl
>
>


[O] defconst: Symbol’s value as variable is void: css-syntax-propertize-function

2019-08-13 Thread Charles R (Charlie) Martin
I'm getting this error when trying to export HTML from org-mode. Is this a
known issue? I haven't found any solutions via google.

Thanks


Re: [O] Potential bug with tables

2019-08-04 Thread Charles R (Charlie) Martin
Okay, it's weird but it's still happening. Org-mode 9.1.5 as above. Hmmm,
if I kill the buffer and reopen it, its sorts itself

Here's the header settings

#+STARTUP:  showall
#+LANGUAGE: en
#+OPTIONS:  H:2 num:nil toc:nil \n:nil
#+OPTIONS:  TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil
tags:not-in-toc
#+INFOJS_OPT:   view:nil toc:nil ltoc:t mouse:underline buttons:0
path:https://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS:   export
#+EXPORT_EXCLUDE_TAGS:  noexport


actual text C from org buffer


| date | task  | time |   |   |
|--+---+--+---+---|
| 19/07/12 | admin stuff -- slack, trello, backlog |3 |   |   |
| 19/07/16 | meeting. followup.|  2.5 |   |   |
|  |   |  |   |   |

screen shot



On Sat, Aug 3, 2019 at 2:58 PM Charles R (Charlie) Martin <
chasrmar...@gmail.com> wrote:

> I've got Org mode version 9.1.5 (9.1.5-1-gb3ddb0-elpa
>
>
> On Sat, Aug 3, 2019 at 2:24 PM John Kitchin 
> wrote:
>
>> This looks like an old org bug that has been fixed in newer versions.
>>
>> 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
>>
>>
>>
>> On Sat, Aug 3, 2019 at 3:06 PM Neil Jerram  wrote:
>>
>>> I just tried this with
>>>
>>> Org mode version 9.1.5 (release_9.1.5-1784-g772949 @
>>> /home/neil/src/org-mode/lisp/)
>>>
>>> and I don't see the problem with that version.  What version do you have?
>>>
>>>
>>> On Sat, 3 Aug 2019 at 19:48, Charles R (Charlie) Martin <
>>> chasrmar...@gmail.com> wrote:
>>>
>>>> This seems like an unlikely bug because it's very basic to org-mode
>>>> tables, but if I'm doing something wrong I sure can't figure out what.
>>>>
>>>> I have this table:
>>>>
>>>> | Date   | Count | Pages |
>>>> |+---+---|
>>>> | 2019-Aug-03 (Sat, 215) | 2069  | 7 |
>>>> ||   |   |
>>>>
>>>> but when I hit TAB or C-c C-c to reformat the table it is displayed as
>>>> in the screenshot
>>>>
>>>> [image: Screenshot 2019-08-03 12.44.51.png]
>>>>
>>>> Copying the text with M-w is still the same.
>>>>
>>>> | Date   | Count | Pages |
>>>> |+---+---|
>>>> | 2019-Aug-03 (Sat, 215) |  2069 | 7 |
>>>> ||   |   |
>>>>
>>>> I'm immensely puzzled.
>>>>
>>>> Signed
>>>> Immensely puzzled
>>>>
>>>


Re: [O] Potential bug with tables

2019-08-03 Thread Charles R (Charlie) Martin
I've got Org mode version 9.1.5 (9.1.5-1-gb3ddb0-elpa


On Sat, Aug 3, 2019 at 2:24 PM John Kitchin  wrote:

> This looks like an old org bug that has been fixed in newer versions.
>
> 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
>
>
>
> On Sat, Aug 3, 2019 at 3:06 PM Neil Jerram  wrote:
>
>> I just tried this with
>>
>> Org mode version 9.1.5 (release_9.1.5-1784-g772949 @
>> /home/neil/src/org-mode/lisp/)
>>
>> and I don't see the problem with that version.  What version do you have?
>>
>>
>> On Sat, 3 Aug 2019 at 19:48, Charles R (Charlie) Martin <
>> chasrmar...@gmail.com> wrote:
>>
>>> This seems like an unlikely bug because it's very basic to org-mode
>>> tables, but if I'm doing something wrong I sure can't figure out what.
>>>
>>> I have this table:
>>>
>>> | Date   | Count | Pages |
>>> |+---+---|
>>> | 2019-Aug-03 (Sat, 215) | 2069  | 7 |
>>> ||   |   |
>>>
>>> but when I hit TAB or C-c C-c to reformat the table it is displayed as
>>> in the screenshot
>>>
>>> [image: Screenshot 2019-08-03 12.44.51.png]
>>>
>>> Copying the text with M-w is still the same.
>>>
>>> | Date   | Count | Pages |
>>> |+---+---|
>>> | 2019-Aug-03 (Sat, 215) |  2069 | 7 |
>>> ||   |   |
>>>
>>> I'm immensely puzzled.
>>>
>>> Signed
>>> Immensely puzzled
>>>
>>


[O] Potential bug with tables

2019-08-03 Thread Charles R (Charlie) Martin
This seems like an unlikely bug because it's very basic to org-mode tables,
but if I'm doing something wrong I sure can't figure out what.

I have this table:

| Date   | Count | Pages |
|+---+---|
| 2019-Aug-03 (Sat, 215) | 2069  | 7 |
||   |   |

but when I hit TAB or C-c C-c to reformat the table it is displayed as in
the screenshot

[image: Screenshot 2019-08-03 12.44.51.png]

Copying the text with M-w is still the same.

| Date   | Count | Pages |
|+---+---|
| 2019-Aug-03 (Sat, 215) |  2069 | 7 |
||   |   |

I'm immensely puzzled.

Signed
Immensely puzzled


Re: [O] [Proposal] Source Blocks with Post-Extensions

2019-07-26 Thread Martin Alsinet
Well Ken, you improved my workflow right there, I am going to add the
:prologue trick to my shell properties header and get the test error output
in the results block.

Thank you right back!

On Fri, Jul 26, 2019 at 10:18 AM Ken Mankoff  wrote:

>
> On 2019-07-26 at 08:58 -04, Martin Alsinet 
> wrote...
> > I usually have a shell buffer nearby and go there to inspect the
> > failed tests when I get no output. The problem is that shell blocks do
> > not capture stderr. John Kitchin wrote a blog post
> > <
> http://kitchingroup.cheme.cmu.edu/blog/2015/01/04/Redirecting-stderr-in-org-mode-shell-blocks/
> >
> > about this problem and provided a solution that may work for you, but
> > I have not tried it yet.
>
> Ah yes... from my own comments there:
>
> #+begin_src sh :results raw drawer :prologue "exec 2>&1" :epilogue ":"
> python -m pytest ./utils
> #+end_src
>
> Thanks for reminding me about my past self.
>
>   -k.
>


Re: [O] [Proposal] Source Blocks with Post-Extensions

2019-07-26 Thread Martin Alsinet
Ken,

I usually have a shell buffer nearby and go there to inspect the failed
tests when I get no output.
The problem is that shell blocks do not capture stderr. John Kitchin wrote
a blog post
<http://kitchingroup.cheme.cmu.edu/blog/2015/01/04/Redirecting-stderr-in-org-mode-shell-blocks/>
about this problem and provided a solution that may work for you, but I
have not tried it yet.

Martin

On Fri, Jul 26, 2019 at 7:02 AM Ken Mankoff  wrote:

> Hi Martin,
>
> On 2019-06-26 at 18:09 -04, Martin Alsinet 
> wrote...
> > I use a different approach, where I tangle the source into files in
> > modules and then I import those modules from other blocks. This allows
> > me to organize my document with different sections for the code and
> > its tests, which then get exported into their corresponding files.
>
> Thanks for providing this pytest code below. It runs nicely because your
> tests pass. It does not run if a test fails. The shell block that runs
> pytest reports
>
> Babel evaluation exited with code 1
> Code block produced no output.
>
> Do you have some way of capturing failed pytest tests in Org Babel?
>
> Thanks,
>
>   -k.
>
> > * Square Function
> >
> > This function receives a number and returns its square
> >
> > #+BEGIN_SRC python :tangle ./utils/math.py :mkdirp yes
> > def square(x):
> > return x * x
> > #+END_SRC
> >
> > ** __init__.py (module setup)
> >
> > #+begin_src python :tangle ./utils/__init__.py :mkdirp yes
> > from utils.math import square
> >
> > #+end_src
> >
> > ** Test cases
> >
> > 1. The square of five should be 25
> > 2. The square of zero should be 0
> > 3. The square of a negative number should be positive
> >
> > #+BEGIN_SRC python :tangle ./utils/test_square.py :mkdirp yes
> > from utils.math import square
> >
> > def test_square_of_five():
> > assert square(5) == 25
> >
> > def test_square_of_zero():
> > assert square(0) == 0
> >
> > def test_square_of_negative():
> > assert square(-5) > 0
> > #+END_SRC
> >
> > *** Run tests
> >
> > #+begin_src sh :results output raw
> > pytest ./utils
> > #+end_src
> >
> > #+RESULTS:
> > = test session starts
> > ==
> > platform linux -- Python 3.7.3, pytest-4.6.3, py-1.8.0, pluggy-0.12.0
> > rootdir: /app
> > collected 3 items
> >
> > utils/test_square.py ...
> > [100%]
> >
> > === 3 passed in 0.08 seconds
> > ===
> >
> >
>


Re: [O] [Proposal] Source Blocks with Post-Extensions

2019-06-26 Thread Martin Alsinet
Dmitrii,

I use a different approach, where I tangle the source into files in modules
and then I import those modules from other blocks.
This allows me to organize my document with different sections for the code
and its tests, which then get exported into their corresponding files.


* Square Function

This function receives a number and returns its square

#+BEGIN_SRC python :tangle ./utils/math.py :mkdirp yes
def square(x):
return x * x
#+END_SRC

** __init__.py (module setup)

#+begin_src python :tangle ./utils/__init__.py :mkdirp yes
from utils.math import square

#+end_src

** Test cases

1. The square of five should be 25
2. The square of zero should be 0
3. The square of a negative number should be positive

#+BEGIN_SRC python :tangle ./utils/test_square.py :mkdirp yes
from utils.math import square

def test_square_of_five():
assert square(5) == 25

def test_square_of_zero():
assert square(0) == 0

def test_square_of_negative():
assert square(-5) > 0
#+END_SRC

*** Run tests

#+begin_src sh :results output raw
pytest ./utils
#+end_src

#+RESULTS:
= test session starts
==
platform linux -- Python 3.7.3, pytest-4.6.3, py-1.8.0, pluggy-0.12.0
rootdir: /app
collected 3 items

utils/test_square.py ...
[100%]

=== 3 passed in 0.08 seconds
===






On Wed, Apr 24, 2019 at 2:19 PM Dmitrii Korobeinikov 
wrote:

> Sorry for not answering these two days.
>
> You are right, that's an option.
> But I just don't think that's the best possible one - for usability.
>
> Introducing this would imply architectural decisions, so it might not be
> immediately clear if it's right or not.
> Especially that the improvement might not seem that big.
> So, I understand that.
>
> I have proposed buffer lenses today and they seem like something that can
> solve the issue from the user side. Hopefully they will get some traction.
>
> пн, 22 апр. 2019 г. в 23:31, Berry, Charles :
>
>>
>>
>> > On Apr 22, 2019, at 10:15 AM, Dmitrii Korobeinikov 
>> wrote:
>> >
>> > Thank you!
>> > That's a handy technique and it does help.
>> > As I understand, there's no way to extend that to multiple lines?
>>
>> AFAICS, no there is no way to split the :epilogue arg to multiple lines.
>>
>> Of course, you can always follow a src block that provides a function
>> with another src block that imports the code via noweb and then tests the
>> function with as many lines of code as you need.
>>
>> Chuck
>>
>>
>>
>>


Re: [O] best ways to generate simple diagrams?

2019-05-07 Thread Martin Schöön
Maybe missing a "\usepackage{tikz}"?
(That caught me out)

-- 
Martin Schöön


Re: [O] How to calculate all time durations in a file automatically?

2019-05-07 Thread Martin Schroeder
Yeah I ended up using a macro and search for CLOCK text but this
solution is much cleaner

On Tue, May 7, 2019 at 6:04 PM Ihor Radchenko  wrote:
>
> Dear Martin,
>
> Just go to the beginning of buffer and  (while (re-search-forward
> org-clock-line-re) (org-ctrl-c-ctrl-c)) . Or you can use keyboard
> macros ;)
>
> Best,
> Ihor
>
> Martin Schroeder  writes:
>
> > I have imported a bunch of log lines with CLOCK periods from another
> > program into an org file but I have forgotten to calculate periods. So
> > my time lines look like this:
> >
> > CLOCK: [2019-03-27 Wed 19:30]--[2019-03-27 Wed 21:30]
> >
> > Instead of this:
> >
> > CLOCK: [2019-03-27 Wed 19:30]--[2019-03-27 Wed 21:30] =>  2:00
> >
> > I can now no longer check in on any task until I fix all these ranges
> > in all of my agenda files. So I have to go to each one and do C-c C-c.
> >
> > Surely there has to be a better way but in my searching with a giant
> > flashlight I was not able to find it yet. Can anybody point me in the
> > right direction?
> >



[O] Incorrect clock duration calculation

2019-05-07 Thread Martin Schroeder
I noticed that on timestamps that begin or end at 00:00 the org mode
org-evaluate-time-range function seems to produce wrong results. Here
are some examples:

For example, this should produce 2:00 duration:
CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Fri 00:00] => -22:00
I tried this, but id did not work either:
CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Sat 00:00] => -22:00
This works though but this does not cross day boundary:
CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Fri 23:00] =>  1:00
This should produce 3:00 but it gives -21 even though the end time is
later than start time:
CLOCK: [2019-04-19 Fri 22:00]--[2019-04-19 Sat 01:00] => -21:00

Does anyone have a solution for this?



[O] How to calculate all time durations in a file automatically?

2019-05-07 Thread Martin Schroeder
I have imported a bunch of log lines with CLOCK periods from another
program into an org file but I have forgotten to calculate periods. So
my time lines look like this:

CLOCK: [2019-03-27 Wed 19:30]--[2019-03-27 Wed 21:30]

Instead of this:

CLOCK: [2019-03-27 Wed 19:30]--[2019-03-27 Wed 21:30] =>  2:00

I can now no longer check in on any task until I fix all these ranges
in all of my agenda files. So I have to go to each one and do C-c C-c.

Surely there has to be a better way but in my searching with a giant
flashlight I was not able to find it yet. Can anybody point me in the
right direction?



[O] Will org-num be included in the distribution

2019-04-10 Thread Martin Stemplinger
Hello,

A while back Nicolas posted org-num.el which adds numbered Level to the 
different headings. I find it very useful and reliable so I wonder why it’s 
only included in git but not in the distribution or package. Any insight?

Thanks,
Martin



Re: [O] Python with org-mode

2019-03-30 Thread Martin Schöön
Just a comment related to Anaconda.

Your Ubuntu 18.10 already has some Python installed and bringing in Python
packages from outside of the Ubuntu ecology may create problems. I don't
know how this works with Anaconda but I have 'been there, done that' with
pip before I learned how to use pip properly.

-- 
Martin Schöön


Re: [O] Python with org-mode

2019-03-30 Thread Martin Alsinet
Lawrence,

It depends on what you want to do. Anaconda is a python distribution
intended for data science and machine learning, so if you want to work on
machine learning, it provides an easy way to install all the required
packages for that. You can use any python distribution with org-mode, you
just have to tell org-babel the path to the python interpreter you want to
use.

I would suggest that you pick a project, an application you want to make,
and start from there. I am currently making an application using python and
org-mode, which consists of a single org document and has ~170 python
source blocks. It is a simple podcast database, I am just doing it to try
the literary programming style in python. You can check it out here
, the only problem is that the
document is in spanish, my native language.

In this application I have leveraged python's import feature, so that I
write small functions (each in their corresponding source code block) which
I tangle into files and import from other blocks. This allows the document
to have a logical structure as a document, with sections for each module,
and also being able to call any block from any other.

If you have any doubts or need help starting out, don't hesitate to contact
me, I would be happy to help you.


Martín

On Fri, Mar 29, 2019 at 10:38 PM Lawrence Bottorff 
wrote:

> I've seen many "start using Python" parades, but what is the best way to
> use Python with org-mode, i.e., in babel source blocks? I'm on U18.10,
> which comes with standard 2 (2.7.15+) and 3 (3.6.7). But then I keep
> hearing about Anaconda. Your opinions, experiences, please.
>
> LB
>


Re: [O] Lowercase keywords in 9.2?

2019-02-12 Thread Martin Alsinet
What do you mean with the "uppercase legacy"? You mean all the current
documents we already have?
In my case, those will remain with the upper case tags until I need to edit
them.

I guess it would be enough to patch the sites affected by
>
> https://code.orgmode.org/bzg/org-mode/commit/13424336a6f30c50952d291e7a82906c1210daf0
> and also the templates definition in org-tempo.


Looking at that diff, the changes are not so simple as I initially thought,
I was just thinking about patching org-tempo, but I guess they should cover
all the uppercase tags.
Now I don't feel so confident about doing it :-(

Regards

On Tue, Feb 12, 2019 at 11:10 AM Carlos Pita 
wrote:

> > At first I didn't like the lowercase tags for the blocks, but I got used
> to them after a couple of days.
>
> I prefer the lowercase convention hands down. The problem I pointed
> out is with the uppercase legacy.
>
> > Someone suggested adding a defcustom option to org-tempo to let the user
> choose between lower and upper case tags.
> > It seems a simple enough feature for a first contribution. Maybe we
> could add it? I have never done it before, but I am willing to try.
>
> I wouldn't mind (helping you) doing it as far as there is agreement
> whether this is a desired option or not.
>
> I guess it would be enough to patch the sites affected by
>
> https://code.orgmode.org/bzg/org-mode/commit/13424336a6f30c50952d291e7a82906c1210daf0
> and also the templates definition in org-tempo.
>
> Regards
> --
> Carlos
>


Re: [O] Lowercase keywords in 9.2?

2019-02-12 Thread Martin Alsinet
Carlos,

I recently updated to 9.2 and was also confronted with the org-tempo
change.
At first I didn't like the lowercase tags for the blocks, but I got used to
them after a couple of days.

Someone suggested adding a defcustom option to org-tempo to let the user
choose between lower and upper case tags.
It seems a simple enough feature for a first contribution. Maybe we could
add it? I have never done it before, but I am willing to try.


On Tue, Feb 12, 2019 at 10:30 AM Carlos Pita 
wrote:

> > Here are two previous threads about the subject:
> >
> > Last month:
> http://lists.gnu.org/archive/html/emacs-orgmode/2019-01/msg00349.html
> > A year ago:
> http://lists.gnu.org/archive/html/emacs-orgmode/2018-01/msg00425.html
>
> Interesting, thanks! Although the issue of mostly uppercase external
> snippet collections was not raised there. For now I'm disabling yas in
> org mode and using org-tempo exclusively.
>


Re: [O] Lowercase keywords in 9.2?

2019-02-12 Thread Martin Alsinet
Carlos

Here are two previous threads about the subject:

   - Last month:
   http://lists.gnu.org/archive/html/emacs-orgmode/2019-01/msg00349.html
   - A year ago:
   http://lists.gnu.org/archive/html/emacs-orgmode/2018-01/msg00425.html

Regards

On Tue, Feb 12, 2019 at 9:51 AM Carlos Pita 
wrote:

> > before, didn't they? Is this implying that now lowercase is preferred?
>
> I dug this up from the repo:
>
>org-element: Prefer lower case letters for blocks and keywords
>
>
> https://code.orgmode.org/bzg/org-mode/commit/13424336a6f30c50952d291e7a82906c1210daf0
>
> So the answer is yes. Also the begin/end pairs are lowercase hardcoded
> in org-tempo.el.
>
> This is a problem for available (ya)snippet databases. I've reported
> it in https://github.com/AndreaCrotti/yasnippet-snippets/issues/303,
> requesting an update. But I guess people will prefer uppercase for a
> time so I'm now sure how should they should cope with the transition.
>
> Best regards
> --
> Carlos
>
> >
> > Regards
> > --
> > Carlos
>
>


Re: [O] Bug: no more fontifying in org mode [9.1.14 (9.1.14-dist @ /home/abel/git-ext/org-9.1.14/lisp/)]

2018-11-15 Thread boris martin
Hello,

same issue occured with the master branch of 
https://code.orgmode.org/bzg/org-mode.git

- is there a way for me to know for sure that there is not interference
from any other git-org

installation file ?

- is there a way for me to put emacs in a verbose debug mode so i can
trace what currently
happened when i open a org file ?

best regards

Le 14/11/2018 à 22:37, Nicolas Goaziou a écrit :
> Hello,
>
> boris martin  writes:
>
>>  minimal-org.el ---
>>
>> ;;; Minimal setup to load latest 'org-mode'
>>
>> ;; activate debugging
>> (setq debug-on-error t
>>   debug-on-signal nil
>>   debug-on-quit nil)
>> (add-to-list 'load-path "~/git-ext/org-9.1.14/lisp")
>> (add-to-list 'load-path "~/git-ext/org-9.1.14/contrib/lisp" t)
>>
>> -- en minimal-org.el --
>>
>>  minimal file where the bug happens ---
>>
>> *sdfsd*
>> *aezraze*
>> /titi/
>>
>>
>> - end minimal file where the bug happens -
> I cannot reproduce your issue. Could you try Org development version?
>
> Regards,
>




[O] Bug: no more fontifying in org mode [9.1.14 (9.1.14-dist @ /home/abel/git-ext/org-9.1.14/lisp/)]

2018-11-14 Thread boris martin


 minimal-org.el ---

;;; Minimal setup to load latest 'org-mode'

;; activate debugging
(setq debug-on-error t
  debug-on-signal nil
  debug-on-quit nil)
(add-to-list 'load-path "~/git-ext/org-9.1.14/lisp")
(add-to-list 'load-path "~/git-ext/org-9.1.14/contrib/lisp" t)

-- en minimal-org.el --

 minimal file where the bug happens ---

*sdfsd*
*aezraze*
/titi/


- end minimal file where the bug happens -

Le 13/11/2018 à 17:45, Nicolas Goaziou a écrit :
> Hello,
>
> boris martin  writes:
>
>> since i have updated org mode to this version if i open a org-mode file
>> it will not be fontify i will need to go to org->refresh/Reload->refresh
>> setup current buffer
>>
>> to have the buffer fontify.
>>
>> this happen with emacs -Q -l /path/to/minimal-org.el
>> as well.
> I cannot reproduce it. Could you send a minimal Org file where that
> happens? Also, what is in minimal-org.el?
>
> Regards,
>




[O] Bug: no more fontifying in org mode [9.1.14 (9.1.14-dist @ /home/abel/git-ext/org-9.1.14/lisp/)]

2018-11-13 Thread boris martin


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


since i have updated org mode to this version if i open a org-mode file
it will not be fontify i will need to go to org->refresh/Reload->refresh
setup current buffer

to have the buffer fontify.

this happen with emacs -Q -l /path/to/minimal-org.el
as well.

Emacs  : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8)
 of 2017-09-20 on lcy01-35, modified by Debian
Package: Org mode version 9.1.14 (9.1.14-dist @
/home/abel/git-ext/org-9.1.14/lisp/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 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-confirm-shell-link-function 'yes-or-no-p
 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-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-block-all append
local]
   5 "\n\n(fn)"]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all
append local]
   5 "\n\n(fn)"]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("id" :follow org-id-open)
   ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link)
   ("info" :follow org-info-open :export org-info-export
:store org-info-store-link)
   ("gnus" :follow org-gnus-open :store
org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store
org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys")
   ("file+emacs") ("doi" :follow org--open-doi-link)
   ("elisp" :follow org--open-elisp-link)
   ("file" :complete org-file-complete-link)
   ("ftp" :follow
(lambda (path) (browse-url (concat "ftp:" path
   ("help" :follow org--open-help-link)
   ("http" :follow
(lambda (path) (browse-url (concat "http:" path
   ("https" :follow
(lambda (path) (browse-url (concat "https:" path
   ("mailto" :follow
(lambda (path) (browse-url (concat "mailto:; path
   ("news" :follow
(lambda (path) (browse-url (concat "news:; path
   ("shell" :follow org--open-shell-link))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



Re: [O] Help with sharing emacs-org presentation

2018-10-30 Thread Martin Schöön
I have already learned some cool org-mode features by looking at your .org
file :-)

My own mantra for preparing slide-packs is to minimize text. I want the
audience to listen to me rather than reading text on my slides.
My 2 cents...

-- 
Martin Schöön


[O] [PATCH] org-capture: fix capture breaking next headline

2018-10-21 Thread Martin Yrjölä
Hello,

I have noticed my capture workflow breaking org document hierarchies.
Here is an example:

Start with the org document:

* A
* B

An org capture template inserts a headline under A.

* A
** [point here]
* B

When I navigate to the end of the narrowed capture buffer (e.g.
`(end-of-buffer)')  and insert text, it will break the B headline like
this:

* A
**
inserted text[point here]* B

I expected the following behavior

* A
** inserted text[point here]
* B

In the enclosed patch, I added a test for this behavior. I would
prefer that inserting text in narrowed capture buffers would not break
the document hierarchy. The fix is to subtract one from the `end'
originally supplied to `org-capture-narrow'.

--
Martin Yrjölä


0001-org-capture-fix-capture-breaking-next-headline.patch
Description: Binary data


Re: [O] Org mode + Solid = collaborative, privacy-respecting future

2018-09-30 Thread Martin Schöön
It looks like perfect solution to one of my org-mode uses.

Disclaimer: I have spent just a couple of minutes browsing those Solid-web
pages.

-- 
Martin Schöön

http://hem.bredband.net/b262106/index.html


Re: [O] Table column width and HTML export

2018-09-19 Thread Martin Dalgaard Villumsen
Thanks for sharing

/Martin

From: Kaushal Modi [mailto:kaushal.m...@gmail.com]
Sent: 18. september 2018 20:25
To: Martin Dalgaard Villumsen 
Cc: emacs-org list 
Subject: Re: [O] Table column width and HTML export

On Tue, Sep 18, 2018 at 7:35 AM Martin Dalgaard Villumsen 
mailto:mvillum...@health.sdu.dk>> wrote:
>
> How do you in org-mode override/identify the column-class for a single column 
> when you have multiple columns of the same type in the same table?

As I said, you can do everything using CSS and the existing ox-html version.

Here's an example:

=
#+title: Specify widths different for different table columns in HTML export
#+author: Kaushal Modi

#+begin_export html

/* First column */
table.foo td:first-child {
  width: 200px;
}
/* Second column */
table.foo td:nth-child(2) {
  width: auto;
}
/* Last column */
table.foo td:last-child {
  width: 400px;
}

#+end_export

The column widths in below table will stay at default.

|--+--+--|
| Header 1 | Header 2 | Header 3 |
|--+--+--|
| abc  | def  | ghi  |
| jkl  | mno  | pqr  |
| stu  | vwx  | yz   |
|--+--+--|

Below, the left-most column will be 200px wide and the right-most will
be 400px wide. The center column will stay at default width.

#+attr_html: :class foo
|--+--+--|
| Header 1 | Header 2 | Header 3 |
|--+--+--|
| abc  | def  | ghi  |
| jkl  | mno  | pqr  |
| stu  | vwx  | yz   |
|--+--+--|
* CSS References
- https://stackoverflow.com/a/6254367/1219634
- 
[[https://www.w3schools.com/cssref/sel_element_pluss.asp][CSS<https://www.w3schools.com/cssref/sel_element_pluss.asp%5d%5bCSS>
 -- /element+element/ selector]]
- 
[[https://www.w3schools.com/cssref/sel_firstchild.asp][CSS<https://www.w3schools.com/cssref/sel_firstchild.asp%5d%5bCSS>
 -- ~:first-child~]]
- 
[[https://www.w3schools.com/cssref/sel_last-child.asp][CSS<https://www.w3schools.com/cssref/sel_last-child.asp%5d%5bCSS>
 -- ~:last-child~]]
- 
[[https://www.w3schools.com/cssref/sel_nth-child.asp][CSS<https://www.w3schools.com/cssref/sel_nth-child.asp%5d%5bCSS>
 -- ~:nth-child()~]]
- 
[[https://www.w3schools.com/cssref/sel_nth-last-child.asp][CSS<https://www.w3schools.com/cssref/sel_nth-last-child.asp%5d%5bCSS>
 -- ~:nth-last-child()~]]
=

Screenshot (see below/attached):

[image.png]


[O] Table column width and HTML export

2018-09-18 Thread Martin Dalgaard Villumsen
>The org-* classes you mentioned can be easily overridden or used along with > 
>>the new classes, based on how the CSS rules are written.

How do you in org-mode override/identify the column-class for a single column 
when you have multiple columns of the same type in the same table?

/Martin

From: Kaushal Modi [mailto:kaushal.m...@gmail.com]
Sent: 18. september 2018 13:27
To: Martin Dalgaard Villumsen 
Cc: Emacs-orgmode@gnu.org
Subject: Re: [O] Table column width and HTML export

Hello,

There seems to be quite a bit of confusion.

On Tue, Sep 18, 2018, 6:51 AM Martin Dalgaard Villumsen 
mailto:mvillum...@health.sdu.dk>> wrote:
I am not interested in editing the exported HTML file (conflicts the point of 
using org-mode)
I did not say that HTML should be edited manually. I said that ox-html probably 
needs an update that inserts the col tag with user-specified col-classes.
 I can add a class to the  tag with
#+ATTR_HTML: :class my-table

Correct. That class won't help here. You need a class that scopes the 
individual columns.
 But I don’t know how to add a new class to  in org-mode; or how to define 
a custom column (one that is now , , ).
Right, that needs to be investigated. Most likely, at the moment, we cannot set 
individual classes for each column.
No point in CSS-restyling default class="org-center", class="org-left", etc.  … 
this would affect columns in other tables
That's a CSS problem. You can set a unique class for a table using the 
attr_html syntax you showed above and then set CSS rules only for that table 
using ".my-table td+td" and so on.

The org-* classes you mentioned can be easily overridden or used along with the 
new classes, based on how the CSS rules are written.


Re: [O] Table column width and HTML export

2018-09-18 Thread Martin Dalgaard Villumsen
I am not interested in editing the exported HTML file (conflicts the point of 
using org-mode)

I can add a class to the  tag with

#+ATTR_HTML: :class my-table

But I don’t know how to add a new class to  in org-mode; or how to define 
a custom column (one that is now , , ).

No point in CSS-restyling default class="org-center", class="org-left", etc.  … 
this would affect columns in other tables


/Martin

From: Kaushal Modi [mailto:kaushal.m...@gmail.com]
Sent: 18. september 2018 12:31
To: Martin Dalgaard Villumsen 
Cc: Emacs-orgmode@gnu.org
Subject: Re: [O] Table column width and HTML export

On Tue, Sep 18, 2018, 3:38 AM Martin Dalgaard Villumsen 
mailto:mvillum...@health.sdu.dk>> wrote:
How do I control the column width when exporting a table to HTML?

I know how to control the width of the table, but not the width of its columns. 
For example, I want the width of column A to be 2 cm and the width of B to be 4 
cm:

|  A |  B |
|+|
| 11 | 12 |
| 21 | 22 |

Relative settings are also appreciated, A 33% and B 67% of total table width.
Hello,

This needs to be solved using CSS. See an example here: 
https://stackoverflow.com/questions/6253963/table-with-table-layout-fixed-and-how-to-make-one-column-wider

In that two solutions are suggested in the selected answer. You should be able 
to implement the first way using the "td+td" CSS rule.

For the second way using the "col" tag, I don't have the computer accessible 
right now, to check if ox-html can insert that tag. Even if it did add that 
tag, you would need to specify the class string for each column, and then use 
CSS to set the width of each column class.

Right now, the first method seems to be the best?/fastest/easiest way forward.


[O] Table column width and HTML export

2018-09-18 Thread Martin Dalgaard Villumsen
How do I control the column width when exporting a table to HTML?

I know how to control the width of the table, but not the width of its columns. 
For example, I want the width of column A to be 2 cm and the width of B to be 4 
cm:

|  A |  B |
|+|
| 11 | 12 |
| 21 | 22 |

Relative settings are also appreciated, A 33% and B 67% of total table width.

Thanks for reading, Martin



Re: [O] Org-Mode babel and gherkin

2018-04-26 Thread Charles R (Charlie) Martin
gherkin is the specification language used for behavior-driven design in
tools like Cucumber.

https://github.com/cucumber/cucumber/wiki/Gherkin
https://medium.com/@NeotericEU/speak-gherkin-and-learn-how-to-collect-requirements-for-your-project-dad171da8fb

On Thu, Apr 26, 2018 at 5:34 PM, Bastien <b...@gnu.org> wrote:

> Hi Charles,
>
> "Charles R (Charlie) Martin" <chasrmar...@gmail.com> writes:
>
> > Has anyone set up a babel language for gherkin?
>
> Would you mind sharing more information on what is gherkin?
>
> Thanks,
>
> --
>  Bastien
>


[O] Bug: org-collector evaluates headlines starting with hyperlink as lisp code

2018-04-23 Thread Martin Kampas
Hi,

With headlines like

* [[http://example.com]] Example

org-collector writes just "http://example.com; in the table, omitting the rest 
of the headline.

Patch below.

BR,
Martin

>From 1228efc453d38bc090511f21fafa750e416e8b7a Mon Sep 17 00:00:00 2001
From: Martin Kampas <martin.kam...@ubedi.net>
Date: Mon, 23 Apr 2018 19:27:18 +0200
Subject: [PATCH] org-collector.el: Inhibit lisp evaluation of headlines

* contrib/lisp/org-collector.el (org-propview-collect): Inhibit lisp
  evaluation of headlines

This fixes org-collector usage for items starting with a hyperlink,
which would be incorrectly treated as lisp code.
---
 contrib/lisp/org-collector.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/lisp/org-collector.el b/contrib/lisp/org-collector.el
index 1d2351923..833ecbf51 100644
--- a/contrib/lisp/org-collector.el
+++ b/contrib/lisp/org-collector.el
@@ -186,7 +186,8 @@ variables and values specified in props"
 (header-props
  (mapcar (lambda (props)
(mapcar (lambda (pair)
- (cons (car pair) (org-babel-read (cdr pair
+ (let ((inhibit-lisp-eval (string= (car pair) 
"ITEM")))
+   (cons (car pair) (org-babel-read (cdr pair) 
inhibit-lisp-eval
props))
  header-props))
 ;; collect all property names
-- 
2.16.2







Re: [O] Bug: Matching tags: results incomplete when mixing group tags and their ancestors [9.1.7 (9.1.7-12-g74f6ed-elpaplus @ /home/martin/.emacs.d/elpa/org-plus-contrib-20180305/)]

2018-03-21 Thread Martin Kampas
Hi Bastien,

> If you have time to add tests, that'd be great, as Nicolas suggested.

Here you are.

Best Regards,
Martin

>From bd8059e18fa3bd2977415449139fc626d03817a3 Mon Sep 17 00:00:00 2001
From: Martin Kampas <martin.kampas@hidden>
Date: Thu, 22 Mar 2018 06:20:31 +0100
Subject: [PATCH] Extend match-sparse-tree test for tag hierarchies

* test-org.el (test-org/match-sparse-tree): Extend test after commit
894ec00 (org.el: Fix recursion stop condition when expanding tags).
---
 testing/lisp/test-org.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index e97dfe775..8d8b36f86 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -5765,6 +5765,15 @@ Paragraph"
  (org-match-sparse-tree nil "Lev_1")
  (search-forward "H4")
  (org-invisible-p2)))
+  (should-not
+   (org-test-with-temp-text
+   "#+TAGS: [ Lev_1 : Lev_2 ]\n
+#+TAGS: [ Lev_2 : Lev_3 ]\n
+#+TAGS: { Lev_3 : Lev_4 }\n
+* H\n** H1 :Lev_1:\n** H2 :Lev_2:\n** H3 :Lev_3:\n** H4 :Lev_4:"
+ (org-match-sparse-tree nil "Lev_1+Lev_3")
+ (search-forward "H4")
+ (org-invisible-p2)))
   ;; Match regular expressions in tags
   (should-not
(org-test-with-temp-text
-- 
2.16.2






[O] Bug: Bug in svg generation from plantuml sources [9.1.7 (9.1.7-20-ge1f1ac-elpa @ /home/guertler/.emacs.d/elpa/org-20180319/)]

2018-03-20 Thread Martin Gürtler

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Hi,

ob-plantuml wraps a plantuml source in @startuml/@enduml tags without
checking whether they are already in the source code. This results in
the creation of invalid SVG, at least for newer versions of plantuml,
because the resulting SVG file contains then two XML documents ((I was
using version 1.2018.2, it seems to work though for older plantuml
versions <= 8059).

So the following does not work

#+BEGIN_SRC plantuml :file "out.svg"
@startuml
a->b
@enduml
#+END_SRC

while this works:

#+BEGIN_SRC plantuml :file "out.svg"
a->b
#+END_SRC

Every plantuml example I found contains @startuml/@enduml so all my old
org mode files do contain the tags... I feel the required change is not
very difficult, but unfortunately I do not speak elisp at all...

Emacs  : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.28)
 of 2018-02-19, modified by Debian
Package: Org mode version 9.1.7 (9.1.7-20-ge1f1ac-elpa @ 
/home/guertler/.emacs.d/elpa/org-20180319/)

Thanks for considering,

Martin

-- 
Dr. Martin Gürtler 
 


signature.asc
Description: PGP signature


Re: [O] Bug: Matching tags: results incomplete when mixing group tags and their ancestors [9.1.7 (9.1.7-12-g74f6ed-elpaplus @ /home/martin/.emacs.d/elpa/org-plus-contrib-20180305/)]

2018-03-15 Thread Martin Kampas
Hi,

This seems to fix the bug.

Best Regards,
Martin

>From fef860e356a4ca75366f69ec9c2d52252c9d7d3f Mon Sep 17 00:00:00 2001
From: Martin Kampas <martin.kampas@hidden>
Date: Thu, 15 Mar 2018 15:41:53 +0100
Subject: [PATCH] Fix matching tags when mixing group tags and their ancestors

* lisp/org.el (org-expand-tags): Fix recursion stop condition

See http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00228.html
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 76bc60c88..7bf013390 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13960,7 +13960,7 @@ When DOWNCASE is non-nil, expand downcased TAGS."
 (tag (match-string 2 return-match))
 (tag (if downcased (downcase tag) tag)))
(unless (or (get-text-property 0 'grouptag (match-string 2 return-
match))
-   (member tag work-already-expanded))
+   (member tag tags-already-expanded))
  (setq tags-in-group (assoc tag taggroups))
  (push tag work-already-expanded)
  ;; Recursively expand each tag in the group, if the tag hasn't
-- 
2.16.2






[O] Bug: Matching tags: results incomplete when mixing group tags and their ancestors [9.1.7 (9.1.7-12-g74f6ed-elpaplus @ /home/martin/.emacs.d/elpa/org-plus-contrib-20180305/)]

2018-03-12 Thread Martin Kampas
Hi,

Here is an example Org file:


#+TAGS: [ tag1 : tag2 ] [ tag2 : tag3 ] [ tag3 : tag4 ]
* Tag1   :tag1:
* Tag2   :tag2:
* Tag3   :tag3:
* Tag4   :tag4:


Searching headlines by tags works well unless you combine a group tag together 
with some of its ancestor tags in the query.

1) GOOD - Searching for "tag1" marks all four headlines.
2) GOOD - Searching for "tag3" marks headlines "Tag3" and "Tag4".
3) BAD - Searching for "tag1+tag3" marks just headline "Tag3" providing an 
incomplete result. Expected result: headlines "Tag3" and "Tag4" are marked.

With more complex tag set it may happen quite easily that such a search is done.

The bug seems to be in org-tags-expand.

(org-tags-expand "tag1")
#("{\\<\\(?:tag[1-4]\\)\\>}" 0 20 (grouptag t))
(org-tags-expand "tag3")
#("{\\<\\(?:tag[34]\\)\\>}" 0 19 (grouptag t))
(org-tags-expand "tag1+tag3")
#("{\\<\\(?:tag[1-4]\\)\\>}+tag3" 0 20 (grouptag t))

In the third invocation "tag3" was left unexpanded.

Best regards,
Martin


Emacs  : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-02-09
Package: Org mode version 9.1.7 (9.1.7-12-g74f6ed-elpaplus @ 
/home/martin/.emacs.d/elpa/org-plus-contrib-20180305/)






Re: [O] orgmode beamer mode: BMCO does not export to latex any longer: ===> suspect identified: (ox-extras-activate '(ignore-headlines))

2018-02-19 Thread Martin Steffen


Hi,

one week ago I reported that export to latex/beamer refuses to export,
and the reason where it did not do it was, according to my email

BMCOL


(slides that contained that derailed the export terminally).

In the meantime, I found one line that, when removed, solves the
problem. In that sense, one might say, it's not BMCOL which is the
problem but the the combination. The problematic ``feature interaction''
is with the package

   (require 'ox-extra)

which in itself does not cause the damage, but if I add

   (ox-extras-activate '(ignore-headlines))


then that kills the export.  Note: there had been a time when that still
worked. 


PS: I tested it on the very latest git-pull (org-mode-version 9.1.6) and
emacs-24.3.1 (but I had similar problems for emacs-25, only that I did
not veryfy that it's the same line with ``ox-extra'' that causes the
trouble, but it's more than plausible).













>>>>> "Martin" == Martin Steffen <mstef...@ifi.uio.no> writes:

Martin> Thanks a lot, it may be that my emacs suffers some
Martin> ``package-overload'', i.e., maybe it's due to an
Martin> interference with some other lisp stuff I load.

Martin>  I just wanted to hear if it's known to be a current glitch
Martin> of the export-beamer thing, before I try to drill down
Martin> (especially since the priority is to make he slides compile
Martin> again rather than trouble-shooting. [I just escape to
    Martin> native-latex for multi-cols for now]

Martin> When done with the presentation, I will try to narrow it
Martin> down, cutting down also on the amount of slides (because
Martin> currently is a long and complex thing, which I cannot expect
    Martin> others to trawls for abnormalitiees ;-)

Martin> Martin






>>>>> "Eric" == Eric S Fraga <esfli...@gmail.com> writes:

Eric> On Wednesday, 14 Feb 2018 at 10:39, Martin Steffen wrote:
>>> Hi,
>>> 
>>> since recently I have a problem with exporting org-beamer-mode,
>>> the culprit presumably

Eric> [...]

>>> It seems that the BMCOL is the culprit, org-beamer still export
>>> a complicated and long document (as it did before), but probably
>>> a recent update made it stumble over that particular element.

Eric> Works fine for me with org up to date from git.  Not sure what
Eric> to suggest.  What happens with emacs -Q and loading in org
Eric> with no customizations?

Eric> -- Eric S Fraga via Emacs 27.0.50, Org
Eric> release_9.1.6-118-g134243



Re: [O] orgmode beamer mode: BMCO does not export to latex any longer

2018-02-14 Thread Martin Steffen


Thanks a lot, it may be that my emacs suffers some ``package-overload'',
i.e., maybe it's due to an interference with some other lisp stuff I
load.

 I just wanted to hear if it's known to be a current glitch of the
 export-beamer thing, before I try to drill down (especially since the
 priority is to make he slides compile again rather than
 trouble-shooting. [I just escape to native-latex for multi-cols for
 now]

When done with the presentation, I will try to narrow it down, cutting
down also on the amount of slides (because currently is a long and
complex thing, which I cannot expect others to trawls for abnormalitiees
;-)

Martin






>>>>> "Eric" == Eric S Fraga <esfli...@gmail.com> writes:

Eric> On Wednesday, 14 Feb 2018 at 10:39, Martin Steffen wrote:
>> Hi,
>> 
>> since recently I have a problem with exporting org-beamer-mode,
>> the culprit presumably

Eric> [...]

>> It seems that the BMCOL is the culprit, org-beamer still export a
>> complicated and long document (as it did before), but probably a
>> recent update made it stumble over that particular element.

Eric> Works fine for me with org up to date from git.  Not sure what
Eric> to suggest.  What happens with emacs -Q and loading in org
Eric> with no customizations?

Eric> -- Eric S Fraga via Emacs 27.0.50, Org
Eric> release_9.1.6-118-g134243



[O] orgmode beamer mode: BMCO does not export to latex any longer

2018-02-14 Thread Martin Steffen


Hi, 

since recently I have a problem with exporting org-beamer-mode, the
culprit presumably

 BMCOL

It's org, in beamer mode. The mode still allows to turn some headers
into BMCOL (multiple colums) via some keybindings

``C-c C-b |'' (representing org-beamer-select-environment "|")

That results in lines like
--
*** Some text :B_block:BMCOL:
:PROPERTIES:
:BEAMER_col: 0.5
:END:
.

which is supposed to  be a block taking 50% of the slide's width.


So far so good (and as it used to be). 

Now, when /exporting/ the org-document to latex with 

 C-c C-e l b (l for latex, b for beamer-class)

the export peocedure trips over some error and 
  
   nothing is exported 

(the same occurs if I directly want to generated the PDF, and also if I
export the beamer-org document to a ``arcticle''-kind of style, so to
have a script). The message for the error reads like


--
[...]
org-babel-exp process tac at position 108835...
org-babel-exp process tac at position 109478...
org-beamer--format-block: Wrong type argument: number-or-marker-p, nil
-


It seems that the BMCOL is the culprit, org-beamer still export a
complicated and long document (as it did before), but probably a recent
update made it stumble over that particular element.


Any suggestion where to look?

thanks, Martin

PS: org-version="9.1.6"
emacs-version: GNU Emacs 24.3.1







[O] Org-Mode babel and gherkin

2018-02-08 Thread Charles R (Charlie) Martin
Has anyone set up a babel language for gherkin?

thanks

Charlie Martin


Re: [O] do you need a separate LaTeX installation to export org mode files to pdf?

2018-01-22 Thread Martin Alsinet
Hello Christopher

I have a docker image with LaTeX installed in order not to "pollute" my
local filesystem with the 4GB of additional libraries a full LaTeX
installation requires.
If your co-worker is a software developer you could use that approach.

Here is mi Dockerfile for LaTeX:

FROM ubuntu:xenial
MAINTAINER Martin Alsinet <martin@alsinet>

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update -q
RUN apt-get install -y texlive-full gnuplot python-pygments
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*

Save that in a file named *Dockerfile* in a blank folder and run *docker
build -t latex .*
This will create a docker image named latex with all the libraries and
executables neatly tucked away.
Then, in order to use it, you can save the following script in
~/bin/pdflatex

#!/bin/sh
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
docker run --rm \
   -v $(pwd):$(pwd) \
   -v ~/.ssh:/root/.ssh \
   -w $(pwd) \
   latex \
   pdflatex $@
rm *.log *.aux
rm -f *.ent
rm -Rf _minted-*

With that you can use the *pdflatex* command as usual, and docker creates a
temporary container (docker run --rm ...) from the image, runs the pdflatex
command and removes the container after execution.

bash-3.2$ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.41.0
rm: *.log: No such file or directory
rm: *.aux: No such file or directory



Martin


On Mon, Jan 22, 2018 at 10:23 AM Kaushal Modi <kaushal.m...@gmail.com>
wrote:

> On Mon, Jan 22, 2018 at 9:57 AM Christopher W Ryan <cr...@binghamton.edu>
> wrote:
>
>> Would they need to install LaTeX too, or is org mode self-contained and
>> able to export to pdf without LaTeX an friends installed?
>>
>
> Yes, they'd need to have a LaTeX distribution installed on their system.
> In my experience, installing the full latest version of TexLive is the
> easiest way.
>
>
> --
>
> Kaushal Modi
>


Re: [O] Tab-completion no longer works?

2018-01-10 Thread Martin Steffen
>>>>> "Diego" == Diego Zamboni <di...@zzamboni.org> writes:

Diego> Hi Martin,

Diego> I discovered this only yesterday, when I started using
Diego> org-mode from a git checkout and the shortcuts stopped
Diego> working. Turns out this functionality now has to be enabled
Diego> by loading the org-tempo library:
Diego> https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-tempo.el. 
In

great. That did it. Thanks. Martin







[O] Tab-completion no longer works?

2018-01-09 Thread Martin Steffen


Hi, Since recently ---I can't remember exactly since when--- some
completion-feature I liked does not work any more.

By completion, I mean the expansion of 

   

Re: [O] Hope ob-js can support :session feature

2017-12-24 Thread Martin Alsinet
Hello stardiviner,

I actually don't mind using absoute paths in my org files, and I think that
using something like that header var and expansion is more trouble than it
is worth.
If I wanted to move the org file to another folder, I would just do a
*replace-string* of the old path with the new path and be done with it.

Another approach would be to put a block like the following at the top of
the file:
#+BEGIN_SRC sh
// Make a symbolic link of the current directory into ~/code
ln -s $PWD ~/code
#+END_SRC

And after running that block, I can just use
require("~/code/src/tangled-file.js") in the js blocks and it would work
just fine.
I consider all the tangled js files in ./src as throwaway code, meaning
that I can recreate them at any time, and I would never check them into a
repository.
I usually put them in ./src and add the src folder to my .gitignore.

I find both of these approaches simpler than tangling expanded header
arguments.
Just my 2c.

Happy holidays


Martin

On Sat, Dec 23, 2017 at 10:14 PM numbch...@gmail.com <numbch...@gmail.com>
wrote:

>
> I come up with an idea, use babel header argument :var to pass in the
> absolute path of tangled file.
> And ob-js will expand and replace that :var variable inside of JavaScript
> src block.
> So that you don't need to repeatly manually typing the absolute path of
> the tangled file. Maybe it only one for "require". One question is that I
> don't know whether tangle to auto expand and substitute the :var.
> After a quick test, seems it should be expanded but not indeed. Check out
> the info node of `:no-expand`.
> Here is my quick test:
>
> * Test tangle will auto expand and substitute :var
>
> #+begin_src js :tangle kk.js
> console.log("hello, world!");
> #+end_src
>
> #+begin_src js :var name="chris" :tangle require-kk.js
> // require("kk.js");
> console.log("Hi, ", name);
> #+end_src
>
> #+RESULTS:
> : Hi,  chris
>
> #+NAME: check whether tangle expand and substitute :var
> #+begin_src shell
> cat require-kk.js
> #+end_src
>
> #+RESULTS: check whether tangle expand and substitute :var
> : var name="chris";
> : console.log("Hi, ", name);
>
>
>
>
> [stardiviner] GPG key ID: 47C32433
> IRC(freeenode): stardiviner Twitter:  @numbchild
> Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
> Blog: http://stardiviner.github.io/
>
> On Sat, Dec 23, 2017 at 11:06 AM, Martin Alsinet <mar...@alsinet.com.ar>
> wrote:
>
>> Hello,
>>
>> I don't have a blog yet, it is in my list of new year's resolutions. I
>> will try to explain it here anyway, maybe it can serve as a draft for a
>> blog post.
>>
>> When you hit *C-c* inside of a javascript source block, *ob-js* takes
>> the js code from the js block and saves it into a temp file (in linux the
>> temp file will be in saved /tmp/random-name, while in Mac OS X it will be
>> saved in /var/folders/random-name). Then, it uses *org-babel-eval* to
>> execute the js code, which in turn creates a temp buffer, inserts the
>> contents of the temp file into the temp buffer and uses
>> *shell-command-on-region* to run the js code with *node* as the executed
>> command.
>>
>> That is the reason why you must use absolute paths in the require,
>> because when the code runs it is no longer in the same directory of the org
>> file, but in a temporary folder. If you use
>> require("./src/my-component.js"), require won't find the js file because
>> it is in another directory.
>>
>> Let's try an example (if you want you can send me one of your examples
>> and I can modify it to use my approach)
>>
>> First, I will define two functions to show an array of javascript objects
>> as an org-mode table:
>>
>> #+BEGIN_SRC js :tangle src/table.js
>> function table_row(cells){
>> console.log("|" + cells.join("|") + "|");
>> }
>> function table(rows){
>> console.log("|---|");
>> table_row(Object.keys(rows[0]));
>> console.log("|---|");
>> rows.map(row => table_row(Object.keys(row).map(k => row[k])));
>> console.log("|---|");
>> }
>> module.exports = table;
>> #+END_SRC
>>
>> Notice the :tangle src/table.js property, which I will use to require it
>> in a later block:
>>
>> #+BEGIN_SRC js :results output raw drawer
>> var data = [ { day: 'SUNDAY', accidents: 3986 },
>>   { day: 'MONDAY', accidents: 6109 },
>>   { day: 'SATURDAY', accidents: 6274 },
>>   { day: 'WEDNESDAY',

Re: [O] Hope ob-js can support :session feature

2017-12-22 Thread Martin Alsinet
Hello,

I don't have a blog yet, it is in my list of new year's resolutions. I will
try to explain it here anyway, maybe it can serve as a draft for a blog
post.

When you hit *C-c* inside of a javascript source block, *ob-js* takes the
js code from the js block and saves it into a temp file (in linux the temp
file will be in saved /tmp/random-name, while in Mac OS X it will be saved
in /var/folders/random-name). Then, it uses *org-babel-eval* to execute the
js code, which in turn creates a temp buffer, inserts the contents of the
temp file into the temp buffer and uses *shell-command-on-region* to run
the js code with *node* as the executed command.

That is the reason why you must use absolute paths in the require, because
when the code runs it is no longer in the same directory of the org file,
but in a temporary folder. If you use require("./src/my-component.js"),
require won't find the js file because it is in another directory.

Let's try an example (if you want you can send me one of your examples and
I can modify it to use my approach)

First, I will define two functions to show an array of javascript objects
as an org-mode table:

#+BEGIN_SRC js :tangle src/table.js
function table_row(cells){
console.log("|" + cells.join("|") + "|");
}
function table(rows){
console.log("|---|");
table_row(Object.keys(rows[0]));
console.log("|---|");
rows.map(row => table_row(Object.keys(row).map(k => row[k])));
console.log("|---|");
}
module.exports = table;
#+END_SRC

Notice the :tangle src/table.js property, which I will use to require it in
a later block:

#+BEGIN_SRC js :results output raw drawer
var data = [ { day: 'SUNDAY', accidents: 3986 },
  { day: 'MONDAY', accidents: 6109 },
  { day: 'SATURDAY', accidents: 6274 },
  { day: 'WEDNESDAY', accidents: 6453 },
  { day: 'THURSDAY', accidents: 6546 },
  { day: 'TUESDAY', accidents: 6557 },
  { day: 'FRIDAY', accidents: 6916 } ];

// here you have to use the full path to the table.js file
var view_as_table = require("/app/src/table.js");

view_as_table(data);
#+END_SRC

Then I run *org-babel-tangle* to write the table.js file, and when I hit
*C-c* inside of this last block, it requires the tangled table.js file,
runs the function and we get the following results:

#+RESULTS:
:RESULTS:
|---+---|
| day   | accidents |
|---+---|
| SUNDAY|  3986 |
| MONDAY|  6109 |
| SATURDAY  |  6274 |
| WEDNESDAY |  6453 |
| THURSDAY  |  6546 |
| TUESDAY   |  6557 |
| FRIDAY|  6916 |
|---+---|
:END:

About the order of execution, if you used sessions in my example, you have
to run the first block (which defines the function) before running the
second (which uses it), or it would fail because the table function has not
been loaded.

Now imagine a very long document with dozens of source blocks. In order to
run the block number 23, you will have to run all the preceding blocks on
which that block depends. I don't like that, even if the document is meant
to be read sequentially, from start to finish, I want to be able to open
the org file, go to any section and running  any source code block without
having to remember the sequence of dependencies between them. Worst case,
all I have to do is run org-babel-tangle to update the tangled files. This
has also the added benefit that it forces me to structure my blocks
correctly, from a code architecture point of view.

I hope this makes it clearer for you.


Martin

On Fri, Dec 22, 2017 at 8:07 PM numbch...@gmail.com <numbch...@gmail.com>
wrote:

>
> Can you describe how do you do this in detailed?
> Like:
> > but since I am using docker containers to run node, I always mount the
> current directory as a volume in /app inside the container, so that works
> out fine.
> > I also think that this way forces me to separate the code in modular
> blocks, which is already a good practice in itself.
> How to do this? About this: > With sessions you have to make sure to
> execute the blocks in the correct order to build the "state" that your
> current block needs.
> I think have to use `noweb` reference here.
> (If you have a blog article describe this whole JS literate programming
> setup, that will be useful.)
> Finally, thanks you provide this paradigm.
>
> [stardiviner] GPG key ID: 47C32433
> IRC(freeenode): stardiviner Twitter:  @numbchild
> Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
> Blog: http://stardiviner.github.io/
>
> On Sat, Dec 23, 2017 at 2:32 AM, Martin Alsinet <mar...@alsinet.com.ar>
> wrote:
>
>> Hello stardiviner,
>>
>> On Fri, Dec 22, 2017 at 6:57 AM stardiviner <numbch...@gmail.com> wrote:
>>
>>>
>>> I wish to do Ja

Re: [O] Hope ob-js can support :session feature

2017-12-22 Thread Martin Alsinet
Hello stardiviner,

On Fri, Dec 22, 2017 at 6:57 AM stardiviner <numbch...@gmail.com> wrote:

>
> I wish to do JavaScript Literate Programming in Org-mode.
>
> So the :session header argument is very necessary.
>
>
I do Literate Programming in Javascript with Org-mode, and I have found a
workaround using a combination of tangled files and require.

I separate the logic in source code blocks which then I tangle into js
files and I require those js files in other source blocks.

Example:

#+BEGIN_SRC js :tangle src/parser.js
const fs = require('fs');
const parse = require('csv-parse')

function columns(line){
return line.map(s => s.toLowerCase());
}
parse_csv = function(filename, fn, limit){
fs.readFile(filename, "utf8", function (err, fileData) {
var opts = {columns: columns, trim: true};
if (limit) {
opts.to = limit;
}
parse(fileData, opts, (err, rows) => fn(rows));
});
}
module.exports = parse_csv;
#+END_SRC

So, I tangle that source block into a js file, and then I can use it from
other blocks, without needing sessions at all:

#+BEGIN_SRC
const parser = require("/app/src/parser.js");
const inputFile = './data/records.csv';
parse_csv(inputFile, console.log);
#+END_SRC

The only drawback is that you have to use absolute paths requiring the js
files, but since I am using docker containers to run node, I always mount
the current directory as a volume in /app inside the container, so that
works out fine.
I also think that this way forces me to separate the code in modular
blocks, which is already a good practice in itself.
With sessions you have to make sure to execute the blocks in the correct
order to build the "state" that your current block needs.
This way source blocks function as standalone units that can be run at any
time, I just run *org-babel-tangle* and then hit *C-c *inside the js block.

I hope that helps you.


Martin


[O] Bug: Dead links from clocking tables to other org files in HTML export [9.1.3 (9.1.3-2-g322612-elpa @ /home/mrhn/.emacs.d/elpa/org-20171120/)]

2017-12-01 Thread Martin Hans
When exporting my project with org-publish, the exporter generates
anchors with names such as "orga79e495" and refers to them when linking
to the headers from other files. However, the generated anchor names
don't match between files, resulting in all links being dead.

Furthermore, the publishing directory is not respected, so all links
still point to the directory that the org file was in, even though the
html files are located elsewhere.

Example:

I have put the files needed to reproduce this at
https://gist.github.com/martinhansdk/f81a5fdf340eab591e6df55645cfd22d
They can be viewed there or fetched with git:

git clone
https://gist.github.com/martinhansdk/f81a5fdf340eab591e6df55645cfd22d

Run emacs -Q -l minimal-org.el

Then export with M-x org-publish org

I get files in the exported/ subdirectory.

The last link in the clocking table in exported/time.html is

Worked
on supporting ä, ö, and ü

But that should have been

Worked on supporting ä, ö, and ü

Note that both the path is absolute where it should have been relative
and the anchor is wrong.

As far as I can tell, both problems stem from the fact that the links in
the clocking table are absolute file system links. This is, however how
the clock table code (org-dblock-update) formats the table. If I
manually transform the links in time.org to manual links, then the HTML
links are no longer dead.


As an aside, is there any way to prevent the following line from
appearing in the exported HTML?

#+BEGIN: clocktable :scope agenda :link t :maxlevel 5


Thanks,
  Martin


Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-09-12 on hullmann, modified by Debian
Package: Org mode version 9.1.3 (9.1.3-2-g322612-elpa @
/home/mrhn/.emacs.d/elpa/org-20171120/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
 org-link-file-path-type 'relative
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn ## CONTENTS)"]
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-block-all append
local] 5
   "\n\n(fn)"]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all append
local]
   5 "\n\n(fn)"]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS
WIDTH)"]
 org-odt-format-inlinetask-function
'org-odt-format-inlinetask-default-function
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-html-format-headline-function
'org-html-format-headline-default-function
 org-link-parameters '(("id" :follow org-id-open)
   ("rmail" :follow org-rmail-open :store org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link)
   ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export
:store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete
  

Re: [O] can't get org-mode noweb tangle to work

2017-11-24 Thread Martin Alsinet
Hello Charlie:

I have found that I like better to use a combination of tangle and import
instead of noweb syntax.

#+BEGIN_SRC python :tangle board.py
def init_board(args)
return [[-1 for x in range(3)] for y in range(3)]
#+END_SRC

#+BEGIN_SRC python
import sys
import os
from board import init_board

def main(args):
init_board(args)

if __name__ == "__main__":
main(sys.argv)
#+END_SRC

Then, you do a *M-x org-babel-tangle* and org will write the first block
into board.py. Then you go into the second block and run it with *C-c C-c* and
it will load the init_board function from the tangled file.

Writing it this way forces you to modularize your code blocks to be able to
call them from other blocks and you can even build your whole application
tangling the source blocks into files.

The :noweb syntax seems to me to be a templating solution used for a code
module problem.

I hope it helps you


Martin

On Fri, Nov 24, 2017 at 7:52 PM Charles R (Charlie) Martin <
chasrmar...@gmail.com> wrote:

> Grumble. Okay, this is sorted/ There are amazing numbers of
> not-quite-right examples on the web.
>
> Thanks, Tom, I now have the below, which works.
>
> #+TITLE: Console Tic Tac Toe
> #+SUBTITLE: A Literate Program in EMACS Org-Mode
> #+AUTHOR: Charlie Martin
> #+STARTUP: showall
>
> #+BEGIN_SRC python :tangle yes :noweb yes
>   import sys
>   import os
>
>   def main(args):
>   <>
>
>   if __name__ == "__main__":
>   main(sys.argv)
> #+END_SRC
>
> #+NAME: initialize-the-game-board
> #+BEGIN_SRC python
>   board = [[-1 for x in range(3)] for y in range(3)]
> #+END_SRC
>
>
>
>
> On Fri, Nov 24, 2017 at 5:26 PM, Thomas S. Dye <t...@tsdye.com> wrote:
>
>> Aloha Charlie,
>>
>> Charles R (Charlie) Martin writes:
>>
>> > I'm trying to get literate programming with `:noweb` syntax working in
>> > org-mode. I think I'm down to about the minimum case:
>> >
>> > #+TITLE: Console Tic Tac Toe
>> > #+SUBTITLE: A Literate Program in EMACS Org-Mode
>> > #+AUTHOR: Charlie Martin
>> > #+STARTUP: showall
>> >
>> > #+BEGIN_SRC python :tangle yes :noweb
>> >   import sys
>> >   import os
>> >
>> >   def main(args):
>> >   <>
>> >
>> >   if __name__ == "__main__":
>> >   main(sys.argv)
>> > #+END_SRC
>> >
>> > #+NAME: initialize-the-game-board
>> > #+BEGIN_SRC python :tangle yes :noweb
>> >   board = [[-1 for x in range(3)] for y in range(3)]
>> > #+END_SRC
>> >
>> > but when I tangle it I get:
>> >
>> > import sys
>> > import os
>> >
>> > def main(args):
>> > <>
>> >
>> > if __name__ == "__main__":
>> > main(sys.argv)
>> >
>> > board = [[-1 for x in range(3)] for y in range(3)]
>> >
>> > I've tried permuting the argument, flags, and so on to no avail.
>> >
>> > EMACS version is 25.3.1 MacOS, org-mode 9.1.3
>>
>> I think it should be :noweb yes
>>
>> hth,
>> Tom
>>
>> --
>> Thomas S. Dye
>> http://www.tsdye.com
>>
>
>


Re: [O] can't get org-mode noweb tangle to work

2017-11-24 Thread Charles R (Charlie) Martin
Grumble. Okay, this is sorted/ There are amazing numbers of not-quite-right
examples on the web.

Thanks, Tom, I now have the below, which works.

#+TITLE: Console Tic Tac Toe
#+SUBTITLE: A Literate Program in EMACS Org-Mode
#+AUTHOR: Charlie Martin
#+STARTUP: showall

#+BEGIN_SRC python :tangle yes :noweb yes
  import sys
  import os

  def main(args):
  <>

  if __name__ == "__main__":
  main(sys.argv)
#+END_SRC

#+NAME: initialize-the-game-board
#+BEGIN_SRC python
  board = [[-1 for x in range(3)] for y in range(3)]
#+END_SRC




On Fri, Nov 24, 2017 at 5:26 PM, Thomas S. Dye <t...@tsdye.com> wrote:

> Aloha Charlie,
>
> Charles R (Charlie) Martin writes:
>
> > I'm trying to get literate programming with `:noweb` syntax working in
> > org-mode. I think I'm down to about the minimum case:
> >
> > #+TITLE: Console Tic Tac Toe
> > #+SUBTITLE: A Literate Program in EMACS Org-Mode
> > #+AUTHOR: Charlie Martin
> > #+STARTUP: showall
> >
> > #+BEGIN_SRC python :tangle yes :noweb
> >   import sys
> >   import os
> >
> >   def main(args):
> >   <>
> >
> >   if __name__ == "__main__":
> >   main(sys.argv)
> > #+END_SRC
> >
> > #+NAME: initialize-the-game-board
> > #+BEGIN_SRC python :tangle yes :noweb
> >   board = [[-1 for x in range(3)] for y in range(3)]
> > #+END_SRC
> >
> > but when I tangle it I get:
> >
> > import sys
> > import os
> >
> > def main(args):
> > <>
> >
> > if __name__ == "__main__":
> > main(sys.argv)
> >
> > board = [[-1 for x in range(3)] for y in range(3)]
> >
> > I've tried permuting the argument, flags, and so on to no avail.
> >
> > EMACS version is 25.3.1 MacOS, org-mode 9.1.3
>
> I think it should be :noweb yes
>
> hth,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>


[O] can't get org-mode noweb tangle to work

2017-11-24 Thread Charles R (Charlie) Martin
I'm trying to get literate programming with `:noweb` syntax working in
org-mode. I think I'm down to about the minimum case:

#+TITLE: Console Tic Tac Toe
#+SUBTITLE: A Literate Program in EMACS Org-Mode
#+AUTHOR: Charlie Martin
#+STARTUP: showall

#+BEGIN_SRC python :tangle yes :noweb
  import sys
  import os

  def main(args):
  <>

  if __name__ == "__main__":
  main(sys.argv)
#+END_SRC

#+NAME: initialize-the-game-board
#+BEGIN_SRC python :tangle yes :noweb
  board = [[-1 for x in range(3)] for y in range(3)]
#+END_SRC

but when I tangle it I get:

import sys
import os

def main(args):
<>

if __name__ == "__main__":
main(sys.argv)

board = [[-1 for x in range(3)] for y in range(3)]

I've tried permuting the argument, flags, and so on to no avail.

EMACS version is 25.3.1 MacOS, org-mode 9.1.3


[O] Bug: Dead links from clocking tables to other org files in HTML export [9.1.3 (9.1.3-2-g322612-elpa @ /home/mrhn/.emacs.d/elpa/org-20171120/)]

2017-11-24 Thread Martin Hans
When exporting my project with org-publish, the exporter generates
anchors with names such as "orga79e495" and refers to them when linking
to the headers from other files. However, the generated anchor names
don't match between files, resulting in all links being dead.

Furthermore, the publishing directory is not respected, so all links
still point to the directory that the org file was in, even though the
html files are located elsewhere.

Example:

I have put the files needed to reproduce this at
https://gist.github.com/martinhansdk/f81a5fdf340eab591e6df55645cfd22d
They can be viewed there or fetched with git:

git clone https://gist.github.com/martinhansdk/
f81a5fdf340eab591e6df55645cfd22d

Run emacs -Q -l minimal-org.el

Then export with M-x org-publish org

I get files in the exported/ subdirectory.

The last link in the clocking table in exported/time.html is

Worked on supporting ä, ö, and ü

But that should have been

Worked on supporting ä, ö, and ü

Note that both the path is absolute where it should have been relative
and the anchor is wrong.

As far as I can tell, both problems stem from the fact that the links in
the clocking table are absolute file system links. This is, however how
the clock table code (org-dblock-update) formats the table. If I
manually transform the links in time.org to manual links, then the HTML
links are no longer dead.


As an aside, is there any way to prevent the following line from
appearing in the exported HTML?

#+BEGIN: clocktable :scope agenda :link t :maxlevel 5


Thanks,
  Martin


Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-09-12 on hullmann, modified by Debian
Package: Org mode version 9.1.3 (9.1.3-2-g322612-elpa @
/home/mrhn/.emacs.d/elpa/org-20171120/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
 org-link-file-path-type 'relative
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-latex-format-inlinetask-function 'org-latex-format-inlinetask-
default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function 'org-latex-format-headline-
default-function
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn ## CONTENTS)"]
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-block-all append
local] 5
   "\n\n(fn)"]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all append
local]
   5 "\n\n(fn)"]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS
WIDTH)"]
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-
default-function
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-html-format-headline-function 'org-html-format-headline-
default-function
 org-link-parameters '(("id" :follow org-id-open)
   ("rmail" :follow org-rmail-open :store org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link)
   ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export
:store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete
  

Re: [O] Potential bug: embedded dot fails on require ob-graphviz-dot

2017-11-19 Thread Charles R (Charlie) Martin
oh and the answer to your direct question is 9.1.3.

I suspect this is related to the issue where you can have a source-type
'shell' but only can execute a shell blockif it's source type 'sh'.

On Sun, Nov 19, 2017 at 1:03 PM, Charles R (Charlie) Martin <
chasrmar...@gmail.com> wrote:

> I think the problem is that if you register graphviz-dot as a language, it
> generates that require.  I got it halfway working by changing the language
> back to just dot; I need to go back figure out how to nonetheless use
> graphviz-mode for editing.
>
> On Sun, Nov 19, 2017 at 12:57 PM, Eric S Fraga <esfli...@gmail.com> wrote:
>
>> On Saturday, 18 Nov 2017 at 12:57, Charles R (Charlie) Martin wrote:
>> > I'm trying to use `dot` inside `org-mode` and having no luck, because
>> when
>> > I evaluate
>>
>> What version of org are you using?  The version I'm using has no
>> reference to ob-graphviz-dot.
>>
>> (but the version I am using is a week or so out of date...).
>>
>> --
>> : Eric S Fraga via Emacs 27.0.50, Org release_9.1.3-162-gde289d
>>
>
>


Re: [O] Potential bug: embedded dot fails on require ob-graphviz-dot

2017-11-19 Thread Charles R (Charlie) Martin
I think the problem is that if you register graphviz-dot as a language, it
generates that require.  I got it halfway working by changing the language
back to just dot; I need to go back figure out how to nonetheless use
graphviz-mode for editing.

On Sun, Nov 19, 2017 at 12:57 PM, Eric S Fraga <esfli...@gmail.com> wrote:

> On Saturday, 18 Nov 2017 at 12:57, Charles R (Charlie) Martin wrote:
> > I'm trying to use `dot` inside `org-mode` and having no luck, because
> when
> > I evaluate
>
> What version of org are you using?  The version I'm using has no
> reference to ob-graphviz-dot.
>
> (but the version I am using is a week or so out of date...).
>
> --
> : Eric S Fraga via Emacs 27.0.50, Org release_9.1.3-162-gde289d
>


[O] Potential bug: embedded dot fails on require ob-graphviz-dot

2017-11-19 Thread Charles R (Charlie) Martin
I'm trying to use `dot` inside `org-mode` and having no luck, because when
I evaluate

(org-babel-do-load-languages
 'org-babel-load-languages
 '((dot . t)))

it tries to require `ob-graphviz-dot` -- unsuccessfully.

Debugger entered--Lisp error: (file-error "Cannot open load file" "No
such file or directory" "ob-graphviz-dot")
  require(ob-graphviz-dot)

I can't find `ob-graphviz-dot` anywhere.


Re: [O] ob-python newline & indentation behavior

2017-11-18 Thread Martin Alsinet
Sorry Jack, I overlooked the :session bit.
Disregard my email please


On Sat, Nov 18, 2017 at 10:27 PM Martin Alsinet <mar...@alsinet.com.ar>
wrote:

> Hello Jack:
>
> What versions of emacs and org-mode are you using?
>
> I tried your example on Emacs 25.3.1 and org-mode 9.1.2-22 and I got "20"
> as result
> It has happened to me in the past that some bug I was seeing goes away
> just by updating org-mode.
>
> Regards,
>
>
> Martin
>
> On Sat, Nov 18, 2017 at 5:16 PM Jack Kamm <jackk...@gmail.com> wrote:
>
>> Thanks Kyle, and sorry for missing that recent related thread.
>>
>> I adapted your old patch to the current master branch. I also extended it
>> to work for ":results value" (the original patch only worked for ":results
>> output"). I did this by not writing the last line of the code block to the
>> tmpfile, unless it is indented.
>>
>> I've never contributed before so would appreciate any comments on this
>> patch, and how to get it accepted. Cheers, Jack.
>>
>> From a5d553ece9f6ee35cd1e273e554a21a19e80ec3c Mon Sep 17 00:00:00 2001
>>
>> From: Jack Kamm <jackk...@gmail.com>
>> Date: Sat, 18 Nov 2017 21:47:09 +
>> Subject: [PATCH] fix newline/indentation issues in ob-python :session
>>
>> ---
>>  lisp/ob-python.el | 33 +
>>  1 file changed, 33 insertions(+)
>>
>> diff --git a/lisp/ob-python.el b/lisp/ob-python.el
>> index 60ec5fa47..6623ef5fc 100644
>> --- a/lisp/ob-python.el
>> +++ b/lisp/ob-python.el
>> @@ -303,6 +303,10 @@ last statement in BODY, as elisp."
>>(mapc (lambda (line) (insert line) (funcall
>> send-wait))
>>  (split-string body "[\r\n]"))
>>(funcall send-wait)))
>> +(indented-p (org-babel-python--indented-p body))
>> +(body (if indented-p
>> +  (org-babel-python--replace-body-tmpfile body)
>> +body))
>>   (results
>>(pcase result-type
>>  (`output
>> @@ -340,6 +344,35 @@ last statement in BODY, as elisp."
>>(substring string 1 -1)
>>  string))
>>
>> +
>> +(defun org-babel-python--indented-p (input)
>> + "Non-nil if any line in INPUT is indented."
>> + (string-match-p "^[ \t]" input))
>> +
>> +(defun org-babel-python--replace-body-tmpfile (body)
>> +  "Place body in tmpfile, and return string to exec the tmpfile.
>> +If last line of body is not indented, place it at end of exec string
>> +instead of tmpfile, so shell can see the result"
>> +  (let* ((tmp-file (org-babel-temp-file "python-"))
>> +(lines (split-string body "\n" t))
>> +(lastline (car (last lines)))
>> +(newbody (concat
>> +  (format "__pyfilename = '%s'; " tmp-file)
>> +  "__pyfile = open(__pyfilename); "
>> +  "exec(compile("
>> +  "__pyfile.read(), __pyfilename, 'exec'"
>> +  ")); "
>> +  "__pyfile.close()")))
>> +(if (string-match-p "^[ \t]" lastline)
>> +   (progn
>> + (with-temp-file tmp-file (insert body))
>> + newbody)
>> +  (with-temp-file tmp-file
>> +   (insert (mapconcat 'identity
>> +  (butlast lines) "\n")))
>> +  (concat newbody "\n" lastline)))
>> +  )
>> +
>>  (provide 'ob-python)
>>
>>
>> --
>> 2.15.0
>>
>>
>> On Sat, Nov 18, 2017 at 3:05 PM, Kyle Meyer <k...@kyleam.com> wrote:
>>
>>> Hello,
>>>
>>> Jack Kamm <jackk...@gmail.com> writes:
>>>
>>> > ob-python newline & indentation behavior in :session is very ugly and
>>> > possibly broken. For example, consider the following code block:
>>>
>>> [...]
>>>
>>> > There is a 2 year old patch that fixes this behavior but has not yet
>>> > been incorporated:
>>> > https://lists.gnu.org/archive/html/emacs-orgmode/2015-03/msg00505.html
>>>
>>> [...]
>>>
>>> > The patch follows the python.el behavior of using a temporary file and
>>> > executing that from the shell.
>>> >
>>> > Could this patch, or something similar, be incorporated into org-mode,
>>> > to fix this behavior?
>>>
>>> Here's what I said in a recent post about ob-python sessions:
>>>
>>>
>>> https://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00198.html
>>>
>>> I dropped my attempt to fix it because 1) I was still having trouble
>>> getting a complete understanding of what the issue was and 2) I
>>> didn't
>>> have the motivation to spend time digging deeper because I don't use
>>> ob-python (and in general am not a heavy Org-Babel user).  Perhaps
>>> you
>>> or some other ob-python user could help make ob-python sessions more
>>> robust?
>>>
>>> Perhaps you are the "you"?
>>>
>>> --
>>> Kyle
>>>
>>
>>


Re: [O] ob-python newline & indentation behavior

2017-11-18 Thread Martin Alsinet
Hello Jack:

What versions of emacs and org-mode are you using?

I tried your example on Emacs 25.3.1 and org-mode 9.1.2-22 and I got "20"
as result
It has happened to me in the past that some bug I was seeing goes away just
by updating org-mode.

Regards,


Martin

On Sat, Nov 18, 2017 at 5:16 PM Jack Kamm <jackk...@gmail.com> wrote:

> Thanks Kyle, and sorry for missing that recent related thread.
>
> I adapted your old patch to the current master branch. I also extended it
> to work for ":results value" (the original patch only worked for ":results
> output"). I did this by not writing the last line of the code block to the
> tmpfile, unless it is indented.
>
> I've never contributed before so would appreciate any comments on this
> patch, and how to get it accepted. Cheers, Jack.
>
> From a5d553ece9f6ee35cd1e273e554a21a19e80ec3c Mon Sep 17 00:00:00 2001
>
> From: Jack Kamm <jackk...@gmail.com>
> Date: Sat, 18 Nov 2017 21:47:09 +
> Subject: [PATCH] fix newline/indentation issues in ob-python :session
>
> ---
>  lisp/ob-python.el | 33 +
>  1 file changed, 33 insertions(+)
>
> diff --git a/lisp/ob-python.el b/lisp/ob-python.el
> index 60ec5fa47..6623ef5fc 100644
> --- a/lisp/ob-python.el
> +++ b/lisp/ob-python.el
> @@ -303,6 +303,10 @@ last statement in BODY, as elisp."
>(mapc (lambda (line) (insert line) (funcall
> send-wait))
>  (split-string body "[\r\n]"))
>(funcall send-wait)))
> +(indented-p (org-babel-python--indented-p body))
> +(body (if indented-p
> +  (org-babel-python--replace-body-tmpfile body)
> +body))
>   (results
>(pcase result-type
>  (`output
> @@ -340,6 +344,35 @@ last statement in BODY, as elisp."
>(substring string 1 -1)
>  string))
>
> +
> +(defun org-babel-python--indented-p (input)
> + "Non-nil if any line in INPUT is indented."
> + (string-match-p "^[ \t]" input))
> +
> +(defun org-babel-python--replace-body-tmpfile (body)
> +  "Place body in tmpfile, and return string to exec the tmpfile.
> +If last line of body is not indented, place it at end of exec string
> +instead of tmpfile, so shell can see the result"
> +  (let* ((tmp-file (org-babel-temp-file "python-"))
> +(lines (split-string body "\n" t))
> +(lastline (car (last lines)))
> +(newbody (concat
> +  (format "__pyfilename = '%s'; " tmp-file)
> +  "__pyfile = open(__pyfilename); "
> +  "exec(compile("
> +  "__pyfile.read(), __pyfilename, 'exec'"
> +  ")); "
> +  "__pyfile.close()")))
> +(if (string-match-p "^[ \t]" lastline)
> +   (progn
> + (with-temp-file tmp-file (insert body))
> + newbody)
> +  (with-temp-file tmp-file
> +   (insert (mapconcat 'identity
> +  (butlast lines) "\n")))
> +  (concat newbody "\n" lastline)))
> +  )
> +
>  (provide 'ob-python)
>
>
> --
> 2.15.0
>
>
> On Sat, Nov 18, 2017 at 3:05 PM, Kyle Meyer <k...@kyleam.com> wrote:
>
>> Hello,
>>
>> Jack Kamm <jackk...@gmail.com> writes:
>>
>> > ob-python newline & indentation behavior in :session is very ugly and
>> > possibly broken. For example, consider the following code block:
>>
>> [...]
>>
>> > There is a 2 year old patch that fixes this behavior but has not yet
>> > been incorporated:
>> > https://lists.gnu.org/archive/html/emacs-orgmode/2015-03/msg00505.html
>>
>> [...]
>>
>> > The patch follows the python.el behavior of using a temporary file and
>> > executing that from the shell.
>> >
>> > Could this patch, or something similar, be incorporated into org-mode,
>> > to fix this behavior?
>>
>> Here's what I said in a recent post about ob-python sessions:
>>
>>
>> https://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00198.html
>>
>> I dropped my attempt to fix it because 1) I was still having trouble
>> getting a complete understanding of what the issue was and 2) I didn't
>> have the motivation to spend time digging deeper because I don't use
>> ob-python (and in general am not a heavy Org-Babel user).  Perhaps you
>> or some other ob-python user could help make ob-python sessions more
>> robust?
>>
>> Perhaps you are the "you"?
>>
>> --
>> Kyle
>>
>
>


Re: [O] cs export translations

2017-11-12 Thread Martin Šlouf
 ("Listing %d:"
  ("ar" :default "برنامج %d:")
+ ("cs" :default "Program %d:")
  ("da" :default "Program %d")
  ("de" :default "Programmlisting %d")
  ("es" :default "Listado de programa %d")
@@ -5907,20 +5917,24 @@ them."
  ("zh-CN" :html "%d" :utf-8 "代码%d "))
 ("References"
  ("ar" :default "المراجع")
+ ("cs" :default "Reference")
  ("fr" :ascii "References" :default "Références")
  ("de" :default "Quellen")
  ("es" :default "Referencias")
  ("sl" :default "Reference"))
 ("See figure %s"
+ ("cs" :default "Viz obrázek %s")
  ("fr" :default "cf. figure %s"
   :html "cf.figure%s" :latex "cf.~figure~%s")
  ("sl" :default "Glej sliko %s"))
 ("See listing %s"
+ ("cs" :default "Viz program %s")
  ("fr" :default "cf. programme %s"
   :html "cf.programme%s" :latex "cf.~programme~%s")
  ("sl" :default "Glej izpis programa %s"))
 ("See section %s"
  ("ar" :default "انظر قسم %s")
+ ("cs" :default "Viz sekce %s")
  ("da" :default "jævnfør afsnit %s")
  ("de" :default "siehe Abschnitt %s")
  ("es" :ascii "Vea seccion %s" :html "Vea seccin %s" :default "Vea sección %s")
@@ -5934,11 +5948,13 @@ them."
  ("sl" :default "Glej poglavje %d")
  ("zh-CN" :html "%s" :utf-8 "参见第%s节"))
 ("See table %s"
+ ("cs" :default "Viz tabulka %s")
  ("fr" :default "cf. tableau %s"
   :html "cf.tableau%s" :latex "cf.~tableau~%s")
  ("sl" :default "Glej tabelo %s"))
 ("Table"
  ("ar" :default "جدول")
+ ("cs" :default "Tabulka")
  ("de" :default "Tabelle")
  ("es" :default "Tabla")
  ("et" :default "Tabel")
@@ -5951,6 +5967,7 @@ them."
  ("zh-CN" :html "" :utf-8 "表"))
 ("Table %d:"
  ("ar" :default "جدول %d:")
+ ("cs" :default "Tabulka %d:")
  ("da" :default "Tabel %d")
  ("de" :default "Tabelle %d")
  ("es" :default "Tabla %d")

m.

Martin Šlouf <mar...@slouf.name> writes:

> Hello,
>
> I am sending minor patch with updated and reviewed cs export
> translations.
>
> Tested on my local installation.
>
> Best Regards,
> -- 
> Martin Šlouf
> https://martin.slouf.name/
> diff --git a/lisp/ox.el b/lisp/ox.el
> index 953a72327..6e37a07a2 100644
> --- a/lisp/ox.el
> +++ b/lisp/ox.el
> @@ -5715,6 +5715,7 @@ them."
>   ("zh-TW" :html "" :utf-8 "作者"))
>  ("Continued from previous page"
>   ("ar" :default "تتمة الصفحة السابقة")
> + ("cs" :default "Pokračovaní z předchozí strany")
>   ("de" :default "Fortsetzung von vorheriger Seite")
>   ("es" :html "Contina de la pgina anterior" :ascii 
> "Continua de la pagina anterior" :default "Continúa de la página anterior")
>   ("fr" :default "Suite de la page précédente")
> @@ -5727,6 +5728,7 @@ them."
>   ("sl" :default "Nadaljevanje s prejšnje strani"))
>  ("Continued on next page"
>   ("ar" :default "التتمة في الصفحة التالية")
> + ("cs" :default "Pokračuje na další stránce")
>   ("de" :default "Fortsetzung nächste Seite")
>   ("es" :html "Contina en la siguiente pgina" :ascii 
> "Continua en la siguiente pagina" :default "Continúa en la siguiente página")
>   ("fr" :default "Suite page suivante")
> @@ -5738,6 +5740,7 @@ them."
>:utf-8 "(Продолжение следует)")
>   ("sl" :default "Nadaljevanje na naslednji strani"))
>  ("Created"
> + ("cs" :default "Vytvořeno")
>   ("sl" :default "Ustvarjeno"))
>  ("Date"
>   (&qu

[O] cs export translations

2017-11-12 Thread Martin Šlouf
Hello,

I am sending minor patch with updated and reviewed cs export
translations.

Tested on my local installation.

Best Regards,
-- 
Martin Šlouf
https://martin.slouf.name/
diff --git a/lisp/ox.el b/lisp/ox.el
index 953a72327..6e37a07a2 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5715,6 +5715,7 @@ them."
  ("zh-TW" :html "" :utf-8 "作者"))
 ("Continued from previous page"
  ("ar" :default "تتمة الصفحة السابقة")
+ ("cs" :default "Pokračovaní z předchozí strany")
  ("de" :default "Fortsetzung von vorheriger Seite")
  ("es" :html "Contina de la pgina anterior" :ascii "Continua de la pagina anterior" :default "Continúa de la página anterior")
  ("fr" :default "Suite de la page précédente")
@@ -5727,6 +5728,7 @@ them."
  ("sl" :default "Nadaljevanje s prejšnje strani"))
 ("Continued on next page"
  ("ar" :default "التتمة في الصفحة التالية")
+ ("cs" :default "Pokračuje na další stránce")
  ("de" :default "Fortsetzung nächste Seite")
  ("es" :html "Contina en la siguiente pgina" :ascii "Continua en la siguiente pagina" :default "Continúa en la siguiente página")
  ("fr" :default "Suite page suivante")
@@ -5738,6 +5740,7 @@ them."
   :utf-8 "(Продолжение следует)")
  ("sl" :default "Nadaljevanje na naslednji strani"))
 ("Created"
+ ("cs" :default "Vytvořeno")
  ("sl" :default "Ustvarjeno"))
 ("Date"
  ("ar" :default "بتاريخ")
@@ -5767,6 +5770,7 @@ them."
  ("zh-TW" :html "" :utf-8 "日期"))
 ("Equation"
  ("ar" :default "معادلة")
+ ("cs" :default "Rovnice")
  ("da" :default "Ligning")
  ("de" :default "Gleichung")
  ("es" :ascii "Ecuacion" :html "Ecuacin" :default "Ecuación")
@@ -5785,6 +5789,7 @@ them."
  ("zh-CN" :html "" :utf-8 "方程"))
 ("Figure"
  ("ar" :default "شكل")
+ ("cs" :default "Obrázek")
  ("da" :default "Figur")
  ("de" :default "Abbildung")
  ("es" :default "Figura")
@@ -5800,6 +5805,7 @@ them."
  ("zh-CN" :html "" :utf-8 "图"))
 ("Figure %d:"
  ("ar" :default "شكل %d:")
+ ("cs" :default "Obrázek %d:")
  ("da" :default "Figur %d")
  ("de" :default "Abbildung %d:")
  ("es" :default "Figura %d:")
@@ -5818,7 +5824,7 @@ them."
 ("Footnotes"
  ("ar" :default "الهوامش")
  ("ca" :html "Peus de pgina")
- ("cs" :default "Pozn\xe1mky pod carou")
+ ("cs" :default "Poznámky pod čarou")
  ("da" :default "Fodnoter")
  ("de" :html "Funoten" :default "Fußnoten")
  ("eo" :default "Piednotoj")
@@ -5845,6 +5851,7 @@ them."
  ("zh-TW" :html "" :utf-8 "腳註"))
 ("List of Listings"
  ("ar" :default "قائمة بالبرامج")
+ ("cs" :default "Seznam programů")
  ("da" :default "Programmer")
  ("de" :default "Programmauflistungsverzeichnis")
  ("es" :ascii "Indice de Listados de programas" :html "ndice de Listados de programas" :default "Índice de Listados de programas")
@@ -5859,6 +5866,7 @@ them."
  ("zh-CN" :html "" :utf-8 "代码目录"))
 ("List of Tables"
  ("ar" :default "قائمة بالجداول")
+ ("cs" :default "Seznam tabulek")
  ("da" :default "Tabeller")
  ("de" :default "Tabellenverzeichnis")
  ("es" :ascii "Indice de tablas" :html "ndice de tablas" :default "Índice de tablas")
@@ -5877,6 +5885,7 @@ them."
  ("zh-CN" :html "" :utf-8 "表格目录"))
 ("Listing"
  ("ar" :default "برنامج")
+ ("cs" :default "Program")
  ("da" :default "Program")
  ("de" :default "Programmlisting")
  (

Re: [O] C++ sessions for Babel with cling interpreter

2017-11-05 Thread Martin Alsinet
Hello Garjola:

I have not used C++ source blocks, but I use them frequently with
Javascript and Python, and I don't use sessions.
The thing is, for literate programming, we want to include the code from
one source block in others, and it would seem that sessions are the
solution.
However, I find that for me it is better to use tangle to export the code
to source files and then include the tangled files from the other source
blocks.

Example:

#+BEGIN_SRC js :tangle src/hello.js
function hello(text) {
console.log("hello " + text);
}
module.exports = hello;
#+END_SRC

First I have to run *org-babel-tangle* to export all source blocks to
files, and then I can include them in other blocks.

#+BEGIN_SRC js
const hello = require("./src/hello.js");
hello("Martin");
#+END_SRC

>From what I remember, it is possible to do the same in C++, including the
source files you need from the filesystem.
In my opinion, this approach is better than sessions, because the problem
with sessions is that you have to make sure the blocks are executed
secuentially in the right order to build the "state" that allows you to run
your current block. This way each block is independent of all others, worst
case you have to run org-babel-tangle to create the required files.

Regards,


Martín


On Sun, Nov 5, 2017 at 12:13 PM <garj...@garjola.net> wrote:

> Hi all,
>
> I use C++ source code blocks in babel frequently and I am very happy with
> the results. As C++ is a compiled language, ob-C.el does not support
> sessions.
>
> Unfortunately, this breaks a little my litterate programming workflow,
> since I don't know how to use small code snippets without sessions.
>
> I have recently discovered cling [1], [2] a C++ interpreter which comes
> with de Root package [3]. I have also found a cling inferior mode [4] to
> interact with the interpreter in a comint buffer.
>
> I was wondering if it would be difficult to update ob-C.el to use cling
> for session support. My elisp knowledge is too poor to understand what is
> involved in doing such a thing, but I would be interested in trying or
> helping somebody do it. Unfortunately, I have the impression that the
> developers of ob-C.el are not around this list anymore?
>
> I would very much appreciate suggestions on how to proceed.
>
> Thank you.
>
> Garjola.
>
> Footnotes:
> [1]  https://root.cern.ch/cling
> [2]  https://www.youtube.com/watch?v=Lbi7MLS03Yc
> [3]  https://root.cern.ch/
> [4]  https://github.com/brianqq/inferior-cling
>
> --
> Dr. Dindi
> Dad, Philosopher, Hacker
>
>


Re: [O] org-babel source block unevaluated into variable?

2017-10-26 Thread Martin Alsinet
Johan:

Maybe this one would work for you:

#+NAME: first
#+BEGIN_SRC js
function one() {
return 1;
}
#+END_SRC


#+NAME: second
#+BEGIN_SRC js
function two() {
return 2;
}
#+END_SRC


#+NAME: third
#+BEGIN_SRC js
function three() {
return 3;
}
#+END_SRC


#+NAME: all
#+BEGIN_SRC sh :results output :noweb yes
echo "
<>

<>

function test(){ console.log('test');}

<>"
#+END_SRC



#+BEGIN_SRC python :results output :var code=all
print code
#+END_SRC

#+RESULTS:
#+begin_example

function two() {
return 2
}

function one() {
return 1;
}

function test(){ console.log('test');}

function three() {
return 3;
}

#+end_example


On Thu, Oct 26, 2017 at 6:17 AM Johan W. Klüwer <johan.w.klu...@gmail.com>
wrote:

> Thanks Martin,
>
> These are good suggestions, but it's not quite what I am after. In your
> second example, I would like ":var code=example" to make "code" carry the
> full (and expanded) text of the "example" block, i.e. to have
>
>   echo ls -alh
>
> as the result -- the code itself, unevaluated.
>
> Johan
>
> 2017-10-25 17:52 GMT+02:00 Martin Alsinet <mar...@alsinet.com.ar>:
>
>> Johan:
>>
>> To use expanded noweb references you can use text source blocks
>>
>> #+NAME: lscode
>> #+BEGIN_SRC *text*
>> ls -alh
>> #+END_SRC
>>
>>
>> #+NAME: example
>> #+BEGIN_SRC sh :noweb yes
>> echo <>
>> #+END_SRC
>>
>> #+RESULTS: example
>> : ls -alh
>>
>>
>> #+BEGIN_SRC emacs-lisp :var code=example
>> (message code)
>> #+END_SRC
>>
>> #+RESULTS:
>> : ls -alh
>>
>>
>> Martín
>>
>> On Wed, Oct 25, 2017 at 10:36 AM Martin Alsinet <mar...@alsinet.com.ar>
>> wrote:
>>
>>> Johan:
>>>
>>> You can try the following:
>>>
>>> #+NAME: lscode
>>> #+BEGIN_ASCII
>>> ls -alh
>>> #+END_ASCII
>>>
>>> #+BEGIN_SRC emacs-lisp :var code=lscode
>>> (message code)
>>> #+END_SRC
>>>
>>> #+RESULTS:
>>> : ls -alh
>>>
>>> I haven't tried the noweb references, but it does return the code block
>>> in the variable.
>>>
>>>
>>> Martín
>>>
>>> On Wed, Oct 25, 2017 at 9:22 AM Johan W. Klüwer <
>>> johan.w.klu...@gmail.com> wrote:
>>>
>>>> Is there a way to assign the uninterpreted content of an executable
>>>> source block to a variable? Preferably, using a :var header argument? That
>>>> is, return the text in the block, not the result of evaluating it, and
>>>> preferably with noweb references expanded.
>>>>
>>>> "example" blocks return text the way I want, but they can't be
>>>> evaluated, and of course noweb is ruled out for them.
>>>>
>>>> The function org-babel-ref-resolve could to the job if there were a
>>>> switch to block evaluation.
>>>>
>>>>
>>>> Why this is interesting: I wish to use url-hexify-string on the text of
>>>> a named SPARQL query.
>>>>
>>>> Cheers, Johan
>>>>
>>>
>


Re: [O] org-babel source block unevaluated into variable?

2017-10-25 Thread Martin Alsinet
Johan:

To use expanded noweb references you can use text source blocks

#+NAME: lscode
#+BEGIN_SRC *text*
ls -alh
#+END_SRC


#+NAME: example
#+BEGIN_SRC sh :noweb yes
echo <>
#+END_SRC

#+RESULTS: example
: ls -alh


#+BEGIN_SRC emacs-lisp :var code=example
(message code)
#+END_SRC

#+RESULTS:
: ls -alh


Martín

On Wed, Oct 25, 2017 at 10:36 AM Martin Alsinet <mar...@alsinet.com.ar>
wrote:

> Johan:
>
> You can try the following:
>
> #+NAME: lscode
> #+BEGIN_ASCII
> ls -alh
> #+END_ASCII
>
> #+BEGIN_SRC emacs-lisp :var code=lscode
> (message code)
> #+END_SRC
>
> #+RESULTS:
> : ls -alh
>
> I haven't tried the noweb references, but it does return the code block in
> the variable.
>
>
> Martín
>
> On Wed, Oct 25, 2017 at 9:22 AM Johan W. Klüwer <johan.w.klu...@gmail.com>
> wrote:
>
>> Is there a way to assign the uninterpreted content of an executable
>> source block to a variable? Preferably, using a :var header argument? That
>> is, return the text in the block, not the result of evaluating it, and
>> preferably with noweb references expanded.
>>
>> "example" blocks return text the way I want, but they can't be evaluated,
>> and of course noweb is ruled out for them.
>>
>> The function org-babel-ref-resolve could to the job if there were a
>> switch to block evaluation.
>>
>>
>> Why this is interesting: I wish to use url-hexify-string on the text of a
>> named SPARQL query.
>>
>> Cheers, Johan
>>
>


Re: [O] org-babel source block unevaluated into variable?

2017-10-25 Thread Martin Alsinet
Johan:

You can try the following:

#+NAME: lscode
#+BEGIN_ASCII
ls -alh
#+END_ASCII

#+BEGIN_SRC emacs-lisp :var code=lscode
(message code)
#+END_SRC

#+RESULTS:
: ls -alh

I haven't tried the noweb references, but it does return the code block in
the variable.


Martín

On Wed, Oct 25, 2017 at 9:22 AM Johan W. Klüwer 
wrote:

> Is there a way to assign the uninterpreted content of an executable source
> block to a variable? Preferably, using a :var header argument? That is,
> return the text in the block, not the result of evaluating it, and
> preferably with noweb references expanded.
>
> "example" blocks return text the way I want, but they can't be evaluated,
> and of course noweb is ruled out for them.
>
> The function org-babel-ref-resolve could to the job if there were a switch
> to block evaluation.
>
>
> Why this is interesting: I wish to use url-hexify-string on the text of a
> named SPARQL query.
>
> Cheers, Johan
>


Re: [O] enhancement - cross-reference to another file?

2017-10-14 Thread Martin Alsinet
Hello Sharon:

On Sat, Oct 14, 2017 at 7:45 AM Sharon Kimble 
wrote:

>
> Is it possible to cross reference to another org-mode file in a
> different directory?
>

Yes, it is possible, you have to use the following syntax:

[[file:/path/to/other/org/file.org:* heading][My other org file]]

You can check the manual for the different link types and examples
http://orgmode.org/manual/External-links.html




> Example - cooking 1 has an entry for Mayonnaise, so can file 2 have an
> entry for mayonnaise but cross-referenced to cooking 1?
>
> --8<---cut here---start->8---
> id1=cooking1.org
>
> ** Mayonnaise
> [[*Mayonnaise][Mayonnaise]]
> blurb and blah
> --8<---cut here---end--->8---
>
> --8<---cut here---start->8---
> id2=cooking2.org
>
> ** Mayonnaise 3
>
> See also [[*id1:Mayonnaise][Mayonnaise]] and also [[*Mayonnaise
> 2][Mayonnaise 2]]
>
> --8<---cut here---end--->8---
>
>
In your example, the references would be written:

See also [[file:cooking1.org:** Mayonnaise][this mayonnaise recipe]] and
also [[*Mayonnaise 2][this other one]]


Re: [O] *Good* client for Android?

2017-10-12 Thread Martin Alsinet
Hello John:

If your phone screen is big enough, you could use termux
<https://play.google.com/store/apps/details?id=com.termux=en> + emacs +
git & git-remote-gcrypt.
With that you could use the same stack on Android as on your laptop.

Termux is a linux console for Android that lets you install packages with
something similar to apt-get in debian/ubuntu.
I am thinking about getting a cheap Android tablet myself in order to have
a ultra light mobile workstation with termux.
On the other hand, a terminal console on a 5 inch phone screen doesn't seem
to be very practical for prolonged work.


Martin

On Thu, Oct 12, 2017 at 4:32 PM John Goerzen <jgoer...@complete.org> wrote:

> Hi folks,
>
> All along, I anticipated using this with Android (and, ideally, also
> iOS).  The MobileOrg feature set looked great, and the syncing mechanism
> looked a lot better than sharing Dropbox.
>
> I use git to share my ~/org between two computers (laptop and desktop),
> using git-remote-gcrypt to store on a server.  This makes syncing and
> resolving conflicts easy (I move between the two throughout the day, so
> Dropbox is really not a great option here.)  Sync integrity -- or at
> least robust detection of conflicts -- is a must.  Encryption is a "very
> nice to have."
>
> Suggestions?
>
> Here's what I've found so far:
>
> MobileOrg - supports WebDAV storage.  Has a robust sync system,
> integrated with org-mode, in which it seems to be able to write out its
> changes to a separate file that the computer can integrate.  Sounds
> smart, though I suspect it will require additional hacking to support
> multiple Android devices.  org-mode docs mention encryption for this,
> but the encryption is not supported by MobileOrg.  Also, MobileOrg was
> last updated 4 years ago and seems to have bitrotted.
>
> Orgzly - Supports only Dropbox or local-on-Android storage. The latter
> is insecure, as it permits any app on the system to read the files.  I
> am really not sure how to integrate this with my workflow.  It seems
> like potentials for conflicts are extremely high.
>
> SyncOrg - Shows some promise, but couldn't even test locally due to the
> folder selection screen not working for the "External/Local Only."
> Suspect it's trying to do something insecure as well, or doesn't work on
> Oreo?  ssh support seems to actually be ssh+git, which is nice - except
> that it's unencrypted.  doh.  The documentation made no mention of
> resolving conflicts.  https://github.com/wizmer/syncorg/wiki/FAQ seems
> to suggest it uses the old MobileOrg push/pull in org-mode, but I can't
> see how that possibly works well with Git.  I suspect that FAQ to be
> totally obsolete, because it also talks about a Dropbox synchronizer
> that SyncOrg doesn't even have.  I could use this if I drop
> git-remote-gcrypt, I hope.
>
> MobileOrg-NG - Last updated in 2012.  Didn't really look past that.
>
>
>
>


Re: [O] Nested smart quotes

2017-10-05 Thread Martin Alsinet
On Thu, Oct 5, 2017 at 4:58 PM Adonay Felipe Nogueira 
wrote:

> What about using org-entities for these quotes?
>
> \ldquo{}Hello \lsquo{}World\rsquo{}!\rdquo{}
>
> This is Org mode syntax, not LaTeX.
>
>
Adonay:

I wanted to solve this using smart quotes, that is when I write I don't
have to worry with anything other than writing, and the light formatting of
org-mode is great for that (* for emphasis, / for italics, etc.) While the
solution you are proposing is technically correct, it achieves the result,
I find it too verbose and distracting from the text.

Actually I solved the problem by upgrading to org-mode 9.1.2 and leaving a
space between the inner quote and the enclosing double quote.

Thanks and regards


Martín


Re: [O] Nested smart quotes [fixed]

2017-10-05 Thread Martin Alsinet
On Thu, Oct 5, 2017 at 2:41 PM Martin Alsinet <mar...@alsinet.com.ar> wrote:

> Hello Nick. First, thank you so much for your detailed answer.
>
> I'm not sure whether smart quotes can be made smarter, perhaps by
>> detecting the problem and inserting the small space \, to resolve the
>> ambiguity; but the manual space solution should have worked: what
>> version of org are you using?
>>
>> FWIW, mine is latest master: Org mode version 9.1.2
>> (release_9.1.2-84-geeaf9a @ /home/nick/src/emacs/org/org-mode/lisp/)
>>
>
> I am using Org mode version 8.2.10, I will update my version and try again.
>
>
I updated Org-mode to the last version (9.1.2) from the orgmode.org ELPA
sources and the problem went away.

Separating the nested quotes with a space does the trick:

She said to me: "Rick screamed, 'let's go together' "

Now the closing quote gets "smarted" in the exported PDF file.

Thank you very much


Martin


Re: [O] Nested smart quotes

2017-10-05 Thread Martin Alsinet
Hello Nick. First, thank you so much for your detailed answer.

On Thu, Oct 5, 2017 at 2:16 PM Nick Dokos <ndo...@gmail.com> wrote:

>
> This example has the additional problem of the apostrophe in "let's", which
> basically causes more mayhem. Let's simplify the example a bit by
> considering
>
> She said to me: "Rick screamed, 'let us go together'"
>
> which when export to TeX becomes:
>
> She said to me: ``Rick screamed, `let us go together'''
>
> and TeX misinterprets the three closing single quotes as (closing
> double quote, closing single quote) instead of (closing single quote,
> closing double quote).
>
>
I was beginning to suspect that, I didn't see it at first, but after
writing and explaining the problem, it dawned on me that it could be LaTeX
that cannot correctly parse the three consecutive single quotes.


> >
> > Internal
> >
> > In this case, the internal single quotes are rendered correctly, but the
> closing quote is not converted into its "smart" version.
> >
> > If the nested quotes are in such a way that there are other characters
> between the quotes, that is they are not together at the start or the end
> of the quote, they get rendered correctly.
>
> I'm not sure whether smart quotes can be made smarter, perhaps by
> detecting the problem and inserting the small space \, to resolve the
> ambiguity; but the manual space solution should have worked: what
> version of org are you using?
>
> FWIW, mine is latest master: Org mode version 9.1.2
> (release_9.1.2-84-geeaf9a @ /home/nick/src/emacs/org/org-mode/lisp/)
>

I am using Org mode version 8.2.10, I will update my version and try again.


Martin


Re: [O] Nested smart quotes

2017-10-05 Thread Martin Alsinet
Colin:

The beauty of smart quotes is that I don't have to see the ugly LaTeX
formatting in my org file, but the final document has the corresponding
opening and closing quote characters. While I do sprinkle some LaTeX here
and there in my org files, I think that would be going a little too far for
my taste.

Thanks anyway!

Martin


On Thu, Oct 5, 2017 at 12:22 PM Colin Baxter <m43...@yandex.com> wrote:

> >>>>> Martin Alsinet <mar...@alsinet.com.ar> writes:
>
>
> > #+TITLE: Smart quotes example #+OPTIONS: toc:nil ':t #+LANGUAGE:
> > en #+LATEX_CLASS: book She said to me: "Rick screamed, 'let's go
> > together'"
>
> > This gets exported to TeX as:
>
> > She said to me: ``Rick screamed, `let's go together'''
>
> > Which gets rendered as PDF as:
>
> > The order of the closing quotes is wrong
>
> > The order of the closing quotes gets reversed, it first closes the
> > outside double quotes and then the nested single quote.
>
> > I have tried leaving a space between them, but that is arguably
> > worse
>
> > Org:
>
> > She said to me: "Rick screamed, 'let's go together' "
>
> > TeX:
>
> > She said to me: ``Rick screamed, `let's go together' "
>
> > PDF:
>
> > Internal quotes are ok, closing double quote is wrong
>
> > In this case, the internal single quotes are rendered correctly,
> > but the closing quote is not converted into its "smart" version.
>
> > If the nested quotes are in such a way that there are other
> > characters between the quotes, that is they are not together at
> > the start or the end of the quote, they get rendered correctly.
>
> > Thanks in advance
>
> > Martin
>
> What about
>
> She said to me: \lq\lq Rick screamed, \lq let's go together\rq\nbsp{}\rq\rq
>
>
> --
> Colin Baxter
> m43...@yandex.com
>


[O] Nested smart quotes

2017-10-05 Thread Martin Alsinet
Hello!

My name is Martin and I use org-mode every day. This is my first message to
the mailing list, and I wanted to ask if somebody could help me with a
problem I encountered when exporting a document with nested smart quotes.

I have submitted the same question
<https://emacs.stackexchange.com/questions/35942/nested-smart-quotes-in-org-mode>
to the emacs Stack Exchange, and someone suggested there to send a message
to this list. I assume many people here reads their email inside emacs, and
since this email has embedded images, you might see it better formatted in
SO.

I have found that the smart-quotes option of org-mode does not export
properly the quotes when they are nested (single quotes inside double
quotes), but only when they coincide at the start or the end of the quote.

Maybe the problem will be clearer with an example:

#+TITLE: Smart quotes example
#+OPTIONS: toc:nil ':t
#+LANGUAGE: en
#+LATEX_CLASS: book
She said to me: "Rick screamed, 'let's go together'"

This gets exported to TeX as:

She said to me: ``Rick screamed, `let's go together'''

Which gets rendered as PDF as:

[image: The order of the closing quotes is wrong]
<https://i.stack.imgur.com/7QHh7.png>

The order of the closing quotes gets reversed, it first closes the outside
double quotes and then the nested single quote.

I have tried leaving a space between them, but that is arguably worse

Org:

She said to me: "Rick screamed, 'let's go together' "

TeX:

She said to me: ``Rick screamed, `let's go together' "

PDF:

[image: Internal quotes are ok, closing double quote is wrong]
<https://i.stack.imgur.com/cqbzj.png>

In this case, the internal single quotes are rendered correctly, but the
closing quote is not converted into its "smart" version.

If the nested quotes are in such a way that there are other characters
between the quotes, that is they are not together at the start or the end
of the quote, they get rendered correctly.

Thanks in advance


Martin


[O] No agenda view at work, need guidance

2017-02-15 Thread Martin Schöön
After upgrading to Org 9.0.5 elpa (as part of trying out elpa for the first
time ever) I get the 'pick agenda option menu'. Pickin "a" or "t" all I get
is a message:

"Invalid function: org-with-silentmodifications"

OS: Corporaate tweak of Ubuntu 14.04
Emacs 24.3.1

Before doing the Org upgrade I used the version that come bundled with
Emacs (Org 7.something). With the old configuration Org mode worked fine
when it came to agenda view and managing todo-lists. There were some minor
issues such as missing ox-latex that prompted my upgrade.

Doing an internet search for the error message I get a host of hits. So far
this one is the only one that seems relevant:

http://tonyballantyne.com/tech/elpa-org-mode-and-invalid-function-org-with-silent-modifications/

Am I on the right track if I try this? (I am at home now, otherwise I would
have tried right away)

TIA

-- 
Martin Schöön

http://hem.bredband.net/b262106/index.html


[O] [PATCH] ox.el: Slovenian translations for exporting

2017-02-03 Thread Martin Vuk
I would like to propose Slovenian translations for exporting orgmode 
documents. Patch is attached.


Best Regards,

Martin Vuk

>From 0b22387d519201174a562fe07832354619dea6e1 Mon Sep 17 00:00:00 2001
From: Martin Vuk <martin@fri.uni-lj.si>
Date: Fri, 3 Feb 2017 12:05:50 +0100
Subject: [PATCH] ox.el: Slovenian translations for exporting
To: emacs-orgmode@gnu.org

* lisp/ox.el (org-export-dictionary): Slovenian translations.

* lisp/ox.el (org-export-smart-quotes-alist): Slovenian quotes and
apostrophes for exporting documents.

TINYCHANGE
---
 lisp/ox.el | 45 +++--
 1 file changed, 39 insertions(+), 6 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 93f4437..3aeb56b 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5399,6 +5399,17 @@ Return a list of src-block elements with a caption."
  (secondary-closing
   :utf-8 "“" :html "" :latex "\\grqq{}" :texinfo "@quotedblleft{}")
  (apostrophe :utf-8 "’" :html: ""))
+("sl"
+ ;; based on https://sl.wikipedia.org/wiki/Narekovaj
+ (primary-opening :utf-8 "«" :html "" :latex "{}<<"
+		  :texinfo "@guillemetleft{}")
+ (primary-closing :utf-8 "»" :html "" :latex ">>{}"
+		  :texinfo "@guillemetright{}")
+ (secondary-opening
+  :utf-8 "„" :html "" :latex "\\glqq{}" :texinfo "@quotedblbase{}")
+ (secondary-closing
+  :utf-8 "“" :html "" :latex "\\grqq{}" :texinfo "@quotedblleft{}")
+ (apostrophe :utf-8 "’" :html ""))
 ("sv"
  ;; based on https://sv.wikipedia.org/wiki/Citattecken
  (primary-opening :utf-8 "”" :html "" :latex "’’" :texinfo "’’")
@@ -5637,6 +5648,7 @@ them."
  ("pl" :default "Autor")
  ("pt_BR" :default "Autor")
  ("ru" :html "" :utf-8 "Автор")
+ ("sl" :default "Avtor")
  ("sv" :html "Frfattare")
  ("uk" :html "" :utf-8 "Автор")
  ("zh-CN" :html "" :utf-8 "作者")
@@ -5651,7 +5663,8 @@ them."
  ("nl" :default "Vervolg van vorige pagina")
  ("pt" :default "Continuação da página anterior")
  ("ru" :html "()"
-  :utf-8 "(Продолжение)"))
+  :utf-8 "(Продолжение)")
+ ("sl" :default "Nadaljevanje s prejšnje strani"))
 ("Continued on next page"
  ("ar" :default "التتمة في الصفحة التالية")
  ("de" :default "Fortsetzung nächste Seite")
@@ -5662,7 +5675,10 @@ them."
  ("nl" :default "Vervolg op volgende pagina")
  ("pt" :default "Continua na página seguinte")
  ("ru" :html "( )"
-  :utf-8 "(Продолжение следует)"))
+  :utf-8 "(Продолжение следует)")
+ ("sl" :default "Nadaljevanje na naslednji strani"))
+("Created"
+ ("sl" :default "Ustvarjeno"))
 ("Date"
  ("ar" :default "بتاريخ")
  ("ca" :default "Data")
@@ -5684,6 +5700,7 @@ them."
  ("pl" :default "Data")
  ("pt_BR" :default "Data")
  ("ru" :html "" :utf-8 "Дата")
+ ("sl" :default "Datum")
  ("sv" :default "Datum")
  ("uk" :html "" :utf-8 "Дата")
  ("zh-CN" :html "" :utf-8 "日期")
@@ -5703,6 +5720,7 @@ them."
  ("pt_BR" :html "Equao" :default "Equação" :ascii "Equacao")
  ("ru" :html ""
   :utf-8 "Уравнение")
+ ("sl" :default "Enačba")
  ("sv" :default "Ekvation")
  ("zh-CN" :html "" :utf-8 "方程"))
 ("Figure"
@@ -5734,6 +5752,7 @@ them."
  ("nn" :default "Illustrasjon %d")
  ("pt_BR" :default "Figura %d:")
  ("ru" :html ". %d.:" :utf-8 "Рис. %d.:")
+ ("sl" :default "Slika %d")
  ("sv" :default "Illustration %d")
  ("zh-CN" :html "%d" :utf-8 "图%d "))
 ("Footnotes&qu

Re: [O] Org release_9.0 hangs

2017-01-18 Thread Martin Zuther

Hi!

My message from two weeks ago ("[O] Possible bug: Emacs hangs on 
(require 'org)") seems to have missed attention, so here it is again.


About every third time I start Emacs, I also experience a very slow 
startup with org-mode 9.0.3 enabled. I run "GNU Emacs 24.5.1 
(x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-17 on lgw01-04, 
modified by Debian" on Linux Mint 18.1 Cinnamon.


Here is my minimal setup:

  ;;; Minimal setup to load latest 'org-mode'

  ;; activate debugging
  (setq debug-on-error t
debug-on-signal nil
debug-on-quit nil)

  ;; add latest org-mode to load path
  (add-to-list 'load-path "~/.emacs.d/elisp/org_9.0.3/lisp")
  (require 'org)

Adding

  Possible bug: Emacs hangs on (require 'org)

to the end of this setup file doesn't change anything.

This bug is solved by disabling my network, but in contrast to Luke , I 
have access to a fast and stable network.


Normal startup time is below one second. When the bug hits, it is around 
2 minutes and 7 seconds, which to me looks suspiciously like a typical 
network timeout of 120 seconds.


Martin



Re: [O] Possible bug: Emacs hangs on (require 'org)

2017-01-06 Thread Martin Zuther

Hi!

About every third time I start Emacs, I also experience a very slow 
startup with org-mode 9.0.3 enabled.  I run "GNU Emacs 24.5.1 
(x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-17 on lgw01-04, 
modified by Debian" on Linux Mint 18.1 Cinnamon.


Here is my minimal setup:

  ;;; Minimal setup to load latest 'org-mode'

  ;; activate debugging
  (setq debug-on-error t
debug-on-signal nil
debug-on-quit nil)

  ;; add latest org-mode to load path
  (add-to-list 'load-path "~/.emacs.d/elisp/org_9.0.3/lisp")
  (require 'org)

This bug is solved by disabling my network, but in contrast to Luke, I 
have access to a fast and stable network.


Normal startup time is below one second.  When the bug hits, it is 
around 2 minutes and 7 seconds, which to me looks suspiciously like a 
typical network timeout of 120 seconds.


Martin
--
www.mzuther.de
www.radix-musik.de



Re: [O] src blocks: code is /always/ exported

2016-12-29 Thread Martin Gürtler
Am Donnerstag, 29. Dezember 2016, 09:07:40 CET schrieb Charles C. Berry:
> On Thu, 29 Dec 2016, "Martin Gürtler" wrote:
> > Dear list,
> > I am exporting the following org mode file:
> > 8<
> > * doc
> > #+BEGIN_SRC shell :exports none
> > ls |wc
> > #+END_SRC
> > 
> > #+RESULTS:
> > : 20  20 199
> > 
> > 8< I'd expect org mode to honour the
> > :exports none header argument and create a document that contains
> > only the result.  However, the exported document contains both, code
> > and results.  This seems to be independent of the type of SRC and
> > independent of the export type (I tried dot and shell for odt, latex
> > and beamer exports).  How can I get rid of the src code in the
> > exported document?
> 
> What does C-h v org-export-use-babel RET say?
> 
> If the result is not `t' that is the problem, and somewhere in your setup
> you have set that variable (or its predecessor org-export-babel-evaluate)
> to nil or something other than `t'.

That was indeed the culprit. I had switched it off to speed up export. After
setting that to t again it works (of course). Drawbacks are, that I need to
confirm the evaluation in each export (I am a bit hesitant to generally
accepting src block evaluation), and evaluation takes time.

I do not really need src block evaluation during export. I only need to
evaluate (manually) when I changed the graphics src, what I am doing
anyway to check the changed image.

But how would I control the (not-)inclusion of the src code during
export in that case?

Thanks,

Martin




signature.asc
Description: This is a digitally signed message part.


  1   2   3   4   5   6   >