<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss"
        xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
        xmlns:media="http://search.yahoo.com/mrss/"><channel>
<title>How to do X with Emacs Org-Mode</title>
<atom:link href="https://www.draketo.de/software/org-mode-tipps.xml" rel="self" type="application/rss+xml" />
<link>https://www.draketo.de/software</link>
<description><![CDATA[]]></description>
<language>en</language>
<pubDate>Sat, 02 May 2026 23:05:19 +0200</pubDate>
<lastBuildDate>Sat, 02 May 2026 23:05:19 +0200</lastBuildDate>
<generator>Emacs 31.0 Org-mode 9.7.39</generator>
<webMaster>arne@fluss (ArneBab)</webMaster>
<image>
<url>https://www.draketo.de/assets/portrait.png</url>
<title>How to do X with Emacs Org-Mode</title>
<link>https://www.draketo.de/software</link>
</image>

<div id="head">
  <div id="preamble">
    <div id="nav-list">
      <a href="../wissen.html" class="category-tab tab-inactive tab-wissen">Wissen</a>
      <a href="../software.html" class="category-tab tab-inactive tab-software">Software</a>
      <a href="../politik.html" class="category-tab tab-inactive tab-politik">Politik</a>
      <a href="../index.html" class="category-tab tab-inactive tab-photo" title="Startpage" aria-label="Startpage"> </a>
      <a href="../anderes.html" class="category-tab tab-inactive tab-anderes">Anderes</a>
      <a href="../kreatives.html" class="category-tab tab-inactive tab-kreatives">Kreatives</a>
      <a href="../rollenspiel.html" class="category-tab tab-inactive tab-rollenspiel">Rollenspiel</a>
    </div>
  </div>
</div>
<!-- Search your soul and add the goal to favor building with Guile Wisp.-->

<div class="dark-mode-toggle"><a onclick="invert()">(dark mode)<span class="icon">🌓︎</span></a></div>

<p>
<a href="http://gnu.org/s/emacs">Emacs</a> <a href="http://orgmode.org">Org mode</a> keeps me organized. Here I plan to incrementally gather tipps.
</p>

<div class="sourcebox" markdown="1" >
<a href="org-mode.pdf"><img width="168" height="235" title="PDF" src="../assets/pdf-thumbnail.png" /></a><br />
<a href="org-mode.pdf">PDF</a> (drucken)
</div>
<style>
/* full-width figures */
figure { max-width: 100%; padding: 0; margin: 0; }  
img { max-width: 100%; }
  .org-src-container pre, pre.example, pre.yaml {
    font-size: smaller;
    overflow-x: auto;
    min-width: unset;
    margin: 0em;
  }
</style>

<nav id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#full-page-image-export-latex">full-page images per page for printing via latex eport</a></li>
<li><a href="#agenda-and-todo">agenda-and-todo: my most important planning tool</a></li>
<li><a href="#gantt">create a simple gantt-chart from a table with Gnuplot</a>
<ul>
<li><a href="#gantt-plantuml">More complex Gantt with plantuml</a></li>
<li><a href="#gantt-more">Projects to export gantt from the org-mode tree</a></li>
</ul>
</li>
<li><a href="#export-markdown-latex">export to markdown and latex</a></li>
<li><a href="#org-capture-commandline">run org-capture from commandline</a></li>
<li><a href="#ahead-of-tasks">How I stay ahead of tasks with org-mode</a>
<ul>
<li><a href="#ID-79e93734-4187-48d0-b590-254d51c4547b">Custom starting point: agenda-with-kanban</a></li>
<li><a href="#ID-6feb36da-e46c-4b87-b67b-090bdf84ce66">One planning file</a></li>
<li><a href="#ID-cdbeb26e-ab8c-48e1-a8e5-67ba0054f5a7">Kanban Table at the top</a></li>
<li><a href="#ID-003f1a8c-9ff7-48b2-b5ea-6fff3a64427b">Capture tasks for Projects</a></li>
<li><a href="#ID-3597b5f5-312a-436c-b751-b28e6127ace3">Setup</a></li>
</ul>
</li>
<li><a href="#effort-clocktable-columns">Effort in Clocktable and Columns</a></li>
<li><a href="#ledger-org">integrating accounting with ledger into org-mode</a></li>
<li><a href="#signature">Easy signature-block for multiple signatures in org</a></li>
<li><a href="#plantuml-imagemap">Include an imagemap with a plantuml diagram</a>
<ul>
<li><a href="#ID-64dd9366-afa7-49ab-92ac-f51a3e6e5dce">Example</a></li>
<li><a href="#plantuml-imagemap-code">Code</a></li>
</ul>
</li>
<li><a href="#clickable-time-tracking">Single-click time tracking with links</a></li>
<li><a href="#org-publish-setup">Org-publish setup of draketo.de</a></li>
<li><a href="#plot-historgram-table-calculation">Plot a histogram from a table with calculated percentages</a></li>
<li><a href="#org-beamer-deploy-gitlab-pages">Deploy org-beamer slides to gitlab pages via CI</a></li>
<li><a href="#fill-with-squares">Fill the rest of the page with grid squares</a></li>
</ul>
</div>
</nav>
<item>
<title>full-page images per page for printing via latex eport</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#full-page-image-export-latex</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#full-page-image-export-latex</guid>
<pubDate>Mon, 23 Aug 2021 09:41:00 +0200</pubDate>

<description><![CDATA[<p>
Task: create a PDF with full-width images for printing.
</p>

<small>

<div class="org-src-container">
<pre class="src src-org"><span style="color: #b22222;">#+latex_header: \usepackage[margin=0.0cm]{geometry}</span>
<span style="color: #b22222;">#+options: toc:nil</span>


<span style="color: #b22222;"># ## upside image ##</span>
<span style="color: #b22222;">#+latex: \noindent</span>
<span style="color: #b22222;">#+attr_latex: :width 0.9999\textwidth :height 0.9999\textheight :options keepaspectratio=true,angle=90</span>
<span style="color: #3a5fcd; text-decoration: underline;"><a href="file:portrait.jpg">file:portrait.jpg</a></span>


<span style="color: #b22222;"># ## rotated image ##</span>
<span style="color: #b22222;">#+latex: \noindent</span>
<span style="color: #b22222;">#+attr_latex: :width 0.9999\textwidth :height 0.9999\textheight :options keepaspectratio=true</span>
<span style="color: #3a5fcd; text-decoration: underline;"><a href="file:landscape.jpg">file:landscape.jpg</a></span>


<span style="color: #b22222;"># ## two images per page ##</span>
<span style="color: #b22222;">#+latex: \noindent</span>
<span style="color: #b22222;">#+attr_latex: :width 0.9999\textwidth :height 0.495\textheight :options keepaspectratio=true</span>
<span style="color: #3a5fcd; text-decoration: underline;"><a href="file:landscape.jpg">file:landscape.jpg</a></span>

<span style="color: #b22222;">#+latex: \noindent</span>
<span style="color: #b22222;">#+attr_latex: :width 0.9999\textwidth :height 0.495\textheight :options keepaspectratio=true</span>
<span style="color: #3a5fcd; text-decoration: underline;"><a href="file:landscape.jpg">file:landscape.jpg</a></span>


<span style="color: #b22222;"># ## keep some space around the images </span>

<span style="color: #b22222;">#+latex: \noindent</span>
<span style="color: #b22222;">#+attr_latex: :width 0.98\textwidth :height 0.98\textheight :options keepaspectratio=true</span>
<span style="color: #3a5fcd; text-decoration: underline;"><a href="file:portrait.jpg">file:portrait.jpg</a></span>
</pre>
</div>

</small>

<p>
Now just export with <code>C-c C-e l p</code> (export to pdf). (the 0.9999 height and width prevent LaTeX from skipping pages)
</p>

<p>
To turn these into a gallery with 4x4 images per page to cut out the
images, you can use pdfnup:
</p>

<div class="org-src-container">
<pre class="src src-bash">pdfnup --nup 4x4 --no-landscape foo.pdf
<span style="color: #b22222;"># </span><span style="color: #b22222;">creates foo-nup.pdf</span>
</pre>
</div>
]]></description>
</item>
<item>
<title>agenda-and-todo: my most important planning tool</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#agenda-and-todo</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#agenda-and-todo</guid>
<pubDate>Thu, 26 Aug 2021 11:00:00 +0200</pubDate>

