[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] odd behaviour in a function - looking for advice
From: |
Filippo A. Salustri |
Subject: |
[O] odd behaviour in a function - looking for advice |
Date: |
Thu, 16 Jun 2011 21:34:39 -0400 |
Hi all,
I've got this function:
(defun fas/org-priority (&optional p)
"Change the priority of the current item, then refresh agenda."
(interactive)
(save-excursion
(if (org-priority p)
(org-agenda-redo))))
I set up my window to have 2 frames side by side. The org agenda is
in the left frame. In the right frame is whatever org file I'm
working on.
In the org file (right frame), I call the above function, having bound
it to \C-,
It does what it's supposed to to the priority, but then the point
moves to the agenda frame and goes to the end of the agenda buffer.
I would have thought 'save-excursion' would have returned the point to
wherever I was when I called the function.
Anyone got any idea what I'm doing wrong?
Cheers.
Fil
--
\V/_
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: address@hidden
http://deseng.ryerson.ca/~fil/
- [O] odd behaviour in a function - looking for advice,
Filippo A. Salustri <=