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

is there a way to skip the "file title" prompt when using the function denote-open-or-create #152

Closed
ustcpxy opened this issue Apr 21, 2023 · 2 comments

Comments

@ustcpxy
Copy link

ustcpxy commented Apr 21, 2023

Hi Prot,

when I use denote-open-or-create function to create a non-exist note, I just expect that denote use my input as the note title directly, instead of requesting the "file title" again.

is there a way to achieve this?

Thanks in advance.

protesilaos added a commit that referenced this issue Apr 21, 2023
Read the doc string of the commands 'denote-open-or-create' or
'denote-link-or-create' for how this is supposed to work.

In short:

- Invoke the "do or create" command.
- Type something that does not match a file.
- In the following title prompt, hit M-p to bring back the last input.

I realised there was a regression here when I read issue 152 on the
GitHub mirror, which was created by user "ustcpxy":
<#152>.  The issue is
about skipping the file title prompt.
@protesilaos
Copy link
Owner

Hello @ustcpxy!

I just pushed a change.

commit 647cbe03b4143a62902467035ddb1a4f9e73cccc
Author: Protesilaos Stavrou <info@protesilaos.com>
Date:   Fri Apr 21 13:12:09 2023 +0300

    Fix regression for M-p in "do or create" commands
    
    Read the doc string of the commands 'denote-open-or-create' or
    'denote-link-or-create' for how this is supposed to work.
    
    In short:
    
    - Invoke the "do or create" command.
    - Type something that does not match a file.
    - In the following title prompt, hit M-p to bring back the last input.
    
    I realised there was a regression here when I read issue 152 on the
    GitHub mirror, which was created by user "ustcpxy":
    <https://github.com/protesilaos/denote/issues/152>.  The issue is
    about skipping the file title prompt.

 denote.el | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

Can you give it a try?

We do not want to skip the title prompt completely because at the initial file prompt we are not necessarily trying to match the title in the required order. For example, with the orderless package we may do test this title which will match this test title. So using M-p at the title prompt gives the user the chance to write the title properly, while reusing what they had already inserted.

@ustcpxy
Copy link
Author

ustcpxy commented Apr 21, 2023

Hello @protesilaos

thank you for your quick reply!
I just tried your fix and it works well as your described.
while using M-p at the title prompt, my last input can be appeared in the minibuffer.

and now I understand why you don't skip the title prompt.

thanks again.

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