<description><![CDATA[<p>
<i>When I open my Emacs, I hit F12.</i>
</p>


<figure id="orgb9db69d">
<a href="screenshot-20210826103308.png"><img src="screenshot-20210826103308-width600.png" alt="screenshot-20210826103308-width600.png" /></a>

</figure>

<p>
This is what keeps me organized — at home as well as at work. As you
can see with the high scheduled count, it isn't perfect, but whenever
I skip it, I lose focus. A lifesaver at work, staying ahead of
important tasks at home.
</p>

<p>
It’s a custom agenda combined with <a href="https://www.draketo.de/light/english/free-software/el-kanban-org-table">kanban.el</a> and optimized TODO states.
</p>

<p>
Put this into your <code>~/.emacs.d/init.el</code> to replicate it:
</p>

<div class="org-src-container">
<pre class="src src-elisp"><span style="color: #b22222;">;; </span><span style="color: #b22222;">KDE: show custom agenda with kanban via f12:</span>
(<span style="color: #a020f0;">with-eval-after-load</span> 'org
  (<span style="color: #a020f0;">setq</span> org-agenda-custom-commands
        '((<span style="color: #8b2252;">"o"</span> <span style="color: #8b2252;">"Agenda and TODOs"</span>
           ((agenda)
            (tags-todo <span style="color: #8b2252;">"-notodo-TERMIN"</span> ((org-agenda-block-separator ?-)))
                (tags <span style="color: #8b2252;">"KANBAN"</span> ((org-agenda-block-separator ?-)
                            (org-agenda-compact-blocks nil)
                            (org-agenda-overriding-header <span style="color: #8b2252;">""</span>))))))))

