orgmode icon indicating copy to clipboard operation
orgmode copied to clipboard

feature: support org_toggle_timestamp_type

Open seflue opened this issue 1 year ago • 7 comments

Allows to make active timestamp inactive and vice versa with one keybinding.

Implements feature request #652.

It is part of Emacs Orgmode, but not mapped.

See also:

  • https://doc.endlessparentheses.com/Fun/org-toggle-timestamp-type.html
  • https://emacs.stackexchange.com/questions/38062/configure-key-to-toggle-between-active-and-inactive-timestamps/38064#38064

seflue avatar Jan 14 '24 01:01 seflue

Similar thing can be achieved if you put a cursor on edge </> (or [/] on inactive) and do ctrl + a (or ctrl + x)

<2024-01-15 Mon 13:19>
^ cursor here, do ctrl + a

would that work or you think this is still more helpful?

kristijanhusak avatar Jan 15 '24 12:01 kristijanhusak

Similar thing can be achieved if you put a cursor on edge </> (or [/] on inactive) and do ctrl + a (or ctrl + x)

<2024-01-15 Mon 13:19>
^ cursor here, do ctrl + a

would that work or you think this is still more helpful?

Is this actually documented somewhere? And what is the relation to Emacs Orgmode? Because my PR relates to a feature implemented in Emacs Orgmode (and because it doesn't need any precise positioning of the cursor) I actually find it more helpful. It has a clear mapping, a function and is googlable. If you agree to add it, I would also add some documentation.

seflue avatar Jan 19 '24 19:01 seflue

Yeah, in this section https://orgmode.org/manual/Creating-Timestamps.html#index-S_002dUP-4

On the beginning or enclosing bracket of a timestamp, change its type

But since this is a built-in option of Orgmode, I'm ok with adding it. You can add documentation. I'm just trying to figure out if we could maybe use a different mapping, maybe something like <prefix>d!. What do you think?'

kristijanhusak avatar Jan 19 '24 22:01 kristijanhusak

Yeah, in this section https://orgmode.org/manual/Creating-Timestamps.html#index-S_002dUP-4

On the beginning or enclosing bracket of a timestamp, change its type

But since this is a built-in option of Orgmode, I'm ok with adding it. You can add documentation. I'm just trying to figure out if we could maybe use a different mapping, maybe something like <prefix>d!. What do you think?'

Sure, let's change it. I'm agnostic with the mapping, and your suggestion makes sense.

seflue avatar Jan 20 '24 10:01 seflue

Yeah, in this section https://orgmode.org/manual/Creating-Timestamps.html#index-S_002dUP-4

On the beginning or enclosing bracket of a timestamp, change its type

But since this is a built-in option of Orgmode, I'm ok with adding it. You can add documentation. I'm just trying to figure out if we could maybe use a different mapping, maybe something like <prefix>d!. What do you think?'

Done.

seflue avatar Jan 21 '24 15:01 seflue

Looks good, just add some docs around it.

kristijanhusak avatar Jan 21 '24 19:01 kristijanhusak

Looks good, just add some docs around it.

It took me quite some time to get back to this PR, but I just add a short documentation.

seflue avatar Mar 03 '24 19:03 seflue

@kristijanhusak Sorry for the long delay, I wasn't aware, that it takes me just 4 clicks to apply your suggestions. I saw them months ago on my phone. But because I was busy and then completly distracted by work I didn't take a closer look at my desktop.

If you don't have any other objections, this PR can now finally be merged. :sweat_smile:

seflue avatar May 21 '24 14:05 seflue