Re: [bug] Export to latex truncates long subsections (WE attached)

2020-11-19 Thread Julius Dittmar

Am 19.11.20 um 05:58 schrieb Tim Cross:


Vladimir Nikishkin  writes:


So what is the status of this story?

I believe that if one exports an org file with sufficiently many empty
TODO headings (to me, it seems a perfectly valid use case of org,
printing lists of TODOs), they won't fit on a single page, and latex
will drop them. Would the latex snippet in this thread be a good
candidate for inclusion into org as a canned trick?

On Tue, 27 Aug 2019 at 14:57, Vladimir Nikishkin  wrote:


I have indeed investigated the issue, and this is the link:
https://latex.org/forum/viewtopic.php?f=47=32788

To make the long story short, the folowing trick is needed to allow
page breaks after headings (which is a completely standard case in
-org).

#+begin_src latex
\usepackage{xpatch}
\makeatletter
% This is not recommended, because it can break several things
\xpatchcmd{\@afterheading}{\@nobreaktrue}{\@nobreakfalse}{%
\typeout{WARNING: \string\@afterheading\space broken}%
}{%
\@latexerr{ERROR: Cannot patch \string\@afterheading}\@ehd%
}
\makeatother
#+end_src

Shall this trick be considered for inclusion in 'org' officially?
I mean, having lists of empty headings is a perfectly standard use case for org.



What are the implications of doing this? In particular, the comment


% This is not recommended, because it can break several things


Many people have quite complex environments for generating Latex and we
would need to be certain that adding this package doesn't 'break several
things'.


For one thing, it allows something (La)TeX tries to circumvent: page
breaks immediately after a section heading. In normal documents, that's
something you want to avoid as much as possible.

Perhaps another approach would be more fitting, but it needs changing
the LaTeX output routine: Have org add something invisible after a
heading in case that heading's body is empty. That makes page breaks
possible (after that invisible something) without changing the behaviour
for non-empty sections.

Just my thoughts,
Julius Dittmar




Re: Archiving repeated tasks under corresponding date tree for each repeated item

2020-11-02 Thread Julius Dittmar

Hi Gerardo,

I am by far no expert, but I think with the kind of setup you currently
use your goal cannot be reached: The repeating task you use is one
single task, and it will be archived as that one single task.

There's a different way to approach repeating tasks though that might
meet your requirements: Copying that task for each repeat. There's a
command (org-clone-subtree-with-time-shift) that lets you copy a task
easily. With that you have different tasks that can be archived separately.

I did never use this approach myself though.

Perhaps that helps,

Julius Dittmar


Am 29.10.20 um 08:01 schrieb Gerardo Moro:

When I archive a repeated task (let's say, a learning project of 15 minutes
every Wednesday day for 2 months), the task gets archived in a date tree
all under the day it was closed (cancelled) as a whole. This means that all
the LOGGED individual instances of repetition are archived on the day the
project got completed. It would be great if each of these individual "task
happenings" were archived under the date and time they were completed
individually, and not just all as one block. This way I could get weekly
reviews that take those into account.




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

2020-10-28 Thread Julius Dittmar

Hi Martin,

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

As far as I understand, that means using
#+begin_export markdown
...
#+end_export
block, not
#+begin_src markdown
...
#+end_src
block. That block will then be ignored in any other export format, and
used as-is in markdown export. (I hope "markdown" is the correct label,
I did not test it.)

Hope that helps,
Julius

Am 28.10.20 um 13:54 schrieb Martin Steffen:

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.




Re: Bug: :results raw replace header args for a code block don't replace [9.3.7 (9.3.7-18-g093b47-elpaplus @ /Users/skoshelev/.emacs.d/elpa/26.2/develop/org-plus-contrib-20200810/)]

2020-08-21 Thread Julius Dittmar
Hi Sergey,

Am 18.08.20 um 00:36 schrieb Sergey Koshelev:
> When a source block (I have tested with python, see below) has `raw`
> header arg it ignores `replace` argument. The result instead is prepended.
>
> Example:
>
> #+begin_src python :results output raw replace
>   print('This line will be added every time this code runs')
> #+end_src
>
> #+RESULTS:
> This line will be added every time this code runs
> This line will be added every time this code runs

as far as I know this is no bug. Reason: How could org tell where the
old results end? There's no end marker. Thus instead of removing
everything that follows, it refrains from removing anything.

HTH,
Julius Dittmar




attachments and inheritance (bug?)

2020-07-09 Thread Julius Dittmar
Hello friends,

either I misunderstood something or I stumbled upon a bug.

Situation: I have a heading with some files attached. This heading has
an ID property, upon which the directory for those files is based.

There's also a subheading with no ID. Inside of that subheading I'd like
to link to one of the attached files. But although
org-attach-use-inheritance is non-nil, the attachment is not found from
inside that subheading.

Shouldn't it be found?

Thanks for any pointers,

Julius


#+name main.org
#+begin_src org
,* first heading :ATTACH:
:PROPERTIES:
:ID: 7eai57u0npi0
:END:

[[attachment:some-file.txt]]

,** subheading
(no ID property here)

[[attachment:some-file.txt]]
#+end_src


#+name some-file.txt
#+begin_src text
Just some junk to verify whether the correct file is displayed.
#+end_src


- GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.10.9) of
2018-07-06
- org-mode: current master
- no setting containing 'attach' in any configuration file



Re: Splitting large org file into smaller ones

