emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [org-clock] default clock for non-org-mode buffers
@ 2010-02-10 17:49 Austin Frank
  2010-02-12 14:58 ` Bernt Hansen
  0 siblings, 1 reply; 4+ messages in thread
From: Austin Frank @ 2010-02-10 17:49 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1451 bytes --]

Hello--

Sometimes I want to clock in but I'm not in an org-mode buffer.  Would
it be possible to either provide a function or hook that uses the
current buffer to add a selection to the destinations provided by
`org-clock-select-task'?

I can see two possible functions I would add to an
`org-clock-prepare-selections-hook'.  First, a version with remember
that would create a new task to clock into based on the current buffer

#v+
(defun au-clock-in-to-new-task ()
  (if (fboundp org-remember)
    ;; use one of my remember templates that creates a TODO entry under
    ;; the heading "uncategorized tasks".  it includes a link to the
    ;; current buffer
    (org-remember nil (kbd "t")))
  ;;
  ;; then either clock in to the task right away,
  ;; or add the new task to the selection buffer somehow
  ;; ...
)
#v-

And second, a version that lets you browse to an existing task.

#v+
;; I think this one doesn't work as written, but only because I don't
;; know what I am doing
(defun au-clock-in-go-to-task ()
  ;; use the org-refile interface to go to an existing task
  (org-refile t)
  ;;
  ;; then do something with link to buffer we clocked in on
  ;; ...
)
#v-

Does a hook or some other way of introducing this functionality already
exist?  If not, would other people use it?

Thanks,
/au
  
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-18 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-10 17:49 [org-clock] default clock for non-org-mode buffers Austin Frank
2010-02-12 14:58 ` Bernt Hansen
2010-02-18  9:09   ` Sébastien Vauban
2010-02-18 17:14     ` Bernt Hansen

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