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 recommended workflow for deleting a card (or set of cards)? #104

Open
PaddyPatPat opened this issue Jan 9, 2023 · 2 comments

Comments

@PaddyPatPat
Copy link

As my card writing skills improve, I'm realising that I would like to delete some cards out of my Emacs/Anki system. I see lots written about card creation. What is the recommended method for deleting a card?

Do I Browse my Anki deck and use the Sort Field to find all versions (eg clozes) of that card. Delete those and then delete the corresponding entry in my Emacs org-mode files?

Is there a cleaner way that I'm missing, perhaps all done from Emacs?

@orgtre
Copy link

orgtre commented Jan 9, 2023

Hi, what you describe is the only way to do it with this version of anki-editor. Note that there is a toggle next to the search field in the Anki browser which allows you to toggle on browsing by notes (instead of cards); with this it might be a bit easier.

However, in my fork of anki-editor, github.com/orgtre/anki-editor, I've added a anki-editor-delete-note-at-point command. By default it just deletes the note at point from Anki (only removing the ANKI_NOTE_ID in Org), but with a C-u prefix it also deletes the note in the Emacs Org-mode file. If there is demand it would be quite easy to extend this function to sets of notes too.

To make the process of managing notes from Org mode a bit easier, I've also created a transient interface which includes the delete note command. It would be great if more people tried it out!

Finally, to find the note you want to delete, you can of course use any of the Emacs search commands that you'd otherwise use to find stuff. However, if you want a custom search just for Anki notes, you could use my Org custom completions package, github.com/orgtre/org-cc. In that repos example section I explain how one can set it up to work with anki-editor notes. Please let me know if you encounter any problems!

@PaddyPatPat
Copy link
Author

Oh gosh. Yes, sure I now use straight.el. It looks very clever. Thanks for the nudge.

anki-editor-delete-note-at-point works wonderfully thank you! Using it while passing C-u is great so that I know that the source of truth remains Emacs. I'm happy to delete notes individually at the moment. They are mostly clozes with a dozen gaps/"multiple fields" which I have found to be very ineffective for learning. Easy to make. Wrong to study.

I have installed the transient editor (straight.el really is nice) and it seems to work well! I will keep playing with it. It seems like such an obvious thing to have now that I see it.

I'm yet to get my head around org-cc. I think that perhaps it is a different way to think about what I was imagining more as an org-show-todo-tree-style sparse tree, but for Anki notes. I guess one difference would be that org-cc can look across multiple files rather than just showing the current one.

Thank you so much!

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