2020-05-30 Thread Julius Dittmar



Am 30.05.20 um 17:36 schrieb William Denton:
> On 30 May 2020, Marvin M. Doyley wrote:
>
>> How do I export the subtree to separate org files, say
>>
>> - Candidate-a.org 
>> - Candidate-b.org 
>
> I'll throw out an uninformed suggestion of a possible direction: 
> archiving subtrees.  I guess you'd have to keep changing the name of
> the target archive file, or rename it after you'd moved a tree to it,
> but at least it's getting a whole tree out of the way at once.

If you'll end up naming the files yourself, then I suggest killing the
whole subtree by C-c C-x C-w (|org-cut-subtree|) with point in the
heading, opening the new file, then yanking the subtree by C-c C-x C-y
(org-paste-subtree).

You could also use the refile mechanism for that, though I never managed
to wrap my head around that one.

HTH,
Julius



Re: Problem with LaTeX class scrlttr2

2020-04-04 Thread Julius Dittmar

How do you produce (or try to produce) LaTeX/pdf?

The Unknown LaTeX class message is something emacs throws when using 
export to latex (C-c C-e l l). This has nothing to do with your LaTeX 
installation; it does not reach the point of invoking LaTeX. It tells 
you there's no setup for scrlttr2 class in org-latex-classes. There is 
no setup for default-koma-letter either in my version of 
org-latex-classes. Perhaps you need to load ox-koma-letter in org first?


HTH,
Julius





Re: Bug: org-table-insert-column edits formulas wrongly [9.3 (release_9.3 @ /usr/local/Cellar/emacs-plus/HEAD-9d38564/share/emacs/28.0.50/lisp/org/)]

2020-03-31 Thread Julius Dittmar
Am 31.03.20 um 16:05 schrieb Nicolas Goaziou:
> Note that adding a column to the beginning of the row is easy: just type
> "|" near the beginning of the first cell.

Does not seem correct.

I had table
#+begin_src org
| 1 | 2 |
| 3 | 4 |
#+end_src

Adding a | at the beginning of the first cell changed that to:
#+begin_src org
|   | 1 | 2 |
| 3 | 4 |   |
#+end_src

That's not adding a column, just a cell, and breaking columns.

What would I have to type to have that add a column?

TIA,

Julius



Re: is it possible doing a "smart tri-fold brochure" with org-mode?

2020-03-28 Thread Julius Dittmar
I know there are LaTeX packages / classes for several forms of 
brochures. Those might be used by org-mode.


Am 27.03.20 um 21:44 schrieb rrandr...@gmail.com:

Hi.

The tri-fold brochure is also known as 'tryptich'

A simple web search defines it as:
--8<---cut here---start->8---
Promotional brochures come in many sizes and can be folded many different ways, 
the most common being the tri-fold
brochure. This fold creates three equal sections by folding the sides over the 
middle. Most tri-folds bend the right
side first and then the left so that when opened, the brochure reads from left 
to right.
--8<---cut here---end--->8---

If Any of You have an example. It would be nice. As the other
alternative is using a propietary tool for it :(.

Best Regards





Q: add contents of a property to LaTeX export?

2019-10-30 Thread Julius Dittmar
Hi folks,

I would like the org export to add a line containing one property entry
(ID for example) to the LaTeX export for every heading.

Ideally I'd like this to be added to the org-latex-classes
configuration. I'd like to call a macro \mysection{..content of ID
property..}{..heading line content..} there (instead of
\section{..heading line content..}.

Alternatively something like \renewcommand{\ID}{...contents of ID
property...} immediately before or after the sectioning command would
work, too.

My elisp skills are still near to non-existent, so I would not even know
where to start looking for something like that.

Any pointers?

Thanks in advance,
Julius



Re: [O] export, excluding everything marked with special tags

2019-09-20 Thread Julius Dittmar
Am 20.09.19 um 14:04 schrieb John Kitchin:
> One way is to put a list of tags (separated by spaces) in a file
> property like this:
>
> #+EXCLUDE_TAGS: one two

Thanks!

Julius




[O] export, excluding everything marked with special tags

2019-09-20 Thread Julius Dittmar
Hi,

I know it's possible to define one tag's name to block org from
including any heading tagged like that from exports. Is it possible to
have more than one such tag defined? If so, how can that be done?

Thanks in advance,

Julius



Re: [O] Disallow empty tags

2019-09-03 Thread Julius Dittmar
Am 02.09.19 um 18:48 schrieb Dmitrii Korobeinikov:
> Creating an empty tag renders TAB-completion useless.
>
> Example:
>
> * Title     :a::b:
>
> Pressing TAB in org-set-tags-command will now insert a colon `:`, which
> is quite puzzling to see.
> I thought something was wrong w/ my bindings till I noticed this was
> happening only in one of my files.
>
> Can such tags be ignored/disallowed as they hold no evident purpose?

I vote for ignored, because there's places where tag lists are displayed
like that, making newbies think that's valid syntax.

Where that happens? I have a file with a filetag R and a todo entry with
a tag :V: . In the agenda, that entry's tags are shown as :R::V: .

Yours,
Julius





Re: [O] minimal testing setup for pdf export?

2019-08-28 Thread Julius Dittmar
Am 28.08.19 um 01:33 schrieb Matt Price:
> huh.  that was kinda cool... but the value of default-directory seems to
> be correct.  However, this helped a bit:
>
> #+BEGIN_SRC emacs-lisp
> (shell-command-to-string "echo $PWD")
>
> #+END_SRC
>  
>
> #+RESULTS:
> : /home/matt/src/org-mode
>
> Not sure what's going on here, but this value is the same in a regular
> emacs and  "emacs -Q".  is this normal?

For me, with "emacs -Q", this reliably returns the path from which I
started emacs.

HTH,
Julius



Re: [O] minimal testing setup for pdf export?

2019-08-27 Thread Julius Dittmar
Am 27.08.19 um 12:34 schrieb Matt Price:
> This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch
> Linux) (preloaded format=pdflatex)
>  restricted \write18 enabled.
> entering extended mode
> ! I can't find file `empty.tex'.

