Re: [feature request] A new cookie type [!] showing the last note taken

2020-08-31 Thread Julius Müller
Am 31.08.20 um 04:26 schrieb Ihor Radchenko:
> I would not call defining syntax for notes "a syntax change". Rather
> addition to syntax. Since there was no formal definition of notes in the
> past, introducing formal syntax for notes should not break any existing
> tool. If anything, it should make it easier for those tools to deal with
> notes.

Make it easier perhaps -- once the tool has been changed to the new
syntax. But you might break current usage. And not everyone using such
tools has coding skills to make those tools work again.

Prof. Kitchin kindly gifted me with some code for a flash card learning
system. That code uses org-add-log-setup directly. Notes added like that
might not follow your newly added syntax.

Julius




Re: `#+author:' stopped setting the author to empty string

2020-05-18 Thread Julius Müller
Am 18.05.20 um 15:57 schrieb Kaushal Modi:
> I looked through the commits on master in the past month, but I don't
> see any author-specific change that would affect *all* the exporter
> backends.
>
> Can anyone else reproduce this issue?

Same observation here (org master from about a week ago, GNU emacs 26.3,
ubuntu 18.4)

I solved the problem by using

#+author: \nbsp

and forgot to report.

Julius



how to hack section lines in LaTeX export?

2020-02-11 Thread Julius Müller
Hi folks,

I would like to add a property's contents to the section line in LaTeX
export. Is there a way to do that?

Here's a minimal (not) working example. Use it with 'emacs -q', execute
the source block to add the class definition to org, then export to LaTeX.

---
#+begin_src elisp :exports none :results none
(require 'ox-latex)
(add-to-list 'org-latex-classes
  '("QA"
"\\documentclass{article}"
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
#+end_src

#+LATEX_CLASS: QA

* test section
:PROPERTIES:
:ID:   ylv4e021ami0
:END:
-

Currently this produces section headers like

\QA{test section}

in LaTeX export.

I would like to have org produce section headers like

\QA[ID: ylv4e021ami0]{test section}.

I know the ID can be extracted with something like

(if (org-id-get) (insert (format "\n\\ID: %s\n" (org-id-get

but how can I add that to the section header?

John Kitchin kindly provided some code to extract the ID at the end of
the metadata block, but unfortunately that's too late for the effect I
am after :-(

Thanks for any pointers,

Julius Müller



Re: Capture to heading of current cursor

2019-11-06 Thread Julius Müller
Am 05.11.19 um 22:26 schrieb Nathan Neff:
> Hello all,
>
> I know I've asked this before, but can't remember the quick & easy path (TM)
> to creating an org-capture template which will capture to the current
> heading?

prepend the capture command (C-C C in my setting) by C-0

I think it puts the result before the next heading though.

Remember to make sure the captured text ends with at least one newline.

HTH,
Julius

>
> Thanks,
> --Nate




Re: Org 9.2 not inhibiting electric-pair-mode in the beginning of lines?

2019-10-29 Thread Julius Müller
Am 29.10.19 um 16:08 schrieb Julius Müller:
> Am 29.10.19 um 15:57 schrieb Vladimir Nikishkin:
>> Please, consider visitiong M-x info-display-manual RET org RET section
>> 15.2, paragraph 4.
> 
> Well, there's at least something missing in that documentation. Without
> any config file active, but with org mode loaded, those abbreviations
> are not availlable to me (as I expected from discussions in this group).

Oops, I mistyped. My fault. Sorry for the noise.

Julius



Re: Org 9.2 not inhibiting electric-pair-mode in the beginning of lines?

2019-10-29 Thread Julius Müller
Am 29.10.19 um 15:57 schrieb Vladimir Nikishkin:
> Please, consider visitiong M-x info-display-manual RET org RET section
> 15.2, paragraph 4.

Well, there's at least something missing in that documentation. Without
any config file active, but with org mode loaded, those abbreviations
are not availlable to me (as I expected from discussions in this group).

HTH,
Julius




Re: [O] Feature Proposal: Titled Paragraphs

2019-10-24 Thread Julius Müller
Am 23.10.19 um 16:18 schrieb Dominik Schrempf:
> I agree with this proposal. At some point I already asked if the following
> structure is possible:
>
> #+begin_example
> * Title
> ** Section I
> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit 
> tempor
> tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis
> eget, convallis nec, purus. Cum sociis natoque penatibus et magnis dis
> parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor.
> Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum.
> Nam vestibulum accumsan nisl.
>
> Another paragraph that is not related to Section I, but doesn't deserve a
> section title. Another paragraph that is not related to Section I, but doesn't
> deserve a section title. Another paragraph that is not related to Section I, 
> but
> doesn't deserve a section title. Another paragraph that is not related to
> Section I, but doesn't deserve a section title.
> #+end_example
>
> With titled paragraphs, this document structure could be achieved.

Only if you are very restrictive about it, as you hit a fundamental
problem of org markup here, a problem it shares with (La)TeX, HTML, all
printed books I'm aware of, and a lot of other formats. Org and (La)TeX
only markup the start of a section, not its end. Thus it would be
difficult to tell your construct apart from other kind of structures.

Contrary to your view, in the (La)TeX-world \paragraph is usually seen
as just another hierarchical level of document structuring. It is a
heading (with a weird default of not standing on a line of its own), and
it does NOT solely belong to the one paragraph it starts. In fact, with
your view, (La)TeX's \subparagraph macro would not make any sense at
all. That means, adding \paragraph in your sense will break document
structure the moment you also have nesting deeper than 3 (or 4 for
book-like formats).

Julius



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

2018-11-29 Thread Julius Müller
Am 29.11.18 um 14:07 schrieb Loris Bennett:
> Eric S Fraga  writes:
> 
>> On Thursday, 29 Nov 2018 at 09:38, Julius Dittmar wrote:
>>> 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?
>>
>> Also, you may need to define your mytextheight as a length and then use 
>> \setlength instead of \let.
> 
> After correcting the typo I followed Eric's and Julius's suggestions and
> I tried adding
> 
>   #+LATEX_HEADER: 
> \newlength\mytextheight\makeatletter\setlength\mytextheight{\beamer@frametextheight}\makeatother
> 
> to the beginning of the Org file, but in this case
> 
>   \the\mytextheight
> > is 0.0pt.

That's what I suspected. You could try to wrap this line in an
#+begin_export latex block (as I suggested), then it will be within the
document instead of in the preamble.

I usually refrain from using AtBeginDocument hooks (Gustavo Barros'
suggestion) because I do not know enough about them, so I rather add the
commands to a place I can see ;-)

>  After that I tried adding the definition on the slide itself
> 
>   #+BEGIN_SRC latex
>   
> \newlength\mytextheight\makeatletter\setlength\mytextheight{\beamer@frametextheight}\makeatother
>   #+END_SRC

Hm, src-block? I would have thought you should wrap that in an
export-block, so those commands get added to the exported document, not
quoted within as a source code. That would mean

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

HTH,
Julius



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

2018-07-30 Thread Julius Müller
I should have used org-export-select-tags instead of
org-export-exclude-tags. Sorry for the noise.

Julius

Am 26.07.2018 um 18:16 schrieb 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
>