emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Help with binding new key to change task state
@ 2009-02-16  0:00 Varnit Suri
  2009-02-16  2:52 ` Bernt Hansen
  2009-02-16 18:57 ` Ian Barton
  0 siblings, 2 replies; 6+ messages in thread
From: Varnit Suri @ 2009-02-16  0:00 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

The org manual talks about using C-u C-c C-t to change the state of a
task. This command nicely throws up a list of several intermediate
states to choose from. In addition, I have logging turned on, so each
time I do this, I can log a note about the state change.

I am merely trying to bind this to a simpler set of keys. I know C-c C-t
is bound to org-todo, but can't figure out what C-u C-c C-t binds to
(describe-key stops at C-u). Or then, maybe I don't know Emacs/Org well
enough yet. Any suggestions?

The second thing I am trying to do is have a shortcut to take a task
from TODO to DONE without going through the above process.

Thanks,

V.

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

* Re: Help with binding new key to change task state
  2009-02-16  0:00 Help with binding new key to change task state Varnit Suri
@ 2009-02-16  2:52 ` Bernt Hansen
  2009-02-16  5:09   ` Varnit Suri
  2009-02-16 18:57 ` Ian Barton
  1 sibling, 1 reply; 6+ messages in thread
From: Bernt Hansen @ 2009-02-16  2:52 UTC (permalink / raw)
  To: Varnit Suri; +Cc: emacs-orgmode

"Varnit Suri" <vsuri@Brocade.COM> writes:

> The org manual talks about using C-u C-c C-t to change the state of a
> task. This command nicely throws up a list of several intermediate
> states to choose from. In addition, I have logging turned on, so each
> time I do this, I can log a note about the state change.
>
> I am merely trying to bind this to a simpler set of keys. I know C-c C-t
> is bound to org-todo, but can't figure out what C-u C-c C-t binds to
> (describe-key stops at C-u). Or then, maybe I don't know Emacs/Org well
> enough yet. Any suggestions?

C-c C-t and C-u C-c C-t both bind to the same function.  The C-u just
provides a prefix value of 4 to the function so it can behave
differently (displaying the menu of todo choices)

You probably want to set 

(setq org-use-fast-todo-selection t)

so that C-c C-t shows the menu by default.

>
> The second thing I am trying to do is have a shortcut to take a task
> from TODO to DONE without going through the above process.

If you have your todo states defined in sequences you can use S-left
arrow and S-right arrow to cycle between the states quickly.

I use the following TODO settings:

(setq org-todo-keywords '((sequence "TODO(t)" "STARTED(s!)" "|" "DONE(d!/!)")
			  (sequence "WAITING(w@/!)" "SOMEDAY(s)" "|" "CANCELLED(c@/!)")
			  (sequence "QUOTATION(q!)" "QUOTED(Q!)" "|" "APPROVED(A@)" "EXPIRED(E@)" "REJECTED(R@)")
			  (sequence "OPENPO(O!)" "|" "CLOSEDPO(C@)")
			  (sequence "|" "NOTE(n)" "PHONE(T)")))

so if I have a task

* TODO Do something

then S-right arrow moves to STARTED and a second time moves to DONE

HTH,
Bernt

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

* RE: Help with binding new key to change task state
  2009-02-16  2:52 ` Bernt Hansen
@ 2009-02-16  5:09   ` Varnit Suri
  2009-02-16 15:33     ` Bernt Hansen
  0 siblings, 1 reply; 6+ messages in thread
From: Varnit Suri @ 2009-02-16  5:09 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Thanks for your reply. The first trick worked fine.

For the second problem though, I 'd not like to cycle through the
states. That's coz each time I change the state, I have to log it.

So I am trying to define a single key that lets me jump straight to the
DONE state (from any other state). C-c C-t C-c works okay coz the last
'c' chooses the DONE state from the menu.

Any ideas how I can define a simpler key for this? Thanks.

V.


-----Original Message-----
From: Bernt Hansen [mailto:bernt@norang.ca] 
Sent: Sunday, February 15, 2009 6:52 PM
To: Varnit Suri
Cc: emacs-orgmode@gnu.org
Subject: Re: Help with binding new key to change task state

"Varnit Suri" <vsuri@Brocade.COM> writes:

> The org manual talks about using C-u C-c C-t to change the state of a
> task. This command nicely throws up a list of several intermediate
> states to choose from. In addition, I have logging turned on, so each
> time I do this, I can log a note about the state change.
>
> I am merely trying to bind this to a simpler set of keys. I know C-c
C-t
> is bound to org-todo, but can't figure out what C-u C-c C-t binds to
> (describe-key stops at C-u). Or then, maybe I don't know Emacs/Org
well
> enough yet. Any suggestions?

C-c C-t and C-u C-c C-t both bind to the same function.  The C-u just
provides a prefix value of 4 to the function so it can behave
differently (displaying the menu of todo choices)

You probably want to set 

(setq org-use-fast-todo-selection t)

so that C-c C-t shows the menu by default.

>
> The second thing I am trying to do is have a shortcut to take a task
> from TODO to DONE without going through the above process.

If you have your todo states defined in sequences you can use S-left
arrow and S-right arrow to cycle between the states quickly.

I use the following TODO settings:

(setq org-todo-keywords '((sequence "TODO(t)" "STARTED(s!)" "|"
"DONE(d!/!)")
			  (sequence "WAITING(w@/!)" "SOMEDAY(s)" "|"
"CANCELLED(c@/!)")
			  (sequence "QUOTATION(q!)" "QUOTED(Q!)" "|"
"APPROVED(A@)" "EXPIRED(E@)" "REJECTED(R@)")
			  (sequence "OPENPO(O!)" "|" "CLOSEDPO(C@)")
			  (sequence "|" "NOTE(n)" "PHONE(T)")))

so if I have a task

* TODO Do something

then S-right arrow moves to STARTED and a second time moves to DONE

HTH,
Bernt

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

* Re: Help with binding new key to change task state
  2009-02-16  5:09   ` Varnit Suri
@ 2009-02-16 15:33     ` Bernt Hansen
  2009-02-17 20:11       ` Varnit Suri
  0 siblings, 1 reply; 6+ messages in thread
From: Bernt Hansen @ 2009-02-16 15:33 UTC (permalink / raw)
  To: Varnit Suri; +Cc: emacs-orgmode

You could do something like this: (pick your favourite key)

(global-set-key (kbd "<C-f6>") (lambda () (interactive) (org-todo 3)))

For me my DONE state is the 3rd state.  Find the prefix for the state
you want (C-3 C-c C-t goes directly to DONE for me) and provide that
value as the argument for org-todo.

Then just C-f6 (or whatever key you like) and you're DONE. :)

HTH,
-Bernt


"Varnit Suri" <vsuri@Brocade.COM> writes:

> Thanks for your reply. The first trick worked fine.
>
> For the second problem though, I 'd not like to cycle through the
> states. That's coz each time I change the state, I have to log it.
>
> So I am trying to define a single key that lets me jump straight to the
> DONE state (from any other state). C-c C-t C-c works okay coz the last
> 'c' chooses the DONE state from the menu.
>
> Any ideas how I can define a simpler key for this? Thanks.
>
> V.
>
>
> -----Original Message-----
> From: Bernt Hansen [mailto:bernt@norang.ca] 
> Sent: Sunday, February 15, 2009 6:52 PM
> To: Varnit Suri
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Help with binding new key to change task state
>
> "Varnit Suri" <vsuri@Brocade.COM> writes:
>
>> The org manual talks about using C-u C-c C-t to change the state of a
>> task. This command nicely throws up a list of several intermediate
>> states to choose from. In addition, I have logging turned on, so each
>> time I do this, I can log a note about the state change.
>>
>> I am merely trying to bind this to a simpler set of keys. I know C-c
> C-t
>> is bound to org-todo, but can't figure out what C-u C-c C-t binds to
>> (describe-key stops at C-u). Or then, maybe I don't know Emacs/Org
> well
>> enough yet. Any suggestions?
>
> C-c C-t and C-u C-c C-t both bind to the same function.  The C-u just
> provides a prefix value of 4 to the function so it can behave
> differently (displaying the menu of todo choices)
>
> You probably want to set 
>
> (setq org-use-fast-todo-selection t)
>
> so that C-c C-t shows the menu by default.
>
>>
>> The second thing I am trying to do is have a shortcut to take a task
>> from TODO to DONE without going through the above process.
>
> If you have your todo states defined in sequences you can use S-left
> arrow and S-right arrow to cycle between the states quickly.
>
> I use the following TODO settings:
>
> (setq org-todo-keywords '((sequence "TODO(t)" "STARTED(s!)" "|"
> "DONE(d!/!)")
> 			  (sequence "WAITING(w@/!)" "SOMEDAY(s)" "|"
> "CANCELLED(c@/!)")
> 			  (sequence "QUOTATION(q!)" "QUOTED(Q!)" "|"
> "APPROVED(A@)" "EXPIRED(E@)" "REJECTED(R@)")
> 			  (sequence "OPENPO(O!)" "|" "CLOSEDPO(C@)")
> 			  (sequence "|" "NOTE(n)" "PHONE(T)")))
>
> so if I have a task
>
> * TODO Do something
>
> then S-right arrow moves to STARTED and a second time moves to DONE
>
> HTH,
> Bernt

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

* Re: Help with binding new key to change task state
  2009-02-16  0:00 Help with binding new key to change task state Varnit Suri
  2009-02-16  2:52 ` Bernt Hansen