So pdflatex is called and found. Then pdflatex can't find empty.tex.
That looks like pdflatex is called in another directory than where
empty.tex resides. How that could happen, no idea.

Julius



Re: [O] [bug] Export to latex truncates long subsections (WE attached)

2019-08-27 Thread Julius Dittmar
Hi folks,

Am 27.08.19 um 08:57 schrieb Vladimir Nikishkin:
> I have indeed investigated the issue, and this is the link:
> https://latex.org/forum/viewtopic.php?f=47=32788
>
> To make the long story short, the folowing trick is needed to allow
> page breaks after headings (which is a completely standard case in
> -org).
>
> #+begin_src latex
> \usepackage{xpatch}
> \makeatletter
> % This is not recommended, because it can break several things
> \xpatchcmd{\@afterheading}{\@nobreaktrue}{\@nobreakfalse}{%
> \typeout{WARNING: \string\@afterheading\space broken}%
> }{%
> \@latexerr{ERROR: Cannot patch \string\@afterheading}\@ehd%
> }
> \makeatother
> #+end_src
>
> Shall this trick be considered for inclusion in 'org' officially?
> I mean, having lists of empty headings is a perfectly standard use case for 
> org.

I would not want that as the default. Yes, it is one standard use case.
It would break other standard use cases, like creating ordinary
documents, though.

Perhaps variant adding such a patch could be added to org-latex-classes,
or at least mentioned in the docs to org-latex-classes? That way you can
use this "class" version for such cases without adding unnecessary
uglyness to other org-created documents.

Another possible approach would be a change in the export functions.
What really is needed here, from my point of view, is that the export
adds a superficial paragraph to a heading in the case that there's no
content at all. Nothing should be added if the heading has sub-headings,
I count that as content. In case there is no content at all, then some
form of breakable vertical space should be added. I don't know enough
LaTeX to find the least intrusive way, though I'd try \vspace{0pt}.

I did never dig into the export functions, so I don't know how difficult
that would be.

Just my thoughts,
Julius Dittmar



Re: [O] [bug] Export to latex truncates long subsections (WE attached)

2019-08-26 Thread Julius Dittmar
Hi Vladimir,

I see two problems in the generated LaTeX-file you'd need to address.

First, LaTeX has problems handling URLs in section (or subsection)
headers. That's one of the reasons LaTeX chokes on the second run of
that file -- it's only partially generated, not completely.

The second is the fact that there's no content in all those subsections.
I guess that's why LaTeX's page break algorithm fails: It does not want
to make a page break immediately after a section heading. Thus there's
no viable place for LaTeX to break that page.

As there's no contents in all those subsections, how about changing it
to a list with checkboxes? Then the problem with the URLs is solved too.

HTH,
Julius

Am 26.08.19 um 05:46 schrieb Vladimir Nikishkin:
> I have a problem in that when I try to export an .org file into
> latex/pdf, long sections are not wrapped to the next page, but are
> truncated instead.



Re: [O] LaTex Output with Index

2019-05-16 Thread Julius Dittmar
Am 15.05.19 um 11:02 schrieb Fraga, Eric:
> On Tuesday, 14 May 2019 at 23:58, Robert Love wrote:
>> However, I have one hitch.  How do I generate an index with an entry
>> that has an “@“ symbol in it?
>
> Unfortunately, this is beyond my latex-fu.  May have something to do
> with @ being a protected symbol.  If you want to play, you could try
>
> #+index: {\makeatletter @} term
>
> but this could lead you down a rabbit hole.  Not sure how org & LaTeX &
> makeindex will interact...

I think the main reason is the fact that @ has special meaning within
index entries: it tells where to put something for cases where the
automatical sorting fails.

I just googled and found the following advice:

»In order to place values with !, @, or |, which are otherwise escape
characters, in the index, one must quote these characters in the \index
command by putting a double quotation mark (") in front of them, and one
can only place a " in the index by quoting it (i.e., a key for " would
be \index{""}).