<span style="color: #b22222;">;; </span><span style="color: #b22222;">from https://www.emacswiki.org/emacs/TransposeWindows solution by Robert Bost</span>
(<span style="color: #a020f0;">defun</span> <span style="color: #0000ff;">rotate-windows</span> (arg)
  <span style="color: #8b2252;">"Rotate your windows; with prefix argument to rotate the other direction"</span>
  (<span style="color: #a020f0;">interactive</span> <span style="color: #8b2252;">"P"</span>)
  (<span style="color: #a020f0;">if</span> (not (&gt; (count-windows) 1))
      (message <span style="color: #8b2252;">"You can't rotate a single window!"</span>)
    (<span style="color: #a020f0;">let*</span> ((rotate-times (prefix-numeric-value arg))
           (direction (<span style="color: #a020f0;">if</span> (<span style="color: #a020f0;">or</span> (&lt; rotate-times 0) (equal arg '(4)))
                          'reverse 'identity)))
      (<span style="color: #a020f0;">dotimes</span> (_ (abs rotate-times))
        (<span style="color: #a020f0;">dotimes</span> (i (- (count-windows) 1))
          (<span style="color: #a020f0;">let*</span> ((w1 (elt (funcall direction (window-list)) i))
                 (w2 (elt (funcall direction (window-list)) (+ i 1)))
                 (b1 (window-buffer w1))
                 (b2 (window-buffer w2))
                 (s1 (window-start w1))
                 (s2 (window-start w2))
                 (p1 (window-point w1))
                 (p2 (window-point w2)))
            (set-window-buffer-start-and-point w1 b2 s2 p2)
            (set-window-buffer-start-and-point w2 b1 s1 p1)))))))

(<span style="color: #a020f0;">defun</span> <span style="color: #0000ff;">my/org-agenda-show-kanban</span> ()
  (<span style="color: #a020f0;">interactive</span>)
  (<span style="color: #a020f0;">save-excursion</span>
    (search-forward <span style="color: #8b2252;">":KANBAN:"</span>)
    (org-agenda-goto)
    (org-narrow-to-subtree)
    (show-all)
    (fit-window-to-buffer)
    (widen)
    (recenter-top-bottom 0)))

(<span style="color: #a020f0;">defun</span> <span style="color: #0000ff;">agenda-and-todo</span> ()
  (<span style="color: #a020f0;">interactive</span>)
  (org-agenda nil <span style="color: #8b2252;">"o"</span>)
  (delete-other-windows)
  (my/org-agenda-show-kanban)
  (rotate-windows 1))
<span style="color: #b22222;">;;      </span><span style="color: #b22222;">systemsettings shortcuts: map f12 to</span>
<span style="color: #b22222;">;;        </span><span style="color: #b22222;">emacsclient -e '(progn (show-frame)(agenda-and-todo))'</span>
(global-set-key (kbd <span style="color: #8b2252;">"&lt;f12&gt;"</span>) 'agenda-and-todo)
</pre>
</div>

<p>
To make it look like the screenshot, also set some options in the org-file:
</p>

<div class="org-src-container">
<pre class="src src-org"><span style="color: #b22222;">#+STARTUP: overview</span>
<span style="color: #b22222;"># TAG TERMIN is excluded from the Kanban table</span>
<span style="color: #b22222;">#+TAGS: WOHNUNG(w) RAUS(r) SONST(s) LESEN(l) KANBAN(k) 1w6(1) FAMILIE(f) TERMIN(t)</span>
<span style="color: #b22222;">#+STARTUP: hidestars logdone</span>
<span style="color: #b22222;">#+SEQ_TODO: &#10082; &#9775; &#10710; | &#10004; DEFERRED</span>
<span style="color: #b22222;"># logdone adds a DONE timestamp when switching from a TODO (before |)</span>
<span style="color: #b22222;"># to a DONE keyword (after |)</span>
<span style="color: #b22222;"># State with (!) behind it means, add a timestamp when switching to that.</span>
<span style="color: #b22222;"># See <a href="http://orgmode.org/manual/Tracking-TODO-state-changes.html">http://orgmode.org/manual/Tracking-TODO-state-changes.html</a></span>

<span style="color: #0000ff;">|   |   |   |</span>
<span style="color: #0000ff;">|---+---+---|</span>
<span style="color: #0000ff;">|   |   |   |</span>
<span style="color: #0000ff;">|   |   |   |</span>
<span style="color: #0000ff;">|   |   |   |</span>
<span style="color: #b22222;">#+TBLFM: @1='(kanban-headers $#)::@2$1..@&gt;$&gt;='(kanban-zero @# $# "-TERMIN" 'file)</span>
</pre>
</div>

<p>
If you use this, the following could also come in handy:
</p>

<div class="org-src-container">
<pre class="src src-elisp"><span style="color: #b22222;">;; </span><span style="color: #b22222;">KDE: update all agenda kanban tables with C-S-f12 (ctrl-shift f12)</span>
(<span style="color: #a020f0;">defun</span> <span style="color: #0000ff;">kanban-update-all</span> ()
  (<span style="color: #a020f0;">interactive</span>)
  (<span style="color: #a020f0;">cl-loop</span> for i in org-agenda-files do
           (<span style="color: #a020f0;">with-current-buffer</span> (find-file-noselect i)
             (<span style="color: #a020f0;">save-excursion</span> <span style="color: #b22222;">;; </span><span style="color: #b22222;">avoid changing the position in the agenda files</span>
               (beginning-of-buffer)
               (<span style="color: #a020f0;">while</span> (search-forward <span style="color: #8b2252;">"='(kanban-"</span> nil t)
                 (org-ctrl-c-ctrl-c))))))
<span style="color: #b22222;">;;      </span><span style="color: #b22222;">systemsettings shortcuts: map control shift f12 to</span>
<span style="color: #b22222;">;;        </span><span style="color: #b22222;">emacsclient -e '(progn (show-frame)(kanban-update-all))'</span>
(global-set-key (kbd <span style="color: #8b2252;">"C-S-&lt;f12&gt;"</span>) 'kanban-update-all)
</pre>
</div>
]]></description>
</item>
<item>
<title>create a simple gantt-chart from a table with Gnuplot</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#gantt</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#gantt</guid>
<pubDate>Mon, 27 Sep 2021 19:22:00 +0200</pubDate>

<description><![CDATA[<p>
<a href="https://en.wikipedia.org/wiki/Gantt_chart">Gantt-Charts</a> make it easy to grasp project organization tasks at a
glance. If you only need smaller projects with limited scope and 4-6
participants, it is viable to create them directly from an org-mode
table.
</p>



<figure id="org4f29ace">
<img src="gantt-out.png" alt="gantt-out.png" />

</figure>

<p>
All data is in the following Table: 
</p>

<table id="gantt-table">


<colgroup>
<col  class="org-left" />

<col  class="org-right" />

<col  class="org-left" />

<col  class="org-left" />

<col  class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Task</th>
<th scope="col" class="org-right">Effort</th>
<th scope="col" class="org-left">Start</th>
<th scope="col" class="org-left">End</th>
<th scope="col" class="org-left">Who</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Time available</td>
<td class="org-right">1</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
</tr>

<tr>
<td class="org-left">Task 0</td>
<td class="org-right">2</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Al</td>
</tr>

<tr>
<td class="org-left">Task 1</td>
<td class="org-right">1</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Bo</td>
</tr>

<tr>
<td class="org-left">Task 2</td>
<td class="org-right">3</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Ca</td>
</tr>

<tr>
<td class="org-left">Task 3</td>
<td class="org-right">2</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Ca</td>
</tr>

<tr>
<td class="org-left">Task 4</td>
<td class="org-right">2</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Bo</td>
</tr>

<tr>
<td class="org-left">Task 5</td>
<td class="org-right">1</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Bo</td>
</tr>

<tr>
<td class="org-left">Task 6</td>
<td class="org-right">1</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Bo</td>
</tr>

<tr>
<td class="org-left">Task 7</td>
<td class="org-right">2</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Al</td>
</tr>

<tr>
<td class="org-left">Task 8</td>
<td class="org-right">1</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Al</td>
</tr>

<tr>
<td class="org-left">Task 9</td>
<td class="org-right">1</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Al</td>
</tr>

<tr>
<td class="org-left">Task 10</td>
<td class="org-right">1</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">Bo</td>
</tr>

<tr>
<td class="org-left">Task  11</td>
<td class="org-right">1</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
<td class="org-left">&#xa0;</td>
</tr>
</tbody>
</table>

<p>
the time available row ensures that the whole project-duration is
shown. You need to set the start and end dates manually: Hit <code>C-c .</code>
to enter the calendar and select the date.
</p>

<p>
The parsing is done by the following code:
</p>

<div class="org-src-container">
<pre class="src src-gnuplot" id="KollAbAccessGantt"><span style="color: #008b8b;">reset</span>
<span style="color: #b22222;"># </span><span style="color: #b22222;">http://gnuplot.sourceforge.net/demo_5.1/gantt.html</span>
<span style="color: #a0522d;">OneMonth =</span> <span style="color: #0000ff;">strptime</span>(<span style="color: #8b2252;">"%m"</span>,<span style="color: #8b2252;">"2"</span>)
<span style="color: #a0522d;">OneWeek =</span> <span style="color: #0000ff;">strptime</span>(<span style="color: #8b2252;">"%U"</span>,<span style="color: #8b2252;">"2"</span>)
<span style="color: #a0522d;">OneDay =</span> <span style="color: #0000ff;">strptime</span>(<span style="color: #8b2252;">"%d"</span>,<span style="color: #8b2252;">"2"</span>)
<span style="color: #a0522d;">timeformat =</span> <span style="color: #8b2252;">"%Y-%m-%d %a"</span>
<span style="color: #a0522d;">T(N) =</span> <span style="color: #0000ff;">timecolumn</span>(N,timeformat)

<span style="color: #008b8b;">set</span> xdata time
<span style="color: #008b8b;">set</span> format x <span style="color: #8b2252;">"%a\n%d\n%b\n'%y"</span>
<span style="color: #008b8b;">set</span> xtics OneDay nomirror
<span style="color: #008b8b;">set</span> xtics scale 2, 0.5
<span style="color: #008b8b;">set</span> mxtics 7

<span style="color: #a0522d;">skiptorow=</span>2
<span style="color: #008b8b;">set</span> yrange [<span style="color: #008b8b;">(skiptorow-2):</span>] reverse
<span style="color: #008b8b;">set</span> ytics nomirror

<span style="color: #008b8b;">unset</span> key
<span style="color: #008b8b;">set</span> <span style="color: #228b22;">title</span> <span style="color: #8b2252;">"{/=15 My Project}"</span>
<span style="color: #008b8b;">set</span> grid x y
<span style="color: #008b8b;">set</span> border 3
<span style="color: #008b8b;">set</span> style arrow 1 nohead filled size screen 0.02, 15 fixed <span style="color: #228b22;">lt</span> 3 <span style="color: #228b22;">lw</span> 8

<span style="color: #a020f0;">plot</span> DATA <span style="color: #228b22;">using</span> (T(3)) : ($0) : (T(4)-T(3)) : (0.0) : yticlabel(1) <span style="color: #228b22;">with</span> <span style="color: #0000ff;">vector</span> as 1
</pre>
</div>


<p>
You might have to add gnuplot to your active languages:
</p>

<div class="org-src-container">
<pre class="src src-elisp">(org-babel-do-load-languages
 'org-babel-load-languages
 '((gnuplot . t)))
</pre>
</div>
<div id="outline-container-gantt-plantuml" class="outline-3">
<h3 id="gantt-plantuml">More complex Gantt with plantuml</h3>
<div class="outline-text-3" id="text-gantt-plantuml">
<p>
If you need something more complex, you can go to the full <a href="https://plantuml.com/de/gantt-diagram">plantuml DSL</a>. Example: 
</p>

<div class="org-src-container">
<pre class="src src-plantuml">@startgantt
saturday are closed
sunday are closed
' see https://plantuml.com/gantt-diagram
Project starts at 2021-04-26
[Configuration] as [C] on {DEV1:50%} lasts 1 day
note bottom
  description
end note
[Implementation] as [I] on {DEV2} lasts 3 days
note bottom
  in multiple
  lines
end note
[I] starts at [C]'s end with green bold link
{DEV2} is off on 2021-04-30
@endgantt
</pre>
</div>


<figure id="org9422380">
<img src="my-complex-project.png" alt="my-complex-project.png" />

</figure>

<p>
The full source of these examples with the org-mode sourceblocks is available <a href="https://hg.sr.ht/~arnebab/draketo/browse/software/org-mode-tipps.org">in my website's source-code</a>.
</p>
</div>
</div>
<div id="outline-container-gantt-more" class="outline-3">
<h3 id="gantt-more">Projects to export gantt from the org-mode tree</h3>
<div class="outline-text-3" id="text-gantt-more">
<ul class="org-ul">
<li><a href="https://orgmode.org/worg/org-tutorials/org-taskjuggler.html">exported to taskjuggler</a></li>
<li><a href="https://github.com/legalnonsense/elgantt/">as interactive, emacs-hosted website</a></li>
<li><a href="https://github.com/swillner/org-gantt/blob/master/org-gantt-manual.pdf">via LaTeX</a></li>
</ul>

<p>
<span class="timestamp-wrapper"><span class="timestamp">[2021-09-27 Mo]</span></span>
</p>
</div>
</div>
]]></description>
</item>
<item>
<title>export to markdown and latex</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#export-markdown-latex</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#export-markdown-latex</guid>
<pubDate>Mon, 18 Oct 2021 19:08:00 +0200</pubDate>

<description><![CDATA[<div class="org-src-container">
<pre class="src src-org">(require 'ox-md)
<span style="color: #b22222;">#+begin_export markdown</span>
<span style="color: #7f7f7f;"># foo</span>
<span style="color: #7f7f7f;">__bar__</span>
<span style="color: #b22222;">#+end_export</span>
<span style="color: #b22222;">#+begin_export latex</span>
<span style="color: #a020f0;">\section</span><span style="color: #7f7f7f;">{</span><span style="color: #00008b; font-size: 133%; font-weight: bold;">foo</span><span style="color: #7f7f7f;">}</span>
<span style="color: #a020f0;">\textbf</span><span style="color: #7f7f7f;">{</span><span style="color: #556b2f; font-weight: bold;">bar</span><span style="color: #7f7f7f;">}</span>
<span style="color: #b22222;">#+end_export</span>
<span style="font-weight: bold;">*bar*</span>
</pre>
</div>

<p>

</p>
]]></description>
</item>
<item>
<title>run org-capture from commandline</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#org-capture-commandline</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#org-capture-commandline</guid>
<pubDate>Thu, 11 Nov 2021 12:50:00 +0100</pubDate>

<description><![CDATA[<div class="org-src-container">
<pre class="src src-bash">emacs -nw -e org-capture
</pre>
</div>

<p>
I call this in the shell via <code>CRTL-r capture ENTER</code>: Search backwards for the last command with capture.
</p>

<p>

</p>
]]></description>
</item>
<item>
<title>How I stay ahead of tasks with org-mode</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#ahead-of-tasks</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#ahead-of-tasks</guid>
<pubDate>Tue, 01 Mar 2022 09:48:00 +0100</pubDate>

<description><![CDATA[<p>
I found that org-mode is the only organization tool for which using the
tool actually reduces the time I need for organization. That works by
taking notes in org-mode, too, and keeping it simple.
</p>

<p>
I also found that whenever I skip organizing in org-mode, I lose focus
and time used (lost?) for tasks extends a lot.
</p>

<p>
The basics of my setup are:
</p>
<div id="outline-container-ID-79e93734-4187-48d0-b590-254d51c4547b" class="outline-3">
<h3 id="ID-79e93734-4187-48d0-b590-254d51c4547b">Custom starting point: agenda-with-kanban</h3>
<div class="outline-text-3" id="text-org61440c5">
<p>
A function to show the agenda it besides the Kanban table. I start
each day and after each larger break by hitting F12. It shows me the
agenda and entry points into my work. This enables me to stay focussed.
</p>
</div>
</div>
<div id="outline-container-ID-6feb36da-e46c-4b87-b67b-090bdf84ce66" class="outline-3">
<h3 id="ID-6feb36da-e46c-4b87-b67b-090bdf84ce66">One planning file</h3>
<div class="outline-text-3" id="text-org1e10a89">
<p>
I have a single file for all my tasks. That keeps working
surprisingly long. Once a year or so it needs some cleanup to become
faster again.
</p>
</div>
</div>
<div id="outline-container-ID-cdbeb26e-ab8c-48e1-a8e5-67ba0054f5a7" class="outline-3">
<h3 id="ID-cdbeb26e-ab8c-48e1-a8e5-67ba0054f5a7">Kanban Table at the top</h3>
<div class="outline-text-3" id="text-orgd88196b">
<p>
I have a kanban table. It shows as most important information the
tasks I am doing right now. If I am doing more than three work-tasks
at the same time, it’s warning sign that I’m becoming inefficient.
With this I start every day in org-mode by clicking on the link of the
project from the kanban table to get to its notes (which I also track
in org-mode). See
<a href="https://www.draketo.de/light/english/free-software/el-kanban-org-table">https://www.draketo.de/light/english/free-software/el-kanban-org-table</a>
→ <a href="https://hg.sr.ht/~arnebab/kanban.el">https://hg.sr.ht/~arnebab/kanban.el</a>
</p>
</div>
</div>
<div id="outline-container-ID-003f1a8c-9ff7-48b2-b5ea-6fff3a64427b" class="outline-3">
<h3 id="ID-003f1a8c-9ff7-48b2-b5ea-6fff3a64427b">Capture tasks for Projects</h3>
<div class="outline-text-3" id="text-orga7e3f4b">
<p>
Projects have as many tasks as I need to track. At work they are
usually Stories (3-5 days). Nowadays I create new tasks by using
org-capture templates with one template per larger project and one for
bugs, but I used to just use two templates (which might be a
better fit for you):
</p>
<ul class="org-ul">
<li>(i) task to start immediately and</li>
<li>(l) task to start later</li>
</ul>
</div>
</div>
<div id="outline-container-ID-3597b5f5-312a-436c-b751-b28e6127ace3" class="outline-3">
<h3 id="ID-3597b5f5-312a-436c-b751-b28e6127ace3">Setup</h3>
<div class="outline-text-3" id="text-orgd5a4046">
<div class="org-src-container">
<pre class="src src-elisp">(<span style="color: #a020f0;">with-eval-after-load</span> 'org
  (<span style="color: #a020f0;">setq</span> org-agenda-custom-commands
        '((<span style="color: #8b2252;">"o"</span> <span style="color: #8b2252;">"Agenda and TODOs"</span>
           ((agenda)
            (tags-todo <span style="color: #8b2252;">"-notodo-TERMIN"</span> ((org-agenda-block-separator ?-)))
                (tags <span style="color: #8b2252;">"KANBAN"</span> ((org-agenda-block-separator ?-)
                            (org-agenda-compact-blocks nil)
                            (org-agenda-overriding-header <span style="color: #8b2252;">""</span>))))))))
  (<span style="color: #a020f0;">defun</span> <span style="color: #0000ff;">my/org-agenda-show-kanban</span> ()
  (<span style="color: #a020f0;">interactive</span>)
  (<span style="color: #a020f0;">save-excursion</span>
    (search-forward <span style="color: #8b2252;">":KANBAN:"</span>) <span style="color: #b22222;">;; </span><span style="color: #b22222;">uses the KANBAN tag</span>
    (org-agenda-goto)
    (org-narrow-to-subtree)
    (show-all)
    (fit-window-to-buffer)
    (widen)
    (recenter-top-bottom 0)))

(<span style="color: #a020f0;">defun</span> <span style="color: #0000ff;">agenda-and-todo</span> ()
  (<span style="color: #a020f0;">interactive</span>)
  (org-agenda nil <span style="color: #8b2252;">"o"</span>)
  (delete-other-windows)
  (my/org-agenda-show-kanban)
<span style="color: #b22222;">;;      </span><span style="color: #b22222;">desktop systemsettings shortcuts: map f12 to</span>
<span style="color: #b22222;">;;        </span><span style="color: #b22222;">emacsclient -e '(progn (show-frame)(agenda-and-todo))'</span>
(global-set-key (kbd <span style="color: #8b2252;">"&lt;f12&gt;"</span>) 'agenda-and-todo)
</pre>
</div>


<p>
<span class="timestamp-wrapper"><span class="timestamp">[2022-03-01 Di]</span></span>
</p>
</div>
</div>
]]></description>
</item>
<item>
<title>Effort in Clocktable and Columns</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#effort-clocktable-columns</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#effort-clocktable-columns</guid>
<pubDate>Tue, 01 Mar 2022 09:48:00 +0100</pubDate>

<description><![CDATA[<p>
To track how much time you need for tasks and train to get better at estimating, you can use org-set-effort.
I did that at work for a while. 
</p>

<p>
By having the effort in a clocktable I could see progress <b>when needed</b>.
</p>

<p>
Hitting R in the org-agenda shows the clockreport-mode and you can see
the Effort in the agenda by customizing
org-agenda-clockreport-parameter-plist (with <code>M-x customize-variable</code>):
</p>

<div class="org-src-container">
<pre class="src src-elisp">(org-agenda-clockreport-parameter-plist
 (<span style="color: #a020f0;">quote</span> (<span style="color: #483d8b;">:link</span> t <span style="color: #483d8b;">:maxlevel</span> 2 <span style="color: #483d8b;">:properties</span> (<span style="color: #8b2252;">"Effort"</span>))))
</pre>
</div>

<p>
For a while I had the clocktable active by default in the org-agenda.
</p>

<p>
You can also add that to the column-mode (org-columns) to get a quick
overview for a file (leave with org-columns-quit). Customize:
</p>

<div class="org-src-container">
<pre class="src src-elisp">(org-columns-default-format
   <span style="color: #8b2252;">"%25ITEM %TODO %3PRIORITY %TAGS %17Effort(Estimated Effort){:} %CLOCKSUM"</span>)
</pre>
</div>


<p>

</p>
]]></description>
</item>
<item>
<title>integrating accounting with ledger into org-mode</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#ledger-org</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#ledger-org</guid>
<pubDate>Sun, 05 Feb 2023 02:31:00 +0100</pubDate>

<description><![CDATA[<p>
If you use ledger-cli for accounting, you can do pretty clever
post-processing inside org-mode. Here’s an example that uses
<a href="https://www.ledger-cli.org/3.0/doc/ledger3.html#Output-customization">--register-format</a> to provide the register results directly as an
org-mode table:
</p>

<div class="org-src-container">
<pre class="src src-org"><span style="color: #b22222;">#+name: ledger-to-table</span>
<span style="color: #b22222;">#+begin_src elisp :var data=""</span>
<span style="color: #7f7f7f;">(concat </span><span style="color: #8b2252;">"#+name: ledger-results\n"</span>
<span style="color: #7f7f7f;">          data</span>
<span style="color: #7f7f7f;">          </span><span style="color: #8b2252;">"#+tblfm: \n"</span><span style="color: #7f7f7f;">))</span>
<span style="color: #b22222;">#+end_src</span>

<span style="color: #b22222;">#+header: :post ledger-to-table(*this*)</span>
<span style="color: #b22222;">#+header: :cmdline reg -D --register-format "| [%(format_date(date)) %(payee)] | %(display_account) | %(display_amount) | %(display_total) | \n" --wide --date-format %Y-%m-%d</span>
<span style="color: #b22222;">#+begin_src ledger :results raw</span>
<span style="color: #7f7f7f;">2022-06-15 * py2guile</span>
<span style="color: #7f7f7f;">    Assets:epubli             3.13&#8364;</span>
<span style="color: #7f7f7f;">    Income:epubli</span>
<span style="color: #b22222;">#+end_src</span>

</pre>
</div>

<p>
This results in output like this (evaluated live on every export of this website):
</p>

<div class="org-src-container">
<pre class="src src-elisp" id="ledger-to-table">(concat <span style="color: #8b2252;">"#+name: ledger-results\n"</span>
          data
          <span style="color: #8b2252;">"#+tblfm: \n"</span>))
</pre>
</div>

<div class="org-src-container">
<pre class="src src-ledger">2022-06-15 * py2guile
    Assets:epubli             3.13€
    Income:epubli
</pre>
</div>

<table id="ledger-results">


<colgroup>
<col  class="org-left" />

<col  class="org-left" />

<col  class="org-left" />

<col  class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">&#xa0;</td>
<td class="org-left">Assets:epubli</td>
<td class="org-left">3.13€</td>
<td class="org-left">3.13€</td>
</tr>

<tr>
<td class="org-left">&#xa0;</td>
<td class="org-left">Income:epubli</td>
<td class="org-left">-3.13€</td>
<td class="org-left">0.00€</td>
</tr>
</tbody>
</table>

<p>
To supercharge this, use noweb to re-use your filings for other
formats. Set :noweb-ref in the data-block and then use it for other
reports. This for example gives todays balance for the different
accounts:
</p>

<div class="org-src-container">
<pre class="src src-org"><span style="color: #b22222;">#+header: :post ledger-to-table(*this*)</span>
<span style="color: #b22222;">#+header: :cmdline bal --wide --date-format %Y-%m-%d --flat --balance-format "| %(partial_account) | %(display_total) | \n" </span>
<span style="color: #b22222;">#+begin_src ledger :exports both :noweb no-export :results raw </span>
<span style="color: #7f7f7f;">{{{ledger-data}}}</span>
<span style="color: #b22222;">#+end_src</span>
</pre>
</div>

<div class="org-src-container">
<pre class="src src-ledger">{{{ledger-data}}}
</pre>
</div>

<p>
<i>This uses direct evaluation and customized noweb-delimiters via:</i>
</p>

<div class="org-src-container">
<pre class="src src-org"><span style="color: #b22222;"># Local Variables&#58;</span>
<span style="color: #b22222;"># org-confirm-babel-evaluate: nil</span>
<span style="color: #b22222;"># org-babel-noweb-wrap-start: "{{{"</span>
<span style="color: #b22222;"># org-babel-noweb-wrap-end: "}}}"</span>
<span style="color: #b22222;"># End:</span>
</pre>
</div>


<p>
Also see 
</p>

<ul class="org-ul">
<li><a href="https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html">https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html</a></li>
<li><a href="https://www.ledger-cli.org/3.0/doc/ledger3.html#Org-mode-with-Babel">https://www.ledger-cli.org/3.0/doc/ledger3.html#Org-mode-with-Babel</a></li>
</ul>



<p>

</p>
]]></description>
</item>
<item>
<title>Easy signature-block for multiple signatures in org</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#signature</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#signature</guid>
<pubDate>Fri, 06 Oct 2023 16:36:00 +0200</pubDate>

<description><![CDATA[<p>
I’ve long struggled to create simple signature lines, using
<code>\hrulefill</code>, <code>\uline</code> and some of <a href="https://tex.stackexchange.com/a/368419/53957">the other options</a>.
</p>

<p>
But all of these didn’t really match what I wanted, so here’s a
simpler version for org-mode:
</p>

<div class="org-src-container">
<pre class="src src-org"><span style="color: #b22222;">#+latex: \vfill</span>

<span style="color: #b22222;">#+latex_header: \usepackage[ngerman]{babel} % for German-formatted dates</span>
<span style="color: #b22222;">#+latex: \newcommand{\pA}{THE NAME 1}</span>
<span style="color: #b22222;">#+latex: \newcommand{\dA}{\today}</span>
<span style="color: #b22222;">#+latex: \newcommand{\lA}{LOCATION}</span>

<span style="color: #b22222;">#+latex: \newcommand{\pB}{THE NAME 2}</span>
<span style="color: #b22222;">#+latex: \newcommand{\dB}{\today}</span>
<span style="color: #b22222;">#+latex: \newcommand{\lB}{LOCATION}</span>

<span style="color: #0000ff;">| </span><span style="color: #b22222;">@@</span><span style="color: #0000ff; font-weight: bold;">latex:</span><span style="color: #0000ff;">\pA</span><span style="color: #b22222;">@@</span><span style="color: #0000ff;">                       | </span><span style="color: #b22222;">@@</span><span style="color: #0000ff; font-weight: bold;">latex:</span><span style="color: #0000ff;">\hspace{1cm}</span><span style="color: #b22222;">@@</span><span style="color: #0000ff;"> | </span><span style="color: #b22222;">@@</span><span style="color: #0000ff; font-weight: bold;">latex:</span><span style="color: #0000ff;">\pB</span><span style="color: #b22222;">@@</span><span style="color: #0000ff;">                       |</span>
<span style="color: #0000ff;">|                                     |                        |                                     |</span>
<span style="color: #0000ff;">| </span><span style="color: #b22222;">@@</span><span style="color: #0000ff; font-weight: bold;">latex:</span><span style="color: #0000ff;">\underline{\phantom{\pA}}</span><span style="color: #b22222;">@@</span><span style="color: #0000ff;"> |                        | </span><span style="color: #b22222;">@@</span><span style="color: #0000ff; font-weight: bold;">latex:</span><span style="color: #0000ff;">\underline{\phantom{\pB}}</span><span style="color: #b22222;">@@</span><span style="color: #0000ff;"> |</span>
<span style="color: #0000ff;">| </span><span style="color: #b22222;">@@</span><span style="color: #0000ff; font-weight: bold;">latex:</span><span style="color: #0000ff;">\tiny \dA, \lA</span><span style="color: #b22222;">@@</span><span style="color: #0000ff;">            |                        | </span><span style="color: #b22222;">@@</span><span style="color: #0000ff; font-weight: bold;">latex:</span><span style="color: #0000ff;">\tiny \dB, \lB</span><span style="color: #b22222;">@@</span><span style="color: #0000ff;">            |</span>
</pre>
</div>




<p>

</p>
]]></description>
</item>
<item>
<title>Include an imagemap with a plantuml diagram</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#plantuml-imagemap</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#plantuml-imagemap</guid>
<pubDate>Wed, 10 Jan 2024 10:22:00 +0100</pubDate>

<description><![CDATA[<p>
Embed a plantuml diagram with clickable links via simple imagemap.
</p>
<div id="outline-container-ID-64dd9366-afa7-49ab-92ac-f51a3e6e5dce" class="outline-3">
<h3 id="ID-64dd9366-afa7-49ab-92ac-f51a3e6e5dce">Example</h3>
<div class="outline-text-3" id="text-orgeb958e2">

<figure id="org61bf84d">
<img src="plantuml-imagemap-diagram.png" alt="plantuml-imagemap-diagram.png" style="width:unset;max-width:unset" usemap="#plantuml_map" />

</figure>

<div style="visibility: hidden">
<p>
<a href="plantuml-imagemap-diagram.map">plantuml-imagemap-diagram.map</a>
</p>
</div>

<map id="plantuml_map" name="plantuml_map">
<area shape="rect" id="id1" href="#plantuml-imagemap-code" title="#plantuml-imagemap-code" alt="" coords="37,35,83,77"/>
</map>
</div>
</div>
<div id="outline-container-plantuml-imagemap-code" class="outline-3">
<h3 id="plantuml-imagemap-code">Code</h3>
<div class="outline-text-3" id="text-plantuml-imagemap-code">
<div class="org-src-container">
<pre class="src src-org"><span style="color: #b22222;">#+begin_src plantuml :noweb-ref plantuml-imagemap-diagram :file plantuml-imagemap-diagram.png</span>
<span style="color: #7f7f7f;">title Plantuml diagram with Imagemap</span>
<span style="color: #7f7f7f;">hide empty members</span>
<span style="color: #7f7f7f;">hide circle</span>
<span style="color: #7f7f7f;">' scale dpi to be small enough so the image does not get scaled, otherwise the imagemap is broken</span>
<span style="color: #7f7f7f;">skinparam dpi 72</span>
<span style="color: #7f7f7f;">class link <a href="#plantuml-imagemap-code">[[#plantuml-imagemap-code]]</a> #skyblue</span>
<span style="color: #7f7f7f;">link : to code</span>
<span style="color: #7f7f7f;">link -&gt; example</span>
<span style="color: #b22222;">#+end_src</span>

<span style="color: #b22222;">#+attr_html: :style width:unset;max-width:unset :usemap #plantuml_map</span>
<span style="color: #b22222;">#+RESULTS:</span>
<span style="color: #3a5fcd; text-decoration: underline;"><a href="file:plantuml-imagemap-diagram.png">file:plantuml-imagemap-diagram.png</a></span>

<span style="color: #b22222;">#+html: &lt;div style="visibility: hidden"&gt;</span>
<span style="color: #b22222;">#+begin_src plantuml :noweb yes :file plantuml-imagemap-diagram.map :cmdline "-pipemap" :exports results</span>
<span style="color: #7f7f7f;">&lt;&lt;plantuml-imagemap-diagram&gt;&gt;</span>
<span style="color: #b22222;">#+end_src</span>

<span style="color: #b22222;">#+RESULTS:</span>
<span style="color: #3a5fcd; text-decoration: underline;"><a href="file:plantuml-imagemap-diagram.map">file:plantuml-imagemap-diagram.map</a></span>
<span style="color: #b22222;">#+html: &lt;/div&gt;</span>

<span style="color: #b22222;">#+begin_src bash :results output html :exports results</span>
<span style="color: #7f7f7f;">cat plantuml-imagemap-diagram.map</span>
<span style="color: #b22222;">#+end_src</span>

</pre>
</div>

<p>
<i>This is a quite contrived hack, but it works. Note that the width
<b>must</b> be <b>unset</b> to avoid breaking the imagemap coordinates.</i>
</p>

<p>
<i>Stackoverflow provides several answers to avoid this limitation in
case you want responsive images: <a href="https://stackoverflow.com/questions/7844399/responsive-image-map">Responsive Image Map</a>.</i>
</p>

<p>
I’m using this in <a href="programming-basics-wisp.html">Naming and Logic: programming basics with Wisp</a> and
<a href="programming-scheme.html">Naming and Logic: programming basics with Guile Scheme</a>.
</p>

<p>
<span class="timestamp-wrapper"><span class="timestamp">[2024-01-10 Mi]</span></span>
</p>
</div>
</div>
]]></description>
</item>
<item>
<title>Single-click time tracking with links</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#clickable-time-tracking</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#clickable-time-tracking</guid>
<pubDate>Tue, 20 May 2025 10:33:00 +0200</pubDate>

<description><![CDATA[<p>
I recently changed teams and in the new team we have to book more
precisely. Stuff like Meetings, that I could ignore before. For
meetings I don’t start already typing, so I need to click common time
tracking issues with the mouse.
</p>

<p>
But first: “screenshots”! My time tracking interface now looks like
this:
</p>

<div class="org-src-container">
<pre class="src src-org"><span style="color: #0000ff;">| Orga | &#129496; </span><span style="color: #3a5fcd; text-decoration: underline;"><a href="elisp:(save-excursion (org-id-goto &quot;buchen-orga&quot;)(org-clock-in))">Mein Orga</a></span><span style="color: #0000ff;"> | &#128197; </span><span style="color: #3a5fcd; text-decoration: underline;"><a href="elisp:(save-excursion (goto-char (org-find-exact-headline-in-buffer &quot;Single-click time tracking with links in org-mode&quot;))(org-clock-in))">Personal</a></span><span style="color: #0000ff;">      | &#128197; </span><span style="color: #3a5fcd; text-decoration: underline;"><a href="elisp:(save-excursion (org-id-goto &quot;kanban&quot;)(org-clock-in))">Kanban (other)</a></span><span style="color: #0000ff;">  |</span>
<span style="color: #0000ff;">| Proj | &#129520; </span><span style="color: #3a5fcd; text-decoration: underline;"><a href="elisp:(save-excursion (org-id-goto &quot;buchen-apps-meetings&quot;)(org-clock-in))">Apps</a></span><span style="color: #0000ff;">      | &#128197; </span><span style="color: #3a5fcd; text-decoration: underline;"><a href="elisp:(save-excursion (org-id-goto &quot;buchen-scrum-a&quot;)(org-clock-in))">Scrum A</a></span><span style="color: #0000ff;">       | &#128197; </span><span style="color: #3a5fcd; text-decoration: underline;"><a href="elisp:(save-excursion (org-id-goto &quot;buchen-scrum-b&quot;)(org-clock-in))">Scrum B</a></span><span style="color: #0000ff;">         |</span>
<span style="color: #0000ff;">|      | &#128218; </span><span style="color: #3a5fcd; text-decoration: underline;"><a href="elisp:(save-excursion (org-id-goto &quot;buchen-reviews&quot;)(org-clock-in))">Reviews</a></span><span style="color: #0000ff;">   | &#9202; </span><span style="color: #3a5fcd; text-decoration: underline;"><a href="elisp:(org-clock-in-last)">clock in LAST</a></span><span style="color: #0000ff;"> | &#9202; </span><span style="color: #3a5fcd; text-decoration: underline;"><a href="elisp:(org-clock-out)">clock OUT</a></span><span style="color: #0000ff;">       |</span>
</pre>
</div>

<p>
I can click each of the links to activate booking on the respective
task, or switch to it. <code>clock OUT</code> obviously clocks out.
</p>

<p>
To use this yourself, you have to allow-list the exact links you use.
Customize the variable <code>org-link-elisp-skip-confirm-regexp</code>:
</p>

<pre class="example">
M-x org-link-elisp-skip-confirm-regexp
</pre>


<p>
Put into the text value an adapted version of the following:
</p>

<pre style="white-space:pre-wrap" class="example" id="orgbc6b66b">
^(org-clock-in-last)$\|^(org-clock-out)$\|^(save-excursion (goto-char (org-find-exact-headline-in-buffer "Single-click time tracking with links in org-mode"))(org-clock-in))$\|^(save-excursion (org-id-goto "buchen-orga")(org-clock-in))$
</pre>

<p>
These are strictly limited to the exact functions. Make sure to
include <code>^</code> and <code>$</code> (to prevent people from tacking something to the
end and making that single-click executable) and combine them with
<code>\|</code>. Shorter:
</p>

<pre class="example" id="org5cf380a">
^(org-clock-in-last)$\|^(org-clock-out)$
</pre>

<p>
Here’s a list of the important functions (because I had to track down the last three):
</p>

<ul class="org-ul">
<li><code>(org-clock-in-last)</code></li>
<li><code>(org-clock-out)</code></li>
<li><code>org-id-goto</code>
<ul class="org-ul">
<li><code>(save-excursion (org-id-goto "buchen-orga")(org-clock-in))</code></li>
</ul></li>
<li><code>(org-cycle-hide-drawers 'all)</code></li>
<li><code>org-find-exact-headline-in-buffer</code></li>
</ul>

<p>
The last one uses:
</p>
<div class="org-src-container">
<pre class="src src-elisp">(<span style="color: #a020f0;">save-excursion</span>
  (goto-char 
   (org-find-exact-headline-in-buffer <span style="color: #8b2252;">"TEXT"</span>))
  (org-clock-in))
</pre>
</div>

<p>
<code>(org-id-goto ...)</code> jumps to the entry with the matching ID property.
You can set that with <code>C-c C-x p ID</code>. This way I can have time
recording links in the task name, and adapt them when they change for
the next quarter, but the clickable links still work. These links are
then clickable in the agenda (just click <code>l</code> in the agenda — activate
<code>org-agenda-log-mode</code> — to show the tasks you tracked time on).
</p>

<p>
<code>(save-excursion ...)</code> prevents visible movement, so the links just
feel like clicking a button even though Emacs underneath navigates to
the headline and clocks in there.
</p>

<p>
The source of the table is:
</p>

<pre style="white-space:pre-wrap" class="example" id="org857a716">
| Orga | 🧘 [[elisp:(save-excursion (org-id-goto "buchen-orga")(org-clock-in))][Mein Orga]] | 📅 [[elisp:(save-excursion (goto-char (org-find-exact-headline-in-buffer "Single-click time tracking with links in org-mode"))(org-clock-in))][Personal]]      | 📅 [[elisp:(save-excursion (org-id-goto "kanban")(org-clock-in))][Kanban (other)]]  |
| Proj | 🧰 [[elisp:(save-excursion (org-id-goto "buchen-apps-meetings")(org-clock-in))][Apps]]      | 📅 [[elisp:(save-excursion (org-id-goto "buchen-scrum-a")(org-clock-in))][Scrum A]]       | 📅 [[elisp:(save-excursion (org-id-goto "buchen-scrum-b")(org-clock-in))][Scrum B]]         |
|      | 📚 [[elisp:(save-excursion (org-id-goto "buchen-reviews")(org-clock-in))][Reviews]]   | ⏲ [[elisp:(org-clock-in-last)][clock in LAST]] | ⏲ [[elisp:(org-clock-out)][clock OUT]]       |
</pre>


<p>
This now sits below my <a href="#agenda-and-todo">kanban table</a> in my planning file.
</p>

<p>

</p>
]]></description>
</item>
<item>
<title>Org-publish setup of draketo.de</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#org-publish-setup</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#org-publish-setup</guid>
<pubDate>Sun, 13 Jul 2025 16:44:00 +0200</pubDate>

<description><![CDATA[<p>
The configuration of <a href="https://www.draketo.de">draketo.de</a>, including the data of the site, is
in:
</p>

<ul class="org-ul">
<li><a href="https://hg.sr.ht/~arnebab/draketo/browse/setup.el.in">hg.sr.ht/~arnebab/draketo/browse/setup.el.in</a> and in</li>
<li><a href="https://hg.sr.ht/~arnebab/draketo/browse/.emacs.d/init.el">hg.sr.ht/~arnebab/draketo/browse/.emacs.d/init.el</a></li>
</ul>

<p>
The links on category pages like <a href="https://www.draketo.de/politik">draketo.de/politik</a> are just the
result of shell code blocks run during publishing:
<a href="https://hg.sr.ht/~arnebab/draketo/browse/politik.org?rev=520f94f8cb4e#L85">hg.sr.ht/~arnebab/draketo/browse/politik.org</a>
</p>

<p>
Where I want to show some tags, I use a kanban table -- for example on
<a href="https://www.draketo.de/software/bsi-grundschutz#todo">draketo.de/software/bsi-grundschutz#todo</a>. 
</p>

<p>
See <a href="https://hg.sr.ht/~arnebab/draketo/browse/software/bsi-grundschutz.org?rev=520f94f8cb4e#L463">hg.sr.ht/~arnebab/draketo/browse/software/bsi-grundschutz.org</a> for
the source (via <a href="https://hg.sr.ht/~arnebab/kanban.el">hg.sr.ht/~arnebab/kanban.el</a> - also on melpa
<a href="https://melpa.org/#/kanban">melpa.org/#/kanban</a> ).
</p>

<p>
For the layout, see
</p>

<ul class="org-ul">
<li><a href="https://hg.sr.ht/~arnebab/draketo/browse/org-templates/level-0-politik.org">hg.sr.ht/~arnebab/draketo/browse/org-templates/level-0-politik.org</a></li>
<li><a href="https://hg.sr.ht/~arnebab/draketo/browse/org-templates/level-0.org">hg.sr.ht/~arnebab/draketo/browse/org-templates/level-0.org</a></li>
<li><a href="https://hg.sr.ht/~arnebab/draketo/browse/org-templates/level-1-politik.org">hg.sr.ht/~arnebab/draketo/browse/org-templates/level-1-politik.org</a></li>
<li><a href="https://hg.sr.ht/~arnebab/draketo/browse/org-templates/level-1.org">hg.sr.ht/~arnebab/draketo/browse/org-templates/level-1.org</a></li>
</ul>

<p>

</p>
]]></description>
</item>
<item>
<title>Plot a histogram from a table with calculated percentages</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#plot-historgram-table-calculation</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#plot-historgram-table-calculation</guid>
<pubDate>Tue, 22 Jul 2025 18:44:00 +0200</pubDate>

<description><![CDATA[<p>
This is a complete example: The following table calculates the last
row by removing the AfD-fraction from Gesamt via <code>TBLFM</code>, and PLOT
then creates a histogram.
</p>

<p>
To do the calculation, move point into <code>TBLFM</code> and press <code>C-c C-c</code>,
then move point into the first <code>PLOT</code> line and press <code>C-c C-c</code>.
</p>

<div class="org-src-container">
<pre class="src src-org"><span style="color: #b22222;">#+PLOT: <a href="file:&quot;zustimmung-afd-verbot-ohne-afd.png">file:"zustimmung-afd-verbot-ohne-afd.png</a>" title:"Meinung zum AfD-Verbot"</span>
<span style="color: #b22222;">#+PLOT: ind:1 deps:(2 3 4) type:2d with:histograms set:"yrange [0:]" </span>
<span style="color: #b22222;">#+PLOT: set:"style fill solid 0.3" set:"boxwidth 0.8 relative" set:"ylabel 'Anteil / %'"</span>
<span style="color: #0000ff;">| Gruppe   | Ablehnung&#160; | Zustimmung&#160; | Keine&#160; | Anteil |</span>
<span style="color: #0000ff;">|----------+------------+-------------+--------+--------|</span>
<span style="color: #0000ff;">| Gesamt   |        52% |         27% |    21% |   100% |</span>
<span style="color: #0000ff;">| AfD      |        94% |          5% |     1% |    24% |</span>
<span style="color: #0000ff;">| Ohne&#160;AfD |        39% |         34% |    27% |    76% |</span>
<span style="color: #b22222;">#+TBLFM: @4$5=(@2-@3)*100;%.0f%%::@4$2..$4=100*(@2*@2$5 - @3*@3$5)/(@4$5);%.0f%%</span>

<span style="color: #3a5fcd; text-decoration: underline;"><a href="file:zustimmung-afd-verbot-ohne-afd.png">file:zustimmung-afd-verbot-ohne-afd.png</a></span>
</pre>
</div>

<table>


<colgroup>
<col  class="org-left" />

<col  class="org-right" />

<col  class="org-right" />

<col  class="org-right" />

<col  class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Gruppe</th>
<th scope="col" class="org-right">39%</th>
<th scope="col" class="org-right">34%</th>
<th scope="col" class="org-right">27%</th>
<th scope="col" class="org-right">Anteil</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Gesamt</td>
<td class="org-right">39%</td>
<td class="org-right">34%</td>
<td class="org-right">27%</td>
<td class="org-right">100%</td>
</tr>

<tr>
<td class="org-left">AfD</td>
<td class="org-right">22%</td>
<td class="org-right">43%</td>
<td class="org-right">35%</td>
<td class="org-right">24%</td>
</tr>

<tr>
<td class="org-left">Ohne AfD</td>
<td class="org-right">44%</td>
<td class="org-right">31%</td>
<td class="org-right">24%</td>
<td class="org-right">76%</td>
</tr>
</tbody>
</table>


<figure id="orgb11efc1">
<img src="zustimmung-afd-verbot-ohne-afd.png" alt="zustimmung-afd-verbot-ohne-afd.png" />

</figure>


<p>

</p>
]]></description>
</item>
<item>
<title>Deploy org-beamer slides to gitlab pages via CI</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#org-beamer-deploy-gitlab-pages</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#org-beamer-deploy-gitlab-pages</guid>
<pubDate>Sat, 16 Aug 2025 00:31:00 +0200</pubDate>

<description><![CDATA[<p>
A minimal setup to turn your org-beamer presentation into a website with the PDF available.
</p>

<p>
I’m assuming that your presentation is in a file named
<code>PRESENTATION.org</code> (means: replace PRESENTATION by the actual name).
</p>

<p>
In your repo, create this <code>.gitlab-ci.yml</code>:
</p>

<div class="org-src-container">
<pre class="src src-yaml">pages:
    stage: deploy
    script:
        - mkdir .public
        - set -x
        - apt-get update &amp;&amp; DEBIAN_FRONTEND=noninteractive apt-get -yq install emacs-gtk texlive texlive-latex-extra || true
        - HOME="$(realpath .)" emacs --batch -Q -nw --load "$(realpath .emacs)" --find-file "$(realpath PRESENTATION.org)" --execute '(ignore-errors (org-beamer-export-to-pdf))' --execute '(with-current-buffer "*Org PDF LaTeX Output*" (print (buffer-string)))'
        - HOME="$(realpath .)" emacs --batch -Q -nw --load "$(realpath .emacs)" --find-file "$(realpath PRESENTATION.org)" -f org-html-export-to-html
        - cp -r * .public
        - cp PRESENTATION.html .public/index.html
        - cp PRESENTATION.pdf .public/
        - mv .public public
    artifacts:
     paths:
      - public
    rules:
      - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    environment: production

</pre>
</div>

<p>
And also add in your repo a minimal <code>.emacs</code>:
</p>

<div class="org-src-container">
<pre class="src src-elisp">(<span style="color: #a020f0;">require</span> '<span style="color: #008b8b;">org</span>)
(<span style="color: #a020f0;">require</span> '<span style="color: #008b8b;">ox-latex</span>)
(<span style="color: #a020f0;">require</span> '<span style="color: #008b8b;">ox-beamer</span>)
(<span style="color: #a020f0;">require</span> '<span style="color: #008b8b;">ox-html</span>)
</pre>
</div>

<p>
To make the lides discoverable, add a line at the top:
</p>

<div class="org-src-container">
<pre class="src src-org"><span style="color: #b22222;">#+html: Get the slides: &lt;a href="PRESENTATION.pdf"&gt;PRESENTATION.pdf&lt;/a&gt;</span>
</pre>
</div>

<p>
Now whenever you push your repo to the default branch on gitlab, your presentation will update.
</p>

<p>
The argument
</p>

<pre class="example">
--execute '(with-current-buffer "*Org PDF LaTeX Output*" (print (buffer-string)))'
</pre>


<p>
ensures that when building fails you get decent error messages.
</p>

<p>

</p>
]]></description>
</item>
<item>
<title>Fill the rest of the page with grid squares</title>
<link>https://www.draketo.de/software/org-mode-tipps.html#fill-with-squares</link>
<author>arne@fluss (ArneBab)</author>
<guid isPermaLink="false">https://www.draketo.de/software/org-mode-tipps.html#fill-with-squares</guid>
<pubDate>Mon, 08 Dec 2025 00:05:00 +0100</pubDate>

<description><![CDATA[<p>
(see <a href="https://tex.stackexchange.com/a/248221">How to do math in raw tex</a> and the <a href="https://ctan.org/tex-archive/macros/latex/contrib/forloop">forloop</a> package and the <a href="https://ctan.org/tex-archive/macros/latex/contrib/fbox">fbox</a> package)
</p>

<p>
Usage: <code>\fillgrid{}</code>.
</p>

<div class="org-src-container">
<pre class="src src-latex"><span style="color: #b22222;">% </span><span style="color: #b22222;">in header (before </span><span style="color: #b22222;">\begin</span><span style="color: #b22222;">{document}) or using #+latex_header: with org-mode:</span>
<span style="color: #b22222;">% </span><span style="color: #b22222;">\usepackage</span><span style="color: #b22222;">{fbox}</span><span style="color: #b22222;">\usepackage</span><span style="color: #b22222;">{forloop}</span>
<span style="color: #a020f0;">\newcommand</span><span style="color: #0000ff;">\fillgrid</span>{
<span style="color: #b22222;">% </span><span style="color: #b22222;">iteration count</span>
<span style="color: #0000ff;">\newlength\sidelen</span>
<span style="color: #a020f0;">\setlength</span><span style="color: #a0522d;">\sidelen</span><span style="color: #0000ff;">{</span><span style="color: #a0522d;">5mm</span><span style="color: #0000ff;">}</span>
<span style="color: #b22222;">% </span><span style="color: #b22222;">reduce by the border width to get correct sizes</span>
<span style="color: #a020f0;">\addtolength</span><span style="color: #a0522d;">\sidelen</span><span style="color: #0000ff;">{</span><span style="color: #a0522d;">\fboxrule</span><span style="color: #0000ff;">}</span>
<span style="color: #a020f0;">\addtolength</span><span style="color: #a0522d;">\sidelen</span><span style="color: #0000ff;">{</span><span style="color: #a0522d;">\fboxsep</span><span style="color: #0000ff;">}</span>
<span style="color: #0000ff;">\newcount\a\a\number\textwidth\relax</span>
<span style="color: #0000ff;">\newcount\b\b\number\sidelen\relax</span>
<span style="color: #0000ff;">\divide\a</span><span style="color: #0000ff;"> by</span><span style="color: #0000ff;">\b</span>
<span style="color: #0000ff;">\divide\a</span><span style="color: #0000ff;"> by2</span>
<span style="color: #b22222;">% </span><span style="color: #b22222;">leave space for the last box and inaccuracies</span>
<span style="color: #b22222;">% </span><span style="color: #b22222;">number of horizontal doubleboxes </span>
<span style="color: #0000ff;">\def\hboxcounthalf</span><span style="color: #0000ff;">{</span><span style="color: #0000ff;">\the\a</span><span style="color: #0000ff;">}</span>
<span style="color: #0000ff;">\newcount\c\c\number\pagegoal\relax</span>
<span style="color: #0000ff;">\advance\c</span><span style="color: #0000ff;"> by-</span><span style="color: #0000ff;">\pagetotal</span>
<span style="color: #0000ff;">\divide\c</span><span style="color: #0000ff;"> by</span><span style="color: #0000ff;">\b</span>
<span style="color: #b22222;">% </span><span style="color: #b22222;">leave space for the footer and inaccuracies</span>
<span style="color: #0000ff;">\advance\c</span><span style="color: #0000ff;"> by-5</span>
<span style="color: #b22222;">% </span><span style="color: #b22222;">number of remaining vertical doubleboxes</span>
<span style="color: #0000ff;">\def\vboxcount</span><span style="color: #0000ff;">{</span><span style="color: #0000ff;">\the\c</span><span style="color: #0000ff;">}</span>
<span style="color: #0000ff;">\newcommand\gridboxodd</span><span style="color: #0000ff;">{</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\fbox</span><span style="color: #0000ff;">{</span><span style="color: #0000ff;">\vbox</span><span style="color: #0000ff;"> to </span><span style="color: #0000ff;">\sidelen</span><span style="color: #0000ff;"> {</span><span style="color: #0000ff;">\vfil</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\hbox</span><span style="color: #0000ff;"> to </span><span style="color: #0000ff;">\sidelen</span><span style="color: #0000ff;">{}</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\vfil</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">}}}</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\newcommand\gridboxeven</span><span style="color: #0000ff;">{</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\fbox</span><span style="color: #0000ff;">[tb]{</span><span style="color: #0000ff;">\vbox</span><span style="color: #0000ff;"> to </span><span style="color: #0000ff;">\sidelen</span><span style="color: #0000ff;"> {</span><span style="color: #0000ff;">\vfil</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\hbox</span><span style="color: #0000ff;"> to </span><span style="color: #0000ff;">\sidelen</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">{}</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\vfil</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">}}}</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\newcounter</span><span style="color: #0000ff;">{vloop}</span><span style="color: #0000ff;">\newcounter</span><span style="color: #0000ff;">{loop}</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\forloop</span><span style="color: #0000ff;">{vloop}{1}{</span><span style="color: #0000ff;">\value</span><span style="color: #0000ff;">{vloop} &lt; </span><span style="color: #0000ff;">\vboxcount</span><span style="color: #0000ff;">}{</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\forloop</span><span style="color: #0000ff;">{loop}{1}{</span><span style="color: #0000ff;">\value</span><span style="color: #0000ff;">{loop} &lt; </span><span style="color: #0000ff;">\hboxcounthalf</span><span style="color: #0000ff;">}{</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">  </span><span style="color: #0000ff;">\gridboxodd\gridboxeven</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">}</span><span style="color: #0000ff;">\gridboxodd</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">\vspace</span><span style="color: #0000ff;">*{-0.5mm}</span><span style="color: #b22222;">%</span>
<span style="color: #ff0000; font-weight: bold;">\\</span><span style="color: #b22222;">%</span>
<span style="color: #0000ff;">}</span><span style="color: #0000ff;">\par</span>
}
</pre>
</div>


<p>

</p>
]]></description>
</item>
</channel>
</rss>
