emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Varun Vats <mailvarunvats@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Viewing Value of a Property of an Item in the Agenda
Date: Fri, 14 Sep 2012 08:43:51 +0200	[thread overview]
Message-ID: <87392l5ck8.fsf@altern.org> (raw)
In-Reply-To: <CADWkGHJch4FfQwoELc-zRFnBdkn2=TgDTcFvMT8tzrrbMuy9BQ@mail.gmail.com> (Varun Vats's message of "Mon, 3 Sep 2012 20:28:00 +0530")

Hi Varun,

Varun Vats <mailvarunvats@gmail.com> writes:

> I have the LOCATION property set for a few appointments in my org
> files. When I look at the agenda, I sometimes want to be able to view
> the location of an appointment quickly. Right now I hit TAB on the
> agenda item (to go to its original location in the org file) and open
> the :PROPERTIES: drawer to view the LOCATION property. 
>
> Is there any way I can quickly look-up an item's propert(y/ies) in
> the agenda view? I know one option would be to set up a column view
> for the agenda. However, this requires that I know the properties I
> want to view beforehand. Any ideas/suggestions are appreciated.

Hackish but works:

(defun my-org-agenda-view-item-properties ()
  "Display the properties of the item at point in the agenda."
  (interactive)
  (let ((m (get-text-property (point) 'org-hd-marker)) pp)
    (with-current-buffer (marker-buffer m)
      (goto-char m)
      (while (re-search-forward
	      org-property-re
	      (save-excursion (org-end-of-subtree)) t)
	(push (concat (match-string 2) ": " (match-string 3)) pp)))
    (delete-other-windows)
    (pop-to-buffer "*org properties*")
    (erase-buffer)
    (mapcar (lambda(p) (insert p "\n")) pp)
    (org-fit-window-to-buffer)
    (other-window 1)))

HTH,

-- 
 Bastien

      reply	other threads:[~2012-09-14  6:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03 14:58 Viewing Value of a Property of an Item in the Agenda Varun Vats
2012-09-14  6:43 ` Bastien [this message]

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=87392l5ck8.fsf@altern.org \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=mailvarunvats@gmail.com \
    /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
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

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