This rule does not hold for \", so to put the letter ä in the index, one
may still use \index{a@\"{a}}.«

So perhaps

#+index: "@term

works?

HTH,

Julius



Re: [O] Incorrect clock duration calculation

2019-05-07 Thread Julius Dittmar
Hi,

Am 07.05.19 um 11:07 schrieb 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?

They are all correct: The date part is the same for the first and second
timestamp.

HTH,
Julius



Re: [O] Tracking time from one state to another?

2019-04-20 Thread Julius Dittmar
Hi Marcin,

Am 19.04.19 um 06:37 schrieb Marcin Borkowski:
> Are those :LOGBOOK: drawers real?  They are not sorted chronologically,
> as they probably should be (though I'm not sure, I don't se them much).

They are. With the newest entry at the top.

Yours,
Julius




Re: [O] How to avoid \title{} and \date{} in latex export

2019-04-10 Thread Julius Dittmar
Hi  Flávio,

perhaps you could add something like (untested)

#+LATEX_HEADER: \renewcommand{\title}[1]{} \renewcommand{\date}[1]{}

to your org-file? It's not exactly what you asked for, but it might
alleviate your problem.

HTH,
Julius

Am 10.04.19 um 18:10 schrieb Flavio Leonardo Cavalcanti de Moura:
> Hello,
>
> My org file uses a latex class that, after exporting, is in conflict with
> the lines \date{} and \title{} automatically generated by orgmode latex
> export. I already tried the following headings for the org file:
>
> 1.
>  #+TITLE:
> #+DATE:
>
> 2.
> #+TITLE:
> #+option: date:nil
>
> 3.
> #+option: title:nil date:nil
>
> But in all cases the lines
> \title{}
> \date{}
> are in the tex file automatically generated by the export engine. Is there
> a way to prevent the addition of these lines?
>
> Best regards,
> Flávio.
>




Re: [O] Task repeat every weekday?

2019-01-23 Thread Julius Dittmar
Am 23.01.19 um 14:16 schrieb Stig Brautaset:
> Is there a way to make this into a repeating TODO that shows only on weekdays?

I did not yet find a way to meet all your requirements. Here's what I
found up to now: Either create 5 separate repeating tasks, one per
weekday, with a repeat of ++1w, or (that's what I chose to live with)
one task with a daily repeat you manually reschedule on Fridays:

* TODO habit on Monday
SCHEDULED: <2019-01-21 Mo ++1w>
:PROPERTIES:
:REPEAT_TO_STATE: TODO
:END:
* TODO habit on Thuesday
SCHEDULED: <2019-01-22 Di ++1w>
:PROPERTIES:
:REPEAT_TO_STATE: TODO
:END:
* TODO habit on Wednesday
SCHEDULED: <2019-01-23 Mi ++1w>
:PROPERTIES:
:REPEAT_TO_STATE: TODO
:END:
* TODO habit on Thursday
SCHEDULED: <2019-01-24 Do ++1w>
:PROPERTIES:
:REPEAT_TO_STATE: TODO
:END:
* TODO habit on Friday
SCHEDULED: <2019-01-25 Fr ++1w>
:PROPERTIES:
:REPEAT_TO_STATE: TODO
:END:
* TODO habit daily
SCHEDULED: <2019-01-24 Do ++1d>
:PROPERTIES:
:REPEAT_TO_STATE: TODO
:END:

Hope that helps,
Julius



Re: [O] meaning for _ (and perhaps ^) temporalily changed

2018-12-10 Thread Julius Dittmar
Hi Ruda,

Am 10.12.18 um 11:32 schrieb Rudolf Sykora:
> is there a way to *temporalily* disable the default interpretation
> of _ as a subscript?
> 
> I use filenames which include _ ,

how about enclosing those filenames in a pair of = signs to mark the
filename itself as text to be passed through verbatim?

HTH,
Julius




Re: [O] Placement of \makeatletter with \beamer@frametextheight

2018-11-29 Thread Julius Dittmar
Am 29.11.18 um 09:13 schrieb Julius Dittmar:
> Am 29.11.18 um 08:17 schrieb Loris Bennett:
>>> #+latex_header: 
>>> \makeatletter\let\mytextheight\beamer@frametexheight\makeatother
>>> #+attr_latex: :height 0.75\mytextheight

Oh, or perhaps just a typo is involved: is it really
\beamer@frametexheight or rather \beamer@frametextheight you are chasing
after?

HTH,
Julius



Re: [O] Placement of \makeatletter with \beamer@frametextheight

2018-11-29 Thread Julius Dittmar
Hi Loris,

I don't know beamer enough to propose an elegant solution. Nonetheless I
have ideas what might go wrong here.

Am 29.11.18 um 08:17 schrieb Loris Bennett:
>> #+latex_header: 
>> \makeatletter\let\mytextheight\beamer@frametexheight\makeatother
>> #+attr_latex: :height 0.75\mytextheight

First, \let copies the at-the-moment-of-definition version of
\beamer@frametexheight to \mytextheight. This happens in the preamble.

I expect beamer to set up things like frame height at the begin of the
document (exactly the \begin{document} line), not earlier. Thus at the
point of that \let, that length isn't what you want yet.

Solution to this:
#+begin_export latex
\makeatletter...
#+end_export

Second, \let creates a macro whereas it then is used as a length for the
figure. I doubt that is possible.

If that's the reason, you might try

#+begin_export latex
\newlength\mytextheight
\makeatletter
\setlength\mytextheight{\beamer@frametexheight}
\makeatother
#+end_export

Perhaps this gives you a starting point to further play with it.

HTH,
Julius



Re: [O] [feature] Handle recurrence in <> and [] dates

2018-11-06 Thread Julius Dittmar
Hi Leo,

if you want a task to re-open at a later date upon closing, add a line of

:REPEAT_TO_STATE: TODO

to the PROPERTIES drawer of that task.

Hth,
Julius




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

2018-10-30 Thread Julius Dittmar
Hi Martin,

Am 30.10.18 um 20:01 schrieb Martin Schöön:
> 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...

please don't overdo that.

People have quite different ways of taking in information. Some memorize
best if they hear something. Others memorize best if they have visual
input. Others memorize best if they somehow take that information into
their hands (for example by writing).

If all you give is auditory input, you will leave a lot of interested
persons in your auditory in the cold.

My 2 cents...




[O] babel noob question: how to have babel create png using tikz?

2018-10-14 Thread Julius Dittmar
Hi folks,

somehow I do not manage to get babel to create a png image using tikz
package. It does create an image, but that image looks exactly as if the
tikz package were not loaded during the generating latex run and all of
latex's error messages were ignored.

Here's what I do:

- emacs -q mini.org
  (that's GNU Emacs 26.1, Org mode version 9.1.9, same result with
current master, mini.org see below)
- Go to first source block, C-c C-c.
- Go to second source block, C-c C-c.
- Have a look at the generated test.png
  It displays the text "[red!50!black] (a) {A}; (b) [right of=a] {B};
[->] (a) -- (b);"

Where's my mistake?

Thanks in advance,

Julius Dittmar

mini.org:


#+begin_src elisp :exports none :eval never-export
(org-babel-do-load-languages 'org-babel-load-languages '((latex . t)))
#+end_src


#+header: :file test.png :fit yes
#+header: :results (if (and (boundp 'backend) (eq backend 'latex))
"latex" "file")
#+begin_src latex :exports results :file test.png :headers
'("\\usepackage{tikz}")
  \begin{tikzpicture}
    \node[red!50!black] (a) {A};
    \node (b) [right of=a] {B};
    \draw[->] (a) -- (b);
  \end{tikzpicture}
#+end_src

--

PS: except for omitting the ImageMagic call I took this example from
https://org-babel.readthedocs.io/en/latest/eval/




Re: [O] How to make agenda generation faster

2018-10-09 Thread Julius Dittmar
Hi Marcin,

I can't advise as to profiling to find out what really bogs down agenda
building.

I found that log messages do bog it down.

I have a lot of recurring tasks, which accumulate log entries for every
closing (which in fact means rescheduling to the next day). Every two to
three months I prune my org files of those log entries. This
significantly speeds up agenda building.

HTH,
Julius




[O] can capture create search links?

2018-09-29 Thread Julius Dittmar
Hi Samuel,

as to org I only have user status, so there may be better solutions for you.

Am 29.09.18 um 00:20 schrieb Samuel Wales:
> what i'd like is for capture to produce a link that, when clicked,
> will search through my agenda files and text search extra files for a
> matching header.

I use IDs for that purpose.
In my config file I added

(require 'org-id)
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)

In all capture templates, IDs are automatically added by adding,
immediately after the heading and a possible scheduling line,
":PROPERTIES:\n:ID: %(org-id-new)\n:END:\n" within the template string.

With this, %a in the template string is replaced by that ID if the ID
exists. The ID survives refiling.

Hope that helps,

Julius




Re: [O] Latex export with \begin{equation}

2018-09-13 Thread Julius Dittmar
Am 13.09.18 um 15:31 schrieb Dominik Schrempf:
> so I found the reason. Both Org versions behave the same, sorry for the
> confusion. The original equation that does not get exported correctly
> contained
> angles:
> 
> \begin{equation}
>   = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
> \end{equation}
> 
> This equation is correctly rendered when using a .tex file and native
> LaTeX.
> If the angles are removed, the Org Mode HTML export works:
> 
> \begin{equation}
>  k_{eff} = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
> \end{equation}
> 
> Does anybody know why? Is this expected behavior? Can this be changed?

I can't answer any of those questions, but you as a work-around you
could use \langle and \rangle instead of < and >. That's propably more
what you want anyways, as < and > are rendered as the less operator and
the greater operator, including the appropriate spacing, whereas \langle
and \rangle behave like parenthesis.

HTH,
Julius



[O] export org file ignoring presence of :export: tags

2018-07-26 Thread Julius Dittmar
Hi,

I'm still an elisp beginner, so please bear with me.

I would like to be able to fully export org-mode files which make use of
the :export: tag.

Easist solution would be to remove the :export: tag, but usually I want
it's effect. But from time to time I need the full text exported.

I tried:

=== file test.org: ===
* toppic with export tag :export:
* toppic without export tag
=== end of file test.org ===

Export via:
emacs test.org --eval "(let ((org-export-exclude-tags '()))
(org-latex-export-to-latex nil nil nil nil nil))" --kill

