Comments (5)
On Wed, Aug 29 2012, maroony wrote:
I got a strange problem. If I press a button at the notification window like
DONE, SHOW, ... a new browser window will open leading to dropbox.com.
Strange, indeed!
This code is called upon button press:
--8<---------------cut here---------------start------------->8---
(defun org-notify-on-action (plist key)
"User wants to see action."
(let ((file (plist-get plist :file))
(begin (plist-get plist :begin)))
(if (string-equal key "show")
(progn
(switch-to-buffer (find-file-noselect file))
(org-with-wide-buffer
(goto-char begin)
(show-entry))
(goto-char begin)
(search-forward "DEADLINE: <")
(if (display-graphic-p)
(x-focus-frame nil)))
(save-excursion
(with-current-buffer (find-file-noselect file)
(org-with-wide-buffer
(goto-char begin)
(search-forward "DEADLINE: <")
(cond
((string-equal key "done") (org-todo))
((string-equal key "hour") (org-timestamp-change 60 'minute))
((string-equal key "day") (org-timestamp-up-day))
((string-equal key "week") (org-timestamp-change 7 'day)))))))))
--8<---------------cut here---------------end--------------->8---
It's probably the call to `find-file-noselect'.
Could you please add 2 lines to the function:
--8<---------------cut here---------------start------------->8---
(defun org-notify-on-action (plist key)
"User wants to see action."
(let ((file (plist-get plist :file))
(begin (plist-get plist :begin)))
(if (string-equal key "show")
(progn
(message "FILE: %s" file)
(switch-to-buffer (find-file-noselect file))
(org-with-wide-buffer
(goto-char begin)
(show-entry))
(goto-char begin)
(search-forward "DEADLINE: <")
(if (display-graphic-p)
(x-focus-frame nil)))
(save-excursion
(message "FILE: %s" file)
(with-current-buffer (find-file-noselect file)
(org-with-wide-buffer
(goto-char begin)
(search-forward "DEADLINE: <")
(cond
((string-equal key "done") (org-todo))
((string-equal key "hour") (org-timestamp-change 60 'minute))
((string-equal key "day") (org-timestamp-up-day))
((string-equal key "week") (org-timestamp-change 7 'day)))))))))
--8<---------------cut here---------------end--------------->8---
Then (point must be in the function) "M-x eval-defun"
Then press again a button and send me the output of the Messages
buffer (the lines beginning with "FILE:").
Maybe that's why my org files are stored in my dropbox folder?
Unfortunately I don't know nothing about dropbox...
Peter
from org-notify.
The output seems to be ok:
FILE: /home/maroony/Org/gtd.org
from org-notify.
On Thu, Aug 30 2012, maroony wrote:
The output seems to be ok:
FILE: /home/maroony/Org/gtd.org
What happens, when you do:
M-: (find-file-noselect "/home/maroony/Org/gtd.org")
?
Peter
from org-notify.
It returns only: #< buffer gtd.org>
(without the first space)
from org-notify.
On Thu, Aug 30 2012, maroony wrote:
It returns only: #
Seems to be ok. Then I don't know, what happens. Please try on the
orgmode or emacs-help mailing list...
Peter
from org-notify.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-notify.