emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Mikhail Skorzhinskii <mskorzhinskiy@eml.cc>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] org-agenda.el: customise outline path in echo area
Date: Sat, 11 Jun 2022 16:32:19 +0800	[thread overview]
Message-ID: <87r13vbnxo.fsf@localhost> (raw)
In-Reply-To: <aaaf1fa5233bb753325786b2e58a3505bb8aefd6.camel@eml.cc>

Mikhail Skorzhinskii <mskorzhinskiy@eml.cc> writes:

> Thank you for your comments once again. I've changed string= to eq and
> it appears to be working OK.
> I've also renamed "title" variable to "title-prop" for better
> readability. The -prop suffix should show the reader that it was
> extracted from the file, and thus cost some CPU/IO.
> I've attached an updated version to this email. Would love to hear what
> you think.

Thanks! And sorry for the late reply. Your patch fell through the cracks
in my todo list.

> * lisp/org-agenda.el (org-agenda-show-outline-path): add an option to
> show document title in outline path (instead of file name)
> * lisp/org.el (org-get-title-from-file): a function to collect the
> document title from the org-mode file
> * lisp/org.el (org-display-outline-path): add logic that will collect a
> document title and put it into the outline path if
> org-agenda-show-outline-path set to 'title

It would make sense to document the new customization in ORG-NEWS.

> +(defun org-get-title-from-file (file)
> +  "Collect tilte from the provided `org-mode' FILE."
> +  (let (title)
              ^ typo
> +    (when file
> +      (with-current-buffer
> +	  (get-file-buffer file)
> +	(pcase (org-collect-keywords '("TITLE"))
> +	  (`(("TITLE" . ,val))
> +	   (setq title (car val)))))
> +      title)))

Note that this function behavior is underfined when FILE buffer does not
exist. It would be better to accept buffer as argument.


  reply	other threads:[~2022-06-11  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-25 15:24 [PATCH] org-agenda.el: customise outline path in echo area Mikhail Skorzhinskii
2021-12-26 13:44 ` Ihor Radchenko
2021-12-26 13:49   ` Mikhail Skorzhinskiy
2021-12-26 14:01     ` Ihor Radchenko
2021-12-28 12:01   ` Mikhail Skorzhinskii
2022-06-11  8:32     ` Ihor Radchenko [this message]
2022-08-30 14:59       ` Mikhail Skorzhisnkii

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:

  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=87r13vbnxo.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mskorzhinskiy@eml.cc \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).