* shrink table in columnmode view (poor man's issue system)
@ 2021-09-25 12:25 Uwe Brauer
2021-09-26 10:09 ` Marco Wahl
0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2021-09-25 12:25 UTC (permalink / raw)
To: emacs-orgmode
Hi
I use the following org file to organise my issues.
It works quite well, however I would like to have a shrink option
automatically in my columnview.
Any idea how to achieve that?
Thanks and regards
Uwe Brauer
File starts here:
#+begin_src
#+STARTUP: shrink
* Issues
:PROPERTIES:
:COLUMNS: %50ITEM(Problem) %10Is(Issue Nr) %7TODO(Status) %26TAGS(Which) %17Date(Date) %7STATUS(Status){X/}
:ID: Issues
:END:
** TODO Why is \eqref{eq:section4-sh15}: not used in the proof of proposition 5 (section 4)
:PROPERTIES:
:ID: Issues
:Date: <2021-09-25 sáb>
:STATUS: [ ]
:Is: 9
:END:
The table is generated like this
#+BEGIN: columnview :hlines 2 :skip-empty-rows t :indent nil :format "%5ITEM(Problem) %5Is(Issue) %12TODO %12Date %7Status(Status){X/}"
| Problem | Issue | TODO | Date | Status |
|--------------------------------------------------------------------------------------+-------+------+--------------+--------|
| Issues | | | | [0/1] |
|--------------------------------------------------------------------------------------+-------+------+--------------+--------|
| Why is \eqref{eq:section4-sh15}: not used in the proof of proposition 5 (section 4) | 9 | TODO | <2021-09-25 sáb> | [ ] |
#+END:
But I would like to have this
#+BEGIN: columnview :hlines 2 :skip-empty-rows t :indent nil :format "%5ITEM(Problem) %5Is(Issue) %12TODO %12Date %7Status(Status){X/}"
|<45>
| Problem | Issue | TODO | Date | Status |
|--------------------------------------------------------------------------------------+-------+------+--------------+--------|
| Issues | | | | [0/1] |
|--------------------------------------------------------------------------------------+-------+------+--------------+--------|
| Why is \eqref{eq:section4-sh15}: not used in the proof of proposition 5 (section 4) | 9 | TODO | <2021-09-25 sáb> | [ ] |
#+END:
#+end_src
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: shrink table in columnmode view (poor man's issue system)
2021-09-25 12:25 shrink table in columnmode view (poor man's issue system) Uwe Brauer
@ 2021-09-26 10:09 ` Marco Wahl
2021-09-26 15:13 ` Uwe Brauer
0 siblings, 1 reply; 6+ messages in thread
From: Marco Wahl @ 2021-09-26 10:09 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Uwe Brauer
Hi!
Uwe Brauer <oub@mat.ucm.es> writes:
> I use the following org file to organise my issues.
> It works quite well, however I would like to have a shrink option
> automatically in my columnview.
Your suggestion looks quite useful to me.
> Any idea how to achieve that?
One possibility is to write your own dynamic block writer function.
Find documentation at (info "(org) Dynamic Blocks") .
> File starts here:
>
> #+begin_src
> #+STARTUP: shrink
>
> * Issues
> :PROPERTIES:
> :COLUMNS: %50ITEM(Problem) %10Is(Issue Nr) %7TODO(Status) %26TAGS(Which) %17Date(Date) %7STATUS(Status){X/}
> :ID: Issues
> :END:
>
> ** TODO Why is \eqref{eq:section4-sh15}: not used in the proof of proposition 5 (section 4)
> :PROPERTIES:
> :ID: Issues
> :Date: <2021-09-25 sáb>
> :STATUS: [ ]
> :Is: 9
> :END:
>
> The table is generated like this
> #+BEGIN: columnview :hlines 2 :skip-empty-rows t :indent nil :format "%5ITEM(Problem) %5Is(Issue) %12TODO %12Date %7Status(Status){X/}"
> | Problem | Issue | TODO | Date | Status |
> |--------------------------------------------------------------------------------------+-------+------+--------------+--------|
> | Issues | | | | [0/1] |
> |--------------------------------------------------------------------------------------+-------+------+--------------+--------|
> | Why is \eqref{eq:section4-sh15}: not used in the proof of proposition 5 (section 4) | 9 | TODO | <2021-09-25 sáb> | [ ] |
> #+END:
>
>
> But I would like to have this
>
> #+BEGIN: columnview :hlines 2 :skip-empty-rows t :indent nil :format "%5ITEM(Problem) %5Is(Issue) %12TODO %12Date %7Status(Status){X/}"
> |<45>
> | Problem | Issue | TODO | Date | Status |
> |--------------------------------------------------------------------------------------+-------+------+--------------+--------|
> | Issues | | | | [0/1] |
> |--------------------------------------------------------------------------------------+-------+------+--------------+--------|
> | Why is \eqref{eq:section4-sh15}: not used in the proof of proposition 5 (section 4) | 9 | TODO | <2021-09-25 sáb> | [ ] |
> #+END:
>
> #+end_src
Concretely check out this proposition (tested with your example). Have
(defun org-dblock-write:columnview2 (params)
"Write the column view table.
Like org-dblock-write:columnview but write a line with shrink widths taken from the
column view format.
PARAMS is the same as in `org-dblock-write:columnview'."
(insert (format "|%s|\n"
(mapconcat
(lambda (x) (concat "<" (number-to-string x) ">"))
(mapcar (lambda (x) (nth 2 x)) (org-columns-compile-format
(plist-get params :format)))
"|")))
(org-dblock-write:columnview params))
defined. E.g. type C-x C-e after the last paren.
Then use "columnview2" instead of "columnview" and get
#+BEGIN: columnview2 :hlines 2 :skip-empty-rows t :indent nil :format "%5ITEM(Problem) %5Is(Issue) %12TODO %12Date %7Status(Status){X/}"
| <5> | <5> | <12> | <12> | <7> |
| Problem | Issue | TODO | Date | Status |
|--------------------------------------------------------------------------------------+-------+------+------------------+--------|
| Issues | | | | [0/1] |
|--------------------------------------------------------------------------------------+-------+------+------------------+--------|
| Why is \eqref{eq:section4-sh15}: not used in the proof of proposition 5 (section 4) | 9 | TODO | <2021-09-25 sáb> | [ ] |
#+END:
HTH
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-09-27 18:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-25 12:25 shrink table in columnmode view (poor man's issue system) Uwe Brauer
2021-09-26 10:09 ` Marco Wahl
2021-09-26 15:13 ` Uwe Brauer
[not found] ` <87sfxqe3hu.fsf@gmail.com>
2021-09-27 16:03 ` Uwe Brauer
2021-09-27 16:39 ` Bastien
2021-09-27 18:53 ` Marco Wahl
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.