Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: support org_toggle_timestamp_type #651

Merged

Conversation

seflue
Copy link
Contributor

@seflue seflue commented Jan 14, 2024

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:

@kristijanhusak
Copy link
Member

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?

@seflue
Copy link
Contributor Author

seflue commented Jan 19, 2024

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.

@kristijanhusak
Copy link
Member

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?'

@seflue
Copy link
Contributor Author

seflue commented Jan 20, 2024

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 seflue force-pushed the feature/org_toggle_timestamp_type branch from c669b6f to 265deac Compare January 21, 2024 15:57
@seflue
Copy link
Contributor Author

seflue commented Jan 21, 2024

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.

@kristijanhusak
Copy link
Member

Looks good, just add some docs around it.

Allows to make active timestamp inactive and vice versa with one
keybinding.
@seflue seflue force-pushed the feature/org_toggle_timestamp_type branch from ea1838e to c1f3769 Compare March 3, 2024 19:14
@seflue
Copy link
Contributor Author

seflue commented Mar 3, 2024

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.

Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just minor tweaks to the documentation and to add it to help window.

DOCS.md Outdated Show resolved Hide resolved
lua/orgmode/config/mappings/init.lua Outdated Show resolved Hide resolved
seflue and others added 2 commits May 21, 2024 16:54
Co-authored-by: Kristijan Husak <husakkristijan@gmail.com>
Co-authored-by: Kristijan Husak <husakkristijan@gmail.com>
@seflue
Copy link
Contributor Author

seflue commented May 21, 2024

@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. 😅

@kristijanhusak kristijanhusak merged commit 82af22f into nvim-orgmode:master May 21, 2024
6 checks passed
SlayerOfTheBad pushed a commit to SlayerOfTheBad/orgmode that referenced this pull request Aug 16, 2024
* feature: support org_toggle_timestamp_type

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

* docs: add documentation for org_toggle_timestamp_type

* Update DOCS.md

Co-authored-by: Kristijan Husak <husakkristijan@gmail.com>

* Update lua/orgmode/config/mappings/init.lua

Co-authored-by: Kristijan Husak <husakkristijan@gmail.com>

---------

Co-authored-by: Sebastian Flügge <seflue@users.noreply.github.com>
Co-authored-by: Kristijan Husak <husakkristijan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants