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

I wanted an easy way to see an effort estimate when not in column
view, so I wrote this:

(defun org-show-effort ()
  "Shows the effort of the entry at the current point."
  (interactive)
  (let ((effort (org-entry-get (point) org-effort-property)))
    (message (if effort (format "Effort is %s" effort)
               "No effort defined"))))

However it would be nice to have a keystroke that would do this in
agenda view.  Another nice touch would be to change 'e' which
currently allows you to edit the effort from agenda view, so that the
prompt for the new value shows the existing effort estimate if there
is one.

Regards,
Adam

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

* Re: org-show-effort ideas
  2009-11-02 13:49 org-show-effort ideas Adam Spiers
@ 2009-11-03  6:47 ` Carsten Dominik
  2009-11-03 12:11   ` Adam Spiers
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2009-11-03  6:47 UTC (permalink / raw)
  To: Adam Spiers; +Cc: org-mode mailing list


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

> I wanted an easy way to see an effort estimate when not in column
> view, so I wrote this:
>
> (defun org-show-effort ()
> "Shows the effort of the entry at the current point."
> (interactive)
> (let ((effort (org-entry-get (point) org-effort-property)))
>  (message (if effort (format "Effort is %s" effort)
>             "No effort defined"))))
>
> However it would be nice to have a keystroke that would do this in
> agenda view.  Another nice touch would be to change 'e' which
> currently allows you to edit the effort from agenda view, so that the
> prompt for the new value shows the existing effort estimate if there
> is one.


Admit it: you did not try this :-

The prompt of "e" already does to this, and when you reply
with RET, the same value stays.  I guess this might be good enough
for showing the effort as well?  Otherwise:  Propose a key!

- Carsten

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

* Re: org-show-effort ideas
  2009-11-03  6:47 ` Carsten Dominik
@ 2009-11-03 12:11   ` Adam Spiers
  2009-11-03 14:42     ` Benjamin Andresen
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Spiers @ 2009-11-03 12:11 UTC (permalink / raw)
  To: org-mode mailing list

On Tue, Nov 03, 2009 at 07:47:48AM +0100, Carsten Dominik wrote:
> On Nov 2, 2009, at 2:49 PM, Adam Spiers wrote:
> 
> >I wanted an easy way to see an effort estimate when not in column
> >view, so I wrote this:
> >
> >(defun org-show-effort ()
> >"Shows the effort of the entry at the current point."
> >(interactive)
> >(let ((effort (org-entry-get (point) org-effort-property)))
> > (message (if effort (format "Effort is %s" effort)
> >            "No effort defined"))))
> >
> >However it would be nice to have a keystroke that would do this in
> >agenda view.  Another nice touch would be to change 'e' which
> >currently allows you to edit the effort from agenda view, so that the
> >prompt for the new value shows the existing effort estimate if there
> >is one.
> 
> Admit it: you did not try this :-
> 
> The prompt of "e" already does to this, and when you reply
> with RET, the same value stays.  I guess this might be good enough
> for showing the effort as well?  Otherwise:  Propose a key!

I definitely did try it, and I just did another 'git pull' and tried
again, and I still don't see it, so I guess we're talking about
different things ;-)

To clarify, I'm referring to showing effort via a single keystroke
when on a todo line in the *Org Agenda* buffer.  Currently, when I hit
"e" on a todo which has an existing "Effort" property value set, my
minibuffer prompt shows "Value: ".  The same applies with C-c C-x e in
a normal .org file buffer.

The only free single keystroke I could find is ' which actually has a
reasonable mnemonic: imagine a contractor providing you with a quote
estimating the effort for a task.

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

* Re: org-show-effort ideas
  2009-11-03 12:11   ` Adam Spiers
@ 2009-11-03 14:42     ` Benjamin Andresen
  2009-11-04  0:26       ` Adam Spiers
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Andresen @ 2009-11-03 14:42 UTC (permalink / raw)
  To: org-mode mailing list

Hey org-mode,

Adam Spiers <orgmode@adamspiers.org> writes:

> I definitely did try it, and I just did another 'git pull' and tried
> again, and I still don't see it, so I guess we're talking about
> different things ;-)
>
> To clarify, I'm referring to showing effort via a single keystroke
> when on a todo line in the *Org Agenda* buffer.  Currently, when I hit
> "e" on a todo which has an existing "Effort" property value set, my
> minibuffer prompt shows "Value: ".  The same applies with C-c C-x e in
> a normal .org file buffer.

When I press 'e' in an agenda on an item that has the Effort property
value set, I get a minibuffer prompt that shows "Value [5]: " when the
Effort value is 5.

This is with a git version from Sunday morning.

Check the source of the function org-set-effort, it will show you that
it concats "[" cur "]", where cur is the current Effort prop value.

br,
benny

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

* Re: Re: org-show-effort ideas
  2009-11-03 14:42     ` Benjamin Andresen
@ 2009-11-04  0:26       ` Adam Spiers
  2009-11-04 13:19         ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Spiers @ 2009-11-04  0:26 UTC (permalink / raw)
  To: emacs-orgmode

Benjamin Andresen (benny@in-ulm.de) wrote:
> Adam Spiers <orgmode@adamspiers.org> writes:
> 
> > I definitely did try it, and I just did another 'git pull' and tried
> > again, and I still don't see it, so I guess we're talking about
> > different things ;-)
> >
> > To clarify, I'm referring to showing effort via a single keystroke
> > when on a todo line in the *Org Agenda* buffer.  Currently, when I hit
> > "e" on a todo which has an existing "Effort" property value set, my
> > minibuffer prompt shows "Value: ".  The same applies with C-c C-x e in
> > a normal .org file buffer.
> 
> When I press 'e' in an agenda on an item that has the Effort property
> value set, I get a minibuffer prompt that shows "Value [5]: " when the
> Effort value is 5.
> 
> This is with a git version from Sunday morning.
> 
> Check the source of the function org-set-effort, it will show you that
> it concats "[" cur "]", where cur is the current Effort prop value.

Thanks for the pointer - it seems that the "[" cur "]" is only
included when

  (org-property-get-allowed-values nil prop 'table)

is nil - and in my case I have a global Effort_ALL property set which
means that this is never the case.  So I think this is a bug which can
be trivially fixed by assigning the prompt string in the let* variable
list, and then using it in both invocations of org-completing-read.

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

* Re: Re: org-show-effort ideas
  2009-11-04  0:26       ` Adam Spiers
@ 2009-11-04 13:19         ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2009-11-04 13:19 UTC (permalink / raw)
  To: Adam Spiers; +Cc: emacs-orgmode

Hi Adam,

On Nov 4, 2009, at 1:26 AM, Adam Spiers wrote:

> Benjamin Andresen (benny@in-ulm.de) wrote:
>> Adam Spiers <orgmode@adamspiers.org> writes:
>>
>>> I definitely did try it, and I just did another 'git pull' and tried
>>> again, and I still don't see it, so I guess we're talking about
>>> different things ;-)
>>>
>>> To clarify, I'm referring to showing effort via a single keystroke
>>> when on a todo line in the *Org Agenda* buffer.  Currently, when I  
>>> hit
>>> "e" on a todo which has an existing "Effort" property value set, my
>>> minibuffer prompt shows "Value: ".  The same applies with C-c C-x  
>>> e in
>>> a normal .org file buffer.
>>
>> When I press 'e' in an agenda on an item that has the Effort property
>> value set, I get a minibuffer prompt that shows "Value [5]: " when  
>> the
>> Effort value is 5.
>>
>> This is with a git version from Sunday morning.
>>
>> Check the source of the function org-set-effort, it will show you  
>> that
>> it concats "[" cur "]", where cur is the current Effort prop value.
>
> Thanks for the pointer - it seems that the "[" cur "]" is only
> included when
>
>  (org-property-get-allowed-values nil prop 'table)
>
> is nil - and in my case I have a global Effort_ALL property set which
> means that this is never the case.  So I think this is a bug which can
> be trivially fixed by assigning the prompt string in the let* variable
> list, and then using it in both invocations of org-completing-read.

You are right, and it is fixed now.

- Carsten

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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 13:49 org-show-effort ideas Adam Spiers
2009-11-03  6:47 ` Carsten Dominik
2009-11-03 12:11   ` Adam Spiers
2009-11-03 14:42     ` Benjamin Andresen
2009-11-04  0:26       ` Adam Spiers
2009-11-04 13:19         ` 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.