From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Subject: Re: [PATCH] Allow org-collector to display heading indentation Date: Sat, 31 Mar 2012 08:57:05 +0200 [thread overview] Message-ID: <80k421mf5q.fsf@somewhere.org> (raw) In-Reply-To: <CANMKmec1_seeEuhtARJG2zNcZAhqOxAhwi+CBkwno6cVowzRjQ@mail.gmail.com> Hi Nicolas, Nicolas Girard wrote: > From eaf9e5f06279069ed1072425fd020d8f0442d04f Mon Sep 17 00:00:00 2001 > From: Nicolas Girard <girard.nicolas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Date: Fri, 30 Mar 2012 22:53:13 +0200 > Subject: [PATCH] Allow org-collector to display heading indentation > > --- > contrib/lisp/org-collector.el | 12 +++++++++--- > 1 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/contrib/lisp/org-collector.el b/contrib/lisp/org-collector.el > index da612e9..2476d62 100644 > --- a/contrib/lisp/org-collector.el > +++ b/contrib/lisp/org-collector.el > @@ -121,6 +121,7 @@ preceeding the dblock, then update the contents of > the dblock." > (scope (plist-get params :scope)) > (noquote (plist-get params :noquote)) > (colnames (plist-get params :colnames)) > + (indent (plist-get params :indent)) > (content-lines (org-split-string (plist-get params :content) "\n")) > id table line pos) > (save-excursion > @@ -135,7 +136,7 @@ preceeding the dblock, then update the contents of > the dblock." > (setq stringformat (if noquote "%s" "%S")) > (setq table (org-propview-to-table > (org-propview-collect cols stringformat conds match scope inherit > - (if colnames colnames cols)) stringformat)) > + (if colnames colnames cols) indent) stringformat)) > (widen)) > (setq pos (point)) > (when content-lines > @@ -171,13 +172,18 @@ variables and values specified in props" > (when p (cons n p)))) > inherit)))) > > -(defun org-propview-collect (cols stringformat &optional conds match > scope inherit colnames) > +(defun org-propview-collect (cols stringformat &optional conds match > scope inherit colnames indent) > (interactive) > ;; collect the properties from every header > (let* ((header-props > (let ((org-trust-scanner-tags t) alst) > (org-map-entries > - (quote (cons (cons "ITEM" (org-get-heading t)) > + (quote (cons (cons "ITEM" > + (let ((item (org-get-heading t)) > + (level (- (org-current-level) 1))) > + (if (and indent (> level 0)) > + (format "\\%s %s" > + (make-string level ?- ) item) item))) You may want to follow the "indent" convention used for clockview: "\__" string. Have a look at (or reuse?) the function `org-clocktable-indent-string'... > (org-propview-get-with-inherited inherit))) > match scope))) > ;; read property values Best regards, Seb -- Sebastien Vauban
next prev parent reply other threads:[~2012-03-31 6:57 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <girard.nicolas@gmail.com> 2012-03-30 19:43 ` Nicolas Girard 2012-03-30 19:52 ` Achim Gratz 2012-03-30 19:52 ` Nick Dokos 2012-03-30 20:55 ` Nicolas Girard 2012-03-31 6:57 ` Sebastien Vauban [this message] 2012-03-31 23:58 ` Nicolas Girard 2012-03-31 23:59 ` [PATCH 1/2] Simplify org-clocktable-indent-string Nicolas Girard 2012-03-31 23:59 ` [PATCH 2/2] Allow org-collector to display heading indentation by passing ':indent t' to the propview block Nicolas Girard 2012-04-02 16:56 ` Bastien 2012-04-20 11:12 ` Bastien 2012-04-20 11:12 ` [PATCH 1/2] Simplify org-clocktable-indent-string Bastien
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=80k421mf5q.fsf@somewhere.org \ --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \ --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \ --subject='Re: [PATCH] Allow org-collector to display heading indentation' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).