emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Viewing Value of a Property of an Item in the Agenda


From: Bastien
Subject: Re: [O] Viewing Value of a Property of an Item in the Agenda
Date: Fri, 14 Sep 2012 08:43:51 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux)

Hi Varun,

Varun Vats <address@hidden> 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 via email to

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