~protesilaos/tmr

4 2

[PATCH] Improve tabulated view

Details
Message ID
<87ilq9bej3.fsf@cassou.me>
DKIM signature
missing
Download raw message
These 4 patches add 2 features to the tabulated view:

- "+" creates a new timer
- "c" creates a new timer by cloning the timer at point

Best

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
Details
Message ID
<87czghbe59.fsf@cassou.me>
In-Reply-To
<87ilq9bej3.fsf@cassou.me> (view parent)
DKIM signature
missing
Download raw message
Please disregard patch 4
(0004-tmr-tabulated-Add-missing-header-information.patch) which is part
of another set of patches that I will introduce in another thread.

Best

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
Details
Message ID
<87pmkh8hch.fsf@protesilaos.com>
In-Reply-To
<87ilq9bej3.fsf@cassou.me> (view parent)
DKIM signature
pass
Download raw message
> From: Damien Cassou <damien@cassou.me>
> Date: Fri, 13 May 2022 18:09:20 +0200
>
> These 4 patches add 2 features to the tabulated view:

Thank you!  I installed them but I still need to update the manual.
Will do it now and push the changes.

> +;;;###autoload
> +(defun tmr-clone (timer)
> +  "Create a new timer by cloning TIMER."
> +  (interactive (list (tmr--read-timer)))
> +  (tmr (tmr--read-duration
> +        (format "%ss" (tmr--timer-duration timer)))
> +       (tmr--timer-description timer)))
> +

The way this works now, is that it prompts for a duration, but not for a
description.  Perhaps we should add an optional PROMPT argument?  When
it is supplied, it asks for a duration and a description with default
values those of the TIMER it is cloning.  Without the PROMPT arg, it
clones the TIMER outright---no further questions.

What do you think?

Also, I just realised that the input is now converted into seconds.
Internally this is okay, but for some interactions it is confusing.  For
example, tmr-cancel will ask for a timer if there are many.  A
completion candidate looks like this:

    Started at 20:29:27 with input '600' and description 'This is a test'

In this case, I gave it a duration of '10' (i.e. '10m') and it took me
an extra moment to realise what was shown there.  Do you think we can
preserve the original input where it makes sense?  Should we do it?

-- 
Protesilaos Stavrou
https://protesilaos.com
Details
Message ID
<87zgjka4kv.fsf@cassou.me>
In-Reply-To
<87pmkh8hch.fsf@protesilaos.com> (view parent)
DKIM signature
missing
Download raw message
Protesilaos Stavrou <info@protesilaos.com> writes:
> The way this works now, is that it prompts for a duration, but not for a
> description.  Perhaps we should add an optional PROMPT argument?  When
> it is supplied, it asks for a duration and a description with default
> values those of the TIMER it is cloning.  Without the PROMPT arg, it
> clones the TIMER outright---no further questions.
>
> What do you think?

That makes perfect sense. Feel free to change it.

It would be good to also bind "s" to re-Schedule a timer and "w" to
re-Write the description.

> Also, I just realised that the input is now converted into seconds.
> Internally this is okay, but for some interactions it is confusing.


I completely agree. I usually use "20m" timers and first didn't
understand why the new timer would be "1200". I think we should store
the initial input.

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
Details
Message ID
<877d6nw6z6.fsf@protesilaos.com>
In-Reply-To
<87zgjka4kv.fsf@cassou.me> (view parent)
DKIM signature
pass
Download raw message
> From: Damien Cassou <damien@cassou.me>
> Date: Sat, 14 May 2022 10:41:52 +0200
>
> Protesilaos Stavrou <info@protesilaos.com> writes:
>> The way this works now, is that it prompts for a duration, but not for a
>> description.  Perhaps we should add an optional PROMPT argument?  When
>> it is supplied, it asks for a duration and a description with default
>> values those of the TIMER it is cloning.  Without the PROMPT arg, it
>> clones the TIMER outright---no further questions.
>>
>> What do you think?
>
> That makes perfect sense. Feel free to change it.

Done in commits 3f86745, 407da66.

> It would be good to also bind "s" to re-Schedule a timer and "w" to
> re-Write the description.

Good idea!  I will give it a try now.

>> Also, I just realised that the input is now converted into seconds.
>> Internally this is okay, but for some interactions it is confusing.
>
> I completely agree. I usually use "20m" timers and first didn't
> understand why the new timer would be "1200". I think we should store
> the initial input.

I added this in commit b290307.

-- 
Protesilaos Stavrou
https://protesilaos.com
Reply to thread Export thread (mbox)