Contrary to my expectation, only the first toppic appears in the
resulting TeX file.

Any help appreciated.

Julius



Re: [O] Bug: List of TODOs does not appear in agenda view [9.1.13 (9.1.13-elpaplus @ /Users/mic/.emacs.d/elpa/org-plus-contrib-20180611/)]

2018-06-26 Thread Julius Dittmar
Am 26.06.2018 um 14:45 schrieb Michaël Chlon:
> Well it is very simple:
> 
>   *
> Open a file ".org" in emacs
>   *
> press: C-c-a a or C-c-a t and do not see any TODO. I have presed the
> shortcuts that spacemacs provide but nothing ...
>   *
> I also try with timestamp and deadline, but nothing appear except
> the calendar

Is that test file part of the files contributing to the agenda? (see
org-agenda-files)

HTH,

Julius



Re: [O] org master: make fails

2018-05-30 Thread Julius Dittmar
Am 30.05.2018 um 12:36 schrieb Nicolas Goaziou:
> Julius Dittmar  writes:
>> on two of my computers, both openSUSE-based with org-mode current master
>> and current texlive installed, make fails.
>>
>> The last messages are:
>>
>> make -C doc info
>> make[1]: Entering directory `/XXX/git/org-mode-CURRENT/doc'
>> emacs  -Q -batch --eval '(setq vc-handled-backends nil
>> org-startup-folded nil)' \
>>   --eval '(add-to-list '"'"'load-path "../lisp")' \
>>   --eval '(load "../mk/org-fixup.el")' \
>>   --eval '(org-make-manuals)'
>> Loading /XXX/git/org-mode-CURRENT/mk/org-fixup.el (source)...
>> Wrong number of arguments: #[(string  separators omit-nulls)
>>
>> ... followed by a long mainly empty and unreadable quoted string,
>> followed by ...
>>
>> " [separators omit-nulls split-string-default-separators list notfirst
>> start t 0 nil string-match ...] 5 1648329], 4
>> make[1]: *** [org.texi] Fehler 255
>> make[1]: Leaving directory `/XXX/git/org-mode-CURRENT/doc'
>> make: *** [info] Fehler 2
>>
>> As on the third of my computers (with an old debian and texlive 2017)
>> make works, I guess that's a local problem, not one of org-mode.
>> Nonetheless: Do you have any hints on what might be missing there, or
>> how I could proceed tracking down the problem?
> 
> Is your Emacs old (e.g., Emacs 23)?

GNU Emacs 24.3.1 in one instance, the other not older than that (can't
check the details right now).

> Did you try with emacs -Q, just
> loading Emacs?

As far as I can tell, the make fails somewhere in the 'make doc' part.
According to the quote above emacs is called with -Q.

'make autoloads' does not throw errors, and what I use of org-mode works
except for a minor and probably unrelated glitch I did not yet find time
to track down.

Thanks for looking into it and for a terrific tool,

Julius



[O] org master: make fails

2018-05-29 Thread Julius Dittmar
Hi,

on two of my computers, both openSUSE-based with org-mode current master
and current texlive installed, make fails.

The last messages are:

make -C doc info
make[1]: Entering directory `/XXX/git/org-mode-CURRENT/doc'
emacs  -Q -batch --eval '(setq vc-handled-backends nil
org-startup-folded nil)' \
  --eval '(add-to-list '"'"'load-path "../lisp")' \
  --eval '(load "../mk/org-fixup.el")' \
  --eval '(org-make-manuals)'
Loading /XXX/git/org-mode-CURRENT/mk/org-fixup.el (source)...
Wrong number of arguments: #[(string  separators omit-nulls)

... followed by a long mainly empty and unreadable quoted string,
followed by ...

" [separators omit-nulls split-string-default-separators list notfirst
start t 0 nil string-match ...] 5 1648329], 4
make[1]: *** [org.texi] Fehler 255
make[1]: Leaving directory `/XXX/git/org-mode-CURRENT/doc'
make: *** [info] Fehler 2

As on the third of my computers (with an old debian and texlive 2017)
make works, I guess that's a local problem, not one of org-mode.
Nonetheless: Do you have any hints on what might be missing there, or
how I could proceed tracking down the problem?

Thanks in advance,
Julius



[O] ask emacs to evaluate id file

2018-05-21 Thread Julius Dittmar
Hi,

how can I tell emacs org-mode to read the link information written in
~/.emacs.d/.org-id-locations ?

I confirmed that's the file that gets written by M-x
org-id-update-id-locations, but even though the id linked to in a
[[id:XYZ]] link is included in this file, emacs cannot follow that link
to the file and headline.

Thanks in advance,

Julius




[O] how to have log line written into LOGBOOK drawer

2018-05-21 Thread Julius Dittmar
Hi,

I use a function written by John Kitchin which, among other things, does
some logging. It uses

