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
Comments
|
From: babusri ***@***.***>
Date: Sat, 16 Dec 2023 00:17:36 -0800
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.
If you type RET with an empty prompt, then the title is either not
added, if none exists, or removed, if it exists.
NOTE: that the behaviour of RET depends on your completion UI. For
example, with `vertico`, RET on an empty prompt selects the first
candidate (i.e. not an empty string). You must use M-RET in this
scenario. I think Ivy uses C-j for the same effect, though please check.
2) 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.
We do not have a prefilled value for keywords right now. In principle,
this can be added. But it needs more work that the other prompts.
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.
Same ideas as above with RET (and M-RET for vertico).
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.
The 1 must be some previous signature value you had provided. Your past
input is available for minibuffer completion. Again RET (or M-RET for
vertico) do the same thing here.
3) 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?
You mean that 1 is the prefilled text in the minibuffer for both the
title and signature prompts?
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.
Check the behaviour RET, as I noted above. Unfortunately, we do not
control what the minibuffer UI is doing.
I have to type ^U^J to remove the signature. Not sure if this is an
interaction with the ivy mode that I use.
Yes, Ivy is involved. Check its documentation on how to input an empty
string. I think it is with C-j, but I am not sure.
…--
Protesilaos Stavrou
https://protesilaos.com
|
|
Thanks for your explanation.
Babu
…On Wed, Dec 20, 2023 at 3:10 PM Protesilaos Stavrou < ***@***.***> wrote:
> From: babusri ***@***.***>
> Date: Sat, 16 Dec 2023 00:17:36 -0800
>
> 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.
If you type RET with an empty prompt, then the title is either not
added, if none exists, or removed, if it exists.
NOTE: that the behaviour of RET depends on your completion UI. For
example, with `vertico`, RET on an empty prompt selects the first
candidate (i.e. not an empty string). You must use M-RET in this
scenario. I think Ivy uses C-j for the same effect, though please check.
> 2) 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.
We do not have a prefilled value for keywords right now. In principle,
this can be added. But it needs more work that the other prompts.
> 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.
Same ideas as above with RET (and M-RET for vertico).
> 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.
The 1 must be some previous signature value you had provided. Your past
input is available for minibuffer completion. Again RET (or M-RET for
vertico) do the same thing here.
> 3) 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?
You mean that 1 is the prefilled text in the minibuffer for both the
title and signature prompts?
> 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.
Check the behaviour RET, as I noted above. Unfortunately, we do not
control what the minibuffer UI is doing.
> I have to type ^U^J to remove the signature. Not sure if this is an
> interaction with the ivy mode that I use.
Yes, Ivy is involved. Check its documentation on how to input an empty
string. I think it is with C-j, but I am not sure.
--
Protesilaos Stavrou
https://protesilaos.com
—
Reply to this email directly, view it on GitHub
<#204 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACOXAHEMR24N3GYHFKFZRDYKKXBVAVCNFSM6AAAAABAXNTGXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUGE2TIOBZGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
From: babusri ***@***.***>
Date: Wed, 20 Dec 2023 04:39:10 -0800
Thanks for your explanation.
You are welcome! Do you think there is some way to make this more
informative? I am happy to make the necessary changes.
…--
Protesilaos Stavrou
https://protesilaos.com
|
|
Prot,
In my opinion, the fact that one key RET has 2 drastically opposite actions
(ignore vs delete) can be confusing.
It will be good to know what the action will be without the user having to
mentally parse the file name for -- or __ or ==.
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.
Babu
…On Wed, Dec 20, 2023 at 10:27 PM Protesilaos Stavrou < ***@***.***> wrote:
> From: babusri ***@***.***>
> Date: Wed, 20 Dec 2023 04:39:10 -0800
>
> Thanks for your explanation.
You are welcome! Do you think there is some way to make this more
informative? I am happy to make the necessary changes.
--
Protesilaos Stavrou
https://protesilaos.com
—
Reply to this email directly, view it on GitHub
<#204 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACOXAH7MYYZBOIDSPLRWRTYKMKJNAVCNFSM6AAAAABAXNTGXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUHAZDENJTGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
…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>.
|
Thank you @babusri for taking the time to write this!
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
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.
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. |
|
Prot,
Thanks for taking the time to write a detailed reply.
btw, I was not aware of your contribution to emacs until one of your videos
popped up on my youtube list.
I started using your modus themes (the dark one). Yesterday, after seeing
one more of your videos, I installed your ef-themes. While I like most of
them, I have made ef-maris-dark my default theme and I have
(setq ef-themes-to-toggle '(ef-maris-dark ef-elea-light))
The intense background for the bg and fg regions makes regions stand out,
which is nice.
Thanks for all your contributions to emacs, your detailed documentation,
attention to detail, and your videos.
Babu
Babu
Babu
…On Fri, Dec 22, 2023 at 10:30 AM Protesilaos Stavrou < ***@***.***> wrote:
Thank you @babusri <https://github.com/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
<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.
—
Reply to this email directly, view it on GitHub
<#204 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACOXAGRGSVYZNGP63AE3FDYKUHWRAVCNFSM6AAAAABAXNTGXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRXGI2DCNZRG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
I am in the process of refining the "rename" commands. Discussion continues here: #247 |
A few questions:
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.
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.
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.
The text was updated successfully, but these errors were encountered: