all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* key bindings for quickly setting effort estimates
@ 2009-11-02 13:52 Adam Spiers
  2009-11-03  6:32 ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Spiers @ 2009-11-02 13:52 UTC (permalink / raw)
  To: org-mode mailing list

I found myself needing a quick way of setting effort estimates outside
column view, and came up with the following:

;; Zero effort is last (10th) element of global Effort_ALL property
;; so that we get zero effort when pressing '0' in the Effort column
;; in Column view, since this invokes `org-set-effort' with arg 0,
;; which stands for the 10th allowed value.
(let ((effort-values
       (org-property-get-allowed-values nil org-effort-property)))
  (dotimes (effort-index 10)
    (let* ((effort (nth effort-index effort-values))
           (key-suffix (number-to-string
                 (if (= effort-index 9) 0 (1+ effort-index))))
           (fn-name (concat "org-set-effort-"
                            (number-to-string effort-index)))
           (fn (intern fn-name)))
      ;; (message "Binding M-o %s to %s which sets effort to %s"
      ;;          key-suffix fn-name effort)
      (fset fn `(lambda ()
                  ,(format "Sets effort to %s." effort)
                  (interactive)
                  (org-set-effort ,(1+ effort-index))))
      (global-set-key (concat "\eo" key-suffix) fn))))

This assumes that Effort_ALL has 9 non-zero effort values, which in my
case is conveniently true:

("0:10" "0:20" "0:30" "1:00" "2:00" "3:00" "4:00" "8:00" "16:00" "0")

Hope this is of interest.

Adam

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

* Re: key bindings for quickly setting effort estimates
  2009-11-02 13:52 key bindings for quickly setting effort estimates Adam Spiers
@ 2009-11-03  6:32 ` Carsten Dominik
  2009-11-03 12:33   ` Tim O'Callaghan
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2009-11-03  6:32 UTC (permalink / raw)
  To: Adam Spiers; +Cc: org-mode mailing list

We do have `org-set-effort', bound to `C-c C-x e'.  You can use a  
prefix arg
to get to a value directly.  But your approach is faster, if you have  
to do
this a lot.

- Carsten

On Nov 2, 2009, at 2:52 PM, Adam Spiers wrote:

> I found myself needing a quick way of setting effort estimates outside
> column view, and came up with the following:
>
> ;; Zero effort is last (10th) element of global Effort_ALL property
> ;; so that we get zero effort when pressing '0' in the Effort column
> ;; in Column view, since this invokes `org-set-effort' with arg 0,
> ;; which stands for the 10th allowed value.
> (let ((effort-values
>       (org-property-get-allowed-values nil org-effort-property)))
>  (dotimes (effort-index 10)
>    (let* ((effort (nth effort-index effort-values))
>           (key-suffix (number-to-string
>                 (if (= effort-index 9) 0 (1+ effort-index))))
>           (fn-name (concat "org-set-effort-"
>                            (number-to-string effort-index)))
>           (fn (intern fn-name)))
>      ;; (message "Binding M-o %s to %s which sets effort to %s"
>      ;;          key-suffix fn-name effort)
>      (fset fn `(lambda ()
>                  ,(format "Sets effort to %s." effort)
>                  (interactive)
>                  (org-set-effort ,(1+ effort-index))))
>      (global-set-key (concat "\eo" key-suffix) fn))))
>
> This assumes that Effort_ALL has 9 non-zero effort values, which in my
> case is conveniently true:
>
> ("0:10" "0:20" "0:30" "1:00" "2:00" "3:00" "4:00" "8:00" "16:00" "0")
>
> Hope this is of interest.
>
> Adam
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: key bindings for quickly setting effort estimates
  2009-11-03  6:32 ` Carsten Dominik
@ 2009-11-03 12:33   ` Tim O'Callaghan
  2009-11-03 16:51     ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Tim O'Callaghan @ 2009-11-03 12:33 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode mailing list

Would it be possible to add something like this to the
"org-fast-tag-selection-include-todo" interface?

possibly with a list of properties to select from:
org-fast-tag-selection-include-properties '(("EFFORT_All"  ?e)
                                                           ("FOCUS_All"  ?f))

So to select effort of "0:20" i'd type "e 2" or similar?

Tim.

2009/11/3 Carsten Dominik <carsten.dominik@gmail.com>:
> We do have `org-set-effort', bound to `C-c C-x e'.  You can use a prefix arg
> to get to a value directly.  But your approach is faster, if you have to do
> this a lot.
>
> - Carsten
>
> On Nov 2, 2009, at 2:52 PM, Adam Spiers wrote:
>
>> I found myself needing a quick way of setting effort estimates outside
>> column view, and came up with the following:
>>
>> ;; Zero effort is last (10th) element of global Effort_ALL property
>> ;; so that we get zero effort when pressing '0' in the Effort column
>> ;; in Column view, since this invokes `org-set-effort' with arg 0,
>> ;; which stands for the 10th allowed value.
>> (let ((effort-values
>>      (org-property-get-allowed-values nil org-effort-property)))
>>  (dotimes (effort-index 10)
>>   (let* ((effort (nth effort-index effort-values))
>>          (key-suffix (number-to-string
>>                (if (= effort-index 9) 0 (1+ effort-index))))
>>          (fn-name (concat "org-set-effort-"
>>                           (number-to-string effort-index)))
>>          (fn (intern fn-name)))
>>     ;; (message "Binding M-o %s to %s which sets effort to %s"
>>     ;;          key-suffix fn-name effort)
>>     (fset fn `(lambda ()
>>                 ,(format "Sets effort to %s." effort)
>>                 (interactive)
>>                 (org-set-effort ,(1+ effort-index))))
>>     (global-set-key (concat "\eo" key-suffix) fn))))
>>
>> This assumes that Effort_ALL has 9 non-zero effort values, which in my
>> case is conveniently true:
>>
>> ("0:10" "0:20" "0:30" "1:00" "2:00" "3:00" "4:00" "8:00" "16:00" "0")
>>
>> Hope this is of interest.
>>
>> Adam
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: 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

* Re: key bindings for quickly setting effort estimates
  2009-11-03 12:33   ` Tim O'Callaghan
@ 2009-11-03 16:51     ` Carsten Dominik
  0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2009-11-03 16:51 UTC (permalink / raw)
  To: Tim O'Callaghan; +Cc: org-mode mailing list


On Nov 3, 2009, at 1:33 PM, Tim O'Callaghan wrote:

> Would it be possible to add something like this to the
> "org-fast-tag-selection-include-todo" interface?
>
> possibly with a list of properties to select from:
> org-fast-tag-selection-include-properties '(("EFFORT_All"  ?e)
>                                                            
> ("FOCUS_All"  ?f))
>
> So to select effort of "0:20" i'd type "e 2" or similar?

No, I don't think to the tags interface, this would get messy.  For he  
agenda you can already do

    2 e

anod now I have changed it that you can also do `e 2' from the agenda,
or `C-c C-x e 2' from the Org buffer.

- Carsten

>
> Tim.
>
> 2009/11/3 Carsten Dominik <carsten.dominik@gmail.com>:
>> We do have `org-set-effort', bound to `C-c C-x e'.  You can use a  
>> prefix arg
>> to get to a value directly.  But your approach is faster, if you  
>> have to do
>> this a lot.
>>
>> - Carsten
>>
>> On Nov 2, 2009, at 2:52 PM, Adam Spiers wrote:
>>
>>> I found myself needing a quick way of setting effort estimates  
>>> outside
>>> column view, and came up with the following:
>>>
>>> ;; Zero effort is last (10th) element of global Effort_ALL property
>>> ;; so that we get zero effort when pressing '0' in the Effort column
>>> ;; in Column view, since this invokes `org-set-effort' with arg 0,
>>> ;; which stands for the 10th allowed value.
>>> (let ((effort-values
>>>      (org-property-get-allowed-values nil org-effort-property)))
>>>  (dotimes (effort-index 10)
>>>   (let* ((effort (nth effort-index effort-values))
>>>          (key-suffix (number-to-string
>>>                (if (= effort-index 9) 0 (1+ effort-index))))
>>>          (fn-name (concat "org-set-effort-"
>>>                           (number-to-string effort-index)))
>>>          (fn (intern fn-name)))
>>>     ;; (message "Binding M-o %s to %s which sets effort to %s"
>>>     ;;          key-suffix fn-name effort)
>>>     (fset fn `(lambda ()
>>>                 ,(format "Sets effort to %s." effort)
>>>                 (interactive)
>>>                 (org-set-effort ,(1+ effort-index))))
>>>     (global-set-key (concat "\eo" key-suffix) fn))))
>>>
>>> This assumes that Effort_ALL has 9 non-zero effort values, which  
>>> in my
>>> case is conveniently true:
>>>
>>> ("0:10" "0:20" "0:30" "1:00" "2:00" "3:00" "4:00" "8:00" "16:00"  
>>> "0")
>>>
>>> Hope this is of interest.
>>>
>>> Adam
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> - Carsten
>>
>>
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>

- Carsten

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 13:52 key bindings for quickly setting effort estimates Adam Spiers
2009-11-03  6:32 ` Carsten Dominik
2009-11-03 12:33   ` Tim O'Callaghan
2009-11-03 16:51     ` Carsten Dominik

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.