(org-add-log-setup 'state
  (format "Review Priority %s" new-review-priority)
  current-review-priority
  'time)

for that, where new-review-priority and current-review-priority contain
strings.

Currently those lines are added right after the PROPERTIES drawer. I
would prefer for them to appear in the LOGBOOK drawer. How can I
archieve that?

Thanks in advance,

Julius




Re: [O] LOGBOOK note entries in functions

2018-05-04 Thread Julius Dittmar
Thanks a lot, John, for your efforts.
I'll play with it and come back once questions arise.

Yours,
Julius




[O] Q: setting/changing search path for links by id

2018-05-02 Thread Julius Dittmar
Hi,

I'd like to use links for cross referencing. As filenames are very prone
to change in my system, I'd like to use IDs for those links.

What I could not fathom yet is how the search path for those IDs is created.

Is there a way of (session-globally) setting that search path, in a
specialized init file for example?

Is there a way of adding a directory to this search path from inside an
org file?

Thanks for any hints,

Julius



[O] coding help needed: set, increase and log review priority

2018-05-02 Thread Julius Dittmar
Hi,

lisp is still a mystery to me, so I need help coding some functions I
would like to use.

What I want is a property 'ReviewPriority', which can take integer
values, and a property 'LastReview'. I need functions that

- increase ReviewPriority by one, assuming an initial 0 if there's no
value set, up to a hard-coded maximum of 5, set LastReview to the
current date, and log the change (new value and date are sufficient) in
the LOGBOOK drawer

- set ReviewPriority to a fixed value (for example 1), set LastReview to
the current date, and log the change in the LOGBOOK drawer

- set ReviewPriority to a user-given value (clipping to the acceptable
value range of 0 to 5 would be a boon, but is not necessary), set
LastReview to the current date, and log the change in the LOGBOOK drawer.

Additionally I'd like to bind the increase function to C-c r and the
function with user input to C-c R.

Any help welcome!

Thanks in advance,

Julius





Re: [O] org-wikinodes.el and "invalid format operation %%\"

2018-04-09 Thread Julius Dittmar
Am 09.04.2018 um 12:22 schrieb Michael Maurer:
> Ok, figured it out. This only happened in files with
> 
> #+TODO: 20% 30% 40% 50% 80% 70% 90% 95%

Maybe a stupid question, but: Is the inversion of direction -- 70% after
80% -- intended? Could that be the stumbling point?

> as part of its to-do directive. After removing the percentage to-do
> steps, camelcase worked and
> it stopped complaining about "invalid format operation %%\".
> 
> On 2 April 2018 at 12:21, Michael Maurer  wrote:
>> I've enabled org-wikinodes.el to get CamelCase wiki links. But
>> whenever I try to follow a link/camelcase word, I just get "invalid
>> format operation %%\". Although there is a headline by that name in
>> the current file.
>> I'm using org-mode 9.1.6 and Emacs 25.3.1 64-bit on Win7.




Re: [O] Exponential numbers in latex table export

2018-03-29 Thread Julius Dittmar


On 29.03.2018 10:37, Carsten Dominik wrote:
I believe I ended up using this because I wanted something that is not 
dependent on having math-mode in the table column.  What I would have 
really preferred is "%s\times10^{%s}", but that is less stable because

you need then to know if the column will have math-mode or not.


How about \ensuremath{%s\times10^{%s}} ?

Julius



Re: [O] does this pandoc error look familiar to anybody?

2018-03-25 Thread Julius Dittmar



On 25.03.2018 00:58, Samuel Wales wrote:

i then tried .latex and went to line 590 and did not find anything
unusual, nor that line.
but it was a list.  must lists not be nested?


How deeply are those lists nested? LaTeX has a maximum on that as well: 
4 levels of a specific kind of list, and 6 levels total (so you could 
put for levels of bullet-list into an enumerated list for example).


HTH,
Julius





Re: [O] Feature request: shrink according to alignment (was Re: Org table columns without width cookies get shrunk on TAB)

2018-02-21 Thread Julius Dittmar
Am 21.02.2018 um 12:45 schrieb Nicolas Goaziou:
> I agree right-aligned -- and center-aligned -- fields are not perfect,
> but I cannot think of a good design for these at the moment.

OK. I can live with that.

Julius




Re: [O] Feature request: shrink according to alignment (was Re: Org table columns without width cookies get shrunk on TAB)

2018-02-19 Thread Julius Dittmar
Am 19.02.2018 um 10:58 schrieb Nicolas Goaziou:
> Julius Dittmar <julius.ditt...@gmx.de> writes:
>> I think what the OP really would like is something like this: remove
>> leading whitespace until everything can be displayed or no more leading
>> whitespace remains, then truncate at the end if necessary. That way as
>> much meaningful contents as possible is displayed. At least that's what
>> I would wish in this situation.
> 
> I understand the idea, but the implementation seems tricky. It means Org
> may sometimes have to hide characters on both sides of a field. and
> sometimes not. It doesn't sound visually appealing.
> 
> I may be wide off the mark, tho. Do you have some specifications in
> mind, or at least some examples?

Up to the moment I read the original post I wasn't even aware any table
cell width restricting syntax exists, so I don't have any full-fledged
examples. Not even half-working ones.

What I think this was about: Assume, the following table is set up for
right-aligned output (that's one of the things I don't know how to do,
but that's fine with me):

| a very long entry which enforces a long table cell |
|a moderately long entry |
|  a short entry |

Assume further that this table is to be displayed showing only 19
characters. As I understand the original post, the outcome at the moment
would be something like :


| a very long entr... |
| ... |
| ... |

What I would prefer is:

| a very long entr... |
| a moderately lon... |
|   a short entry |

This does not really mean cutting on both ends, at least not more than
org already does. Org already does add or subtract leading or trailing
whitespace as needed. The change I'd love would spell something like
"first remove all whitespace, then cut (at the end) to length if needed,
and then add whitespace to archieve the defined alignment".

Regards,
Julius




Re: [O] N tasks per week with sexp diary entries

2018-02-18 Thread Julius Dittmar



On 18.02.2018 08:43, Gour wrote:

In my case, there is no fixed schedule per week, but it simply depends
on my free time which does vary from week to week and I only want to be
sure that I did fixed number of workouts per week. Moreover, if e.g.
the program does last 10 weeks, I most probably want to just continue
with it from the 11th week, iow. continuous exercising. So, it seems I
have to create schedule manually...


What I do in this case is create three (different) weekly entries. They 
all repeat with a ++1ŵ schedule (starting on, say, a Monday). That way I 
can tick them off one by one. As those are displayed in direct sequence 
in the agena I can easily see where I stand exercise-wise.


Perhaps that's a work-around you can live with too.

Julius



Re: [O] Feature request: shrink according to alignment (was Re: Org table columns without width cookies get shrunk on TAB)

2018-02-15 Thread Julius Dittmar
Am 15.02.2018 um 14:44 schrieb Nicolas Goaziou:
> Hello,
> 
> Eric S Fraga  writes:
> 
>> For Nicolas or anybody else, I have a feature request.  Would it be
>> possible to shrink columns taking into account the alignment of the
>> column?  For instance, I have a right aligned column which, when shrunk
>> to a given width, appears empty except for long entries.  It would be
>> nice if the shrinking happened from the left in this case.
> 
> You would only see the end of the contents, which, in many situations,
> is only marginally better than seeing nothing at all.
> 
> Also, this would be optimal for centered columns either.
> 
> I have the feeling that it would some trouble for little benefit.

I think what the OP really would like is something like this: remove
leading whitespace until everything can be displayed or no more leading
whitespace remains, then truncate at the end if necessary. That way as
much meaningful contents as possible is displayed. At least that's what
I would wish in this situation.

Julius



Re: [O] when/how are org-mode settings loaded

2018-02-08 Thread Julius Dittmar
Am 08.02.2018 um 14:08 schrieb Julius Dittmar:
> Hi Jack,
> 
> thanks for the answer.
> 
> Am 08.02.2018 um 13:44 schrieb Jack Henahan:
>> Could you post your config?
> 
> I shy back from that because the config -- a strongly modified version
> of the configuration pubished at http://doc.norang.ca/org-mode.html --
> is quite lengthy.

OK, I checked and reallized most of that lengthy config file consists of
commented-out parts. I'll attach what's left.

Thanks again for any hints,

Julius




org.config
Description: application/config


Re: [O] when/how are org-mode settings loaded

2018-02-08 Thread Julius Dittmar
Hi Jack,

thanks for the answer.

Am 08.02.2018 um 13:44 schrieb Jack Henahan:
> Could you post your config?

I shy back from that because the config -- a strongly modified version
of the configuration pubished at http://doc.norang.ca/org-mode.html --
is quite lengthy.

> I expect the issue is that you don’t (require 'org) or set up the 
> auto-mode-alist in your init file. This would also be the case if, for 
> instance, you defer loading the package with use-package, as well. Invoking 
> the agenda will load org, so the next org file you open will do what you 
> expect.

The config starts with

(require 'org)

immediately after adjusting some paths so the git-version of org is
found. Some lines below there's

(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" .
org-mode))

> Do org files open in Fundamental mode when you don’t invoke the agenda first?

How would I find out?

Emacs adds the org-specific menu entries upon opening that file, and
shows org as major mode in the status line. At least some of the org
shortcuts (like adding a timestamp, or the basic outlining key-codes)
are active. I just sorely miss the highlighting :-(

Thanks for any hints,

Julius

> On Feb 8, 2018, at 03:42, Julius Dittmar <julius.ditt...@gmx.de> wrote:
>> Hi,
>>
>> I'm an emacs-newbe, so please bear with me. I must be doing something
>> wrong and I have no idea where to look.
>>
>> If my emacs-starting sequence is
>>
>> 1. call emacs with no arguments (and a config file adding various
>> org-mode settings)
>> 2. launch org-mode agenda once
>> 3. open a file with .org suffix
>>
>> then highlighting and keybindings for that file are as I expect them and
>> in sync with the org-mode settings in the config file.
>>
>> If I omit step 2, then highlighting in the file does not work.
>>
>> Even if I then call agenda and later, either by choosing an agenda item
>> or directly, go back to that file buffer, highlighting still does not
>> work there.
>>
>> Any pointers as to what might cause such behaviour? Or perhaps a faster
>> work-around than generating the whole (over-full) agenda?
>>
>> Thanks in advance,
>>
>> Julius
>>
>> PS: GNU Emacs 24.3.1, org-mode release_9.1.6-159-g8554aa9



[O] when/how are org-mode settings loaded

2018-02-08 Thread Julius Dittmar
Hi,

I'm an emacs-newbe, so please bear with me. I must be doing something
wrong and I have no idea where to look.

If my emacs-starting sequence is

1. call emacs with no arguments (and a config file adding various
org-mode settings)
2. launch org-mode agenda once
3. open a file with .org suffix

then highlighting and keybindings for that file are as I expect them and
in sync with the org-mode settings in the config file.

If I omit step 2, then highlighting in the file does not work.

Even if I then call agenda and later, either by choosing an agenda item
or directly, go back to that file buffer, highlighting still does not
work there.

Any pointers as to what might cause such behaviour? Or perhaps a faster
work-around than generating the whole (over-full) agenda?

Thanks in advance,

Julius

PS: GNU Emacs 24.3.1, org-mode release_9.1.6-159-g8554aa9



Re: [O] [RFC] Moving "manual.org" into core

2018-01-23 Thread Julius Dittmar
Am 23.01.2018 um 16:19 schrieb Kaushal Modi:
> There is another issue with "begin_src org" blocks. If your example
> contains a link, you only see the description part, not the whole
> syntax. Thus
> 
> #+begin_src org
>   [[path][description]]
> #+end_src
> 
> is seen as
> 
> #+begin_src org
>   description
> #+end_src
> 
> which can be very confusing.
> 
> 
> Wouldn't that qualify as a bug? Shouldn't text in src blocks always be
> shown verbatim without any overlays? Use of example block instead of src
> block using this as one of the reasons looks like a workaround.

I think not.

As far as I understood, a src block is tagged with a style information
so the appropriate emacs mode for displaying this kind of code is used.
So the second display is exactly what I'd expect.

Julius