@ 2009-02-16 18:57 ` Ian Barton
  1 sibling, 0 replies; 6+ messages in thread
From: Ian Barton @ 2009-02-16 18:57 UTC (permalink / raw)
  To: emacs-orgmode


> The second thing I am trying to do is have a shortcut to take a task
> from TODO to DONE without going through the above process.
> 
You can do this in Agenda View. C-u then type done in the mini-buffer. 
You can also choose other states and the mini buffer offers tab completion.

Ian.

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

* RE: Help with binding new key to change task state
  2009-02-16 15:33     ` Bernt Hansen
@ 2009-02-17 20:11       ` Varnit Suri
  0 siblings, 0 replies; 6+ messages in thread
From: Varnit Suri @ 2009-02-17 20:11 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Thanks. This worked!

-----Original Message-----
From: Bernt Hansen [mailto:bernt@norang.ca] 
Sent: Monday, February 16, 2009 7:34 AM
To: Varnit Suri
Cc: emacs-orgmode@gnu.org
Subject: Re: Help with binding new key to change task state

You could do something like this: (pick your favourite key)

(global-set-key (kbd "<C-f6>") (lambda () (interactive) (org-todo 3)))

For me my DONE state is the 3rd state.  Find the prefix for the state
you want (C-3 C-c C-t goes directly to DONE for me) and provide that
value as the argument for org-todo.

Then just C-f6 (or whatever key you like) and you're DONE. :)

HTH,
-Bernt


"Varnit Suri" <vsuri@Brocade.COM> writes:

> Thanks for your reply. The first trick worked fine.
>
> For the second problem though, I 'd not like to cycle through the
> states. That's coz each time I change the state, I have to log it.
>
> So I am trying to define a single key that lets me jump straight to
the
> DONE state (from any other state). C-c C-t C-c works okay coz the last
> 'c' chooses the DONE state from the menu.
>
> Any ideas how I can define a simpler key for this? Thanks.
>
> V.
>
>
> -----Original Message-----
> From: Bernt Hansen [mailto:bernt@norang.ca] 
> Sent: Sunday, February 15, 2009 6:52 PM
> To: Varnit Suri
> Cc: emacs-orgmode@gnu.org
> Subject: Re: Help with binding new key to change task state
>
> "Varnit Suri" <vsuri@Brocade.COM> writes:
>
>> The org manual talks about using C-u C-c C-t to change the state of a
>> task. This command nicely throws up a list of several intermediate
>> states to choose from. In addition, I have logging turned on, so each
>> time I do this, I can log a note about the state change.
>>
>> I am merely trying to bind this to a simpler set of keys. I know C-c
> C-t
>> is bound to org-todo, but can't figure out what C-u C-c C-t binds to
>> (describe-key stops at C-u). Or then, maybe I don't know Emacs/Org
> well
>> enough yet. Any suggestions?
>
> C-c C-t and C-u C-c C-t both bind to the same function.  The C-u just
> provides a prefix value of 4 to the function so it can behave
> differently (displaying the menu of todo choices)
>
> You probably want to set 
>
> (setq org-use-fast-todo-selection t)
>
> so that C-c C-t shows the menu by default.
>
>>
>> The second thing I am trying to do is have a shortcut to take a task
>> from TODO to DONE without going through the above process.
>
> If you have your todo states defined in sequences you can use S-left
> arrow and S-right arrow to cycle between the states quickly.
>
> I use the following TODO settings:
>
> (setq org-todo-keywords '((sequence "TODO(t)" "STARTED(s!)" "|"
> "DONE(d!/!)")
> 			  (sequence "WAITING(w@/!)" "SOMEDAY(s)" "|"
> "CANCELLED(c@/!)")
> 			  (sequence "QUOTATION(q!)" "QUOTED(Q!)" "|"
> "APPROVED(A@)" "EXPIRED(E@)" "REJECTED(R@)")
> 			  (sequence "OPENPO(O!)" "|" "CLOSEDPO(C@)")
> 			  (sequence "|" "NOTE(n)" "PHONE(T)")))
>
> so if I have a task
>
> * TODO Do something
>
> then S-right arrow moves to STARTED and a second time moves to DONE
>
> HTH,
> Bernt

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

end of thread, other threads:[~2009-02-17 20:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-16  0:00 Help with binding new key to change task state Varnit Suri
2009-02-16  2:52 ` Bernt Hansen
2009-02-16  5:09   ` Varnit Suri
2009-02-16 15:33     ` Bernt Hansen
2009-02-17 20:11       ` Varnit Suri
2009-02-16 18:57 ` Ian Barton

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