[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic block tables: adding prefix of "id:" to %ID

From: Ihor Radchenko
Subject: Re: Dynamic block tables: adding prefix of "id:" to %ID
Date: Sun, 25 Jul 2021 16:51:58 +0800

Karl Voit <devnull@Karl-Voit.at> writes:

> I do have a dynamic block table like this:
> ...
> | NEXT    | [0/0] proj bar     | bar | :bar:project: |
> Is there a way to get the ID column with working ID links such as:
> ...
> | NEXT    | [0/0] proj bar     | id:bar | :bar:project: |

You may customise org-columns-modify-value-for-display-function:

(defun yant/org-columns-custom-formatter (column-title value)
  "Format column values for columns with ID-LINK title as proper Org mode id: 
  (pcase column-title
     (format "[[id:%s][%s]]"
             (org-with-point-at (org-id-find value 'marker)
               (org-get-heading t t t t))))
    (_ nil)))
(setq org-columns-modify-value-for-display-function 

Then, you can use the following dblock. Note that I renamed the column
name to "ID-LINK"

#+BEGIN: columnview :id global :match "+project-focus/!+STARTED|+NEXT|+WAITING" 
:format "%TODO(State) %ITEM(What) %ID(ID-LINK) %TAGS(Tags)"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]