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

Some issues/inconsistencies wrt renaming an existing denote entry #204

Closed
babusri opened this issue Dec 16, 2023 · 7 comments
Closed

Some issues/inconsistencies wrt renaming an existing denote entry #204

babusri opened this issue Dec 16, 2023 · 7 comments

Comments

@babusri
Copy link

babusri commented Dec 16, 2023

A few questions:

  1. I am trying to rename a denote entry

I see "Rename xyz to with title (empty to ignore/remove)"
What does "(empty to ignore/remove)" in the context of a title?
Looks like it means that if you type enter, the title is not changed.

  1. I have an entry with a couple of keywords and no signature.

I just want to rename the title and keep the rest the same (that is same keywords and no signature)
Looks like I need to enter the keywords again.

In the context of keywords, what does "empty to ignore/remove" mean? Looks like it means that if you press enter, keywords if any are removed.

The I see "Rename xyz with signature (empty to ignore/remove)"
I almost did not see that there is a 1 in the next line of the minibuffer.

Why do we get a prompt of 1 for signature when there was no signature in the first place.

  1. So, now I have an entry with 1 as a signature.
    Now when I try to rename, I see a 1 as signature in the first minibuffer line. Which is fine.
    But there is also a 1 in the next minibuffer line. Why?
    Now, when I type backspace to remove the 1 in the first minibuffer line and type enter, I expect the signature to be removed.
    But the signature is still there. I have to type ^U^J to remove the signature.
    Not sure if this is an interaction with the ivy mode that I use.
@protesilaos
Copy link
Owner

protesilaos commented Dec 20, 2023 via email

@babusri
Copy link
Author

babusri commented Dec 20, 2023 via email

@protesilaos
Copy link
Owner

protesilaos commented Dec 20, 2023 via email

@babusri
Copy link
Author

babusri commented Dec 20, 2023 via email

protesilaos added a commit that referenced this issue Dec 22, 2023
…aming commands use it

This is what we do with the title and signature prompts. Thanks to
babusri for pointing out the inconsistency in issue 204 on the GitHub
mirror: <#204>.
@protesilaos
Copy link
Owner

Thank you @babusri for taking the time to write this!

In my opinion, the fact that one key RET has 2 drastically opposite actions (ignore vs delete) can be confusing.

This is to cover the case where the user wants to remove a file name component (e.g. they no longer need the signature). We are using RET simply because the Emacs minibuffer is not under our control. We give it an empty string and then process it ourselves. If the minibuffer does not return an empty string (as in the case of ivy or vertico), we can only hope that the user will find the key those packages use to send the empty minibuffer contents literally (the default completion behaves this way, so RET is always predictable).

It will be good to know what the action will be without the user having to mentally parse the file name for -- or __ or ==.

The action is always the same: if the minibuffer is not empty, we take the text, if it is empty, we remove any existing text.

Also I think RET behaves differently for title and keywords. In the former case, RET keeps the title and in the latter, the keywords are removed.

Let us say that you have a title and 3 keywords. I just want to change the title. This must be a very common operation. I shouldn't have to type the 3 keywords again. But hitting enter removes all the keywords.

There should be a way to keep the existing keywords, for e.g. change the title and skip the rest.

This is the ability to provide the existing keywords as the initial minibuffer input. As I already noted before, it is something that should be done. See commit 5dfd777, which now provides this feature.


Again, there is nothing I can do about Ivy/Vertico/etc. directly. If there is a better approach, I am happy to learn about it and implement it.

@babusri
Copy link
Author

babusri commented Dec 22, 2023 via email

@protesilaos
Copy link
Owner

I am in the process of refining the "rename" commands. Discussion continues here: #247

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

No branches or pull requests

2 participants