Commit graph

156 commits

Author SHA1 Message Date
orgtre
88895abfcd Fix orgtre/anki-editor#16 to make org tags work again
Scanner tags cannot be trusted.
2023-01-05 18:07:07 +01:00
orgtre
abdee78b2e Update intro section of README 2022-11-19 13:01:14 +01:00
orgtre
0f80caa056 Add customization for the format of prepended headings 2022-11-19 11:50:19 +01:00
orgtre
4cb8f0b6bd Only allow enabling anki-editor-mode in org-mode buffers 2022-11-19 11:10:53 +01:00
orgtre
6404abb473 Add ANKI_PREPEND_HEADING property, update toggling
It is retrieved with inheritance and if set takes precedence
over the variable `anki-editor-prepend-heading`.

Also add a function to toggle it and change the behavior
of `anki-editor-toggle-format` to match it: Now every call
to the toggling functions will actually toggle the value in
effect and an entry property is only set if necessary.
2022-11-19 00:45:07 +01:00
Carlos_Mir_de_Souza
e82a4b13bb Update README sections installation, usage, and limitations 2022-11-16 11:42:54 +01:00
orgtre
0928dd6465 Add anki-editor-delete-note-at-point
It improves upon `anki-editor-delete-notes` when deleting note at
point, allowing aribtrary position in the note when calling it,
and also allowing deletion in Org. `anki-editor-delete-notes` is
removed.
2022-11-15 23:59:46 +01:00
orgtre
6ae4420e2a Add transient interface
Create a transient user interface for all anki-editor commands.
See orgtre/anki-editor#13 for discussion.
2022-11-13 19:47:18 +01:00
orgtre
6f40326d2a Add message when syncing AnkiWeb 2022-11-13 19:46:22 +01:00
orgtre
bc7dd603e6 Add keymap for anki-editor-mode
Resolves louietan/anki-editor#79 and allows local binding of,
for example, the transient interface (orgtre/anki-editor#13).
2022-11-13 14:46:27 +01:00
orgtre
42e0121e84 Ensure that anki-editor-gui-browse opens in foreground
This is accomplished by calling guiBrowse twice. Workaround until
https://github.com/FooSoft/anki-connect/issues/357
is resolved.
2022-11-13 13:26:14 +01:00
orgtre
5982dcef69 Expose the 'skip' argument of org-map-entries
It is useful for filtering by deck for example.
2022-11-13 12:32:12 +01:00
orgtre
0ed320d8da Delete obsolete fix-notes-0.3.el 2022-11-03 19:23:10 +01:00
orgtre
080d0f465a Cleanup 2022-11-03 19:18:04 +01:00
orgtre
bbe09ae0ea Introduce a default note type and note creation commands using it
Introduce the ANKI_DEFAULT_NOTE_TYPE property and custom option
`anki-editor-default-note-type` as a fallback. Note creation from
an existing org subtree (using `anki-editor-set-default-note-type`)
or from scratch (using `anki-editor-insert-default-note`) is now
slightly quicker. Also introduce `anki-editor-set-note-type`.
2022-11-03 00:43:34 +01:00
orgtre
311b3564ad Signal 'user-error' instead of 'error' where appropriate
User errors normally do not cause entry to the debugger, but this
can be overrridden by 'debug-ignored-errors'.
2022-11-02 22:08:26 +01:00
orgtre
14ed1ad8bf Update anki-editor-insert-note to the current note structure
The inserted note can now make use of both the heading and the
content before the first subheading for fields. Also try to be
smarter about placement of point.
2022-11-02 21:45:42 +01:00
orgtre
6af1475280 Improve anki-editor-push-note-at-point
Now the note is pushed correctly no matter where in the note point
is when calling the function. Also feedback is clearer.
2022-11-02 17:26:30 +01:00
orgtre
3c1bab3c03 Add option to prepend heading to content before first (sub)heading
Like this, when exactly one field is missing and there is content
before the first (sub)heading, the heading is seen as part of that
content and one can avoid having to duplicate it there. The
content with the prepended heading will be mapped to the missing
field. Notes in Anki and Org can be made to look more similar
without always needing a separate field for the heading.
2022-11-02 12:34:47 +01:00
orgtre
b0ecbbe4ad More informative error message in anki-editor-api-check
Increases user-friendliness, as discussed in orgtre/anki-editor#5.
2022-11-02 11:05:03 +01:00
orgtre
6f5df94102 Map subheadings not matching note field to fields if applicable
Subheadings not matching a note field are considered part of the
content before the first (sub)heading for field matching purposes.
2022-11-01 18:18:11 +01:00
orgtre
bd08644cd4 Refactor anki-editor-note-at-point 2022-11-01 12:51:43 +01:00
orgtre
a6c116b737 Allow empty fields
Implements the fix from leoc/anki-editor#1 as suggested in
orgtre/anki-editor#9. Closes orgtre/anki-editor#7.
2022-10-31 19:12:26 +01:00
orgtre
efe454f642 Update deck for all cards of a note
Update decks as suggested by louietan/anki-editor#85.
ccd7f77322 only updated one card.
2022-10-31 11:50:32 +01:00
orgtre
1f8b222e08 Recognize the same audio types as Anki
Addresses louietan/anki-editor#87.
2022-10-31 08:51:19 +01:00
orgtre
8a085dff84
Merge pull request #2 from cmirdesouza/patch-1
update: README.org
2022-10-18 20:59:39 +02:00
orgtre
0a22948da4
Remove MELPA link from README
Also create a main heading and update the intro, installation, and donation sections.
2022-10-12 18:53:33 +02:00
Carlos_Mir_de_Souza
6a065ec5e5
update: README.org
Example explaining differences with main repository and explaining how to install (MELPA has only the original)
2022-10-11 09:18:00 -03:00
orgtre
ccd7f77322 Allow updating of deck, add support for omitting a field
Also fix some bugs and add `anki-editor-push-note-at-point'.
2022-08-15 16:51:12 +02:00
orgtre
8aa42d9435 Merge branch 'develop' 2021-08-22 15:53:35 +02:00
louie
546774a453 Add donation notice 2020-03-09 23:14:19 +08:00
louie
ff3230f32f Incorporate changes in PR#62 2020-03-09 21:44:18 +08:00
louie
c74e864a64 Use anki-connect version 6 2020-03-09 21:44:18 +08:00
louie
58cad3a287 Add styling utilities 2020-03-09 21:44:18 +08:00
louie
c76166e318 Capture connection error 2020-03-02 21:55:52 +08:00
louie
c47dfade3a Collect notes in one pass 2020-03-02 21:55:50 +08:00
louie
7dcae54caa Allow to put one field in heading 2020-03-02 00:35:55 +08:00
louie
3fba9ea13b Fix byte-compilation warnings 2020-03-02 00:33:47 +08:00
louie
b2cbf48911 Refactor anki-editor--build-fields 2020-03-02 00:33:47 +08:00
louie
e665f2c28f Make latex flavor a list of choices 2020-03-02 00:33:45 +08:00
louie
36b8884b15 Update documentation 2020-02-10 20:57:57 +08:00
louie
1feb3becc3 Reduce duplication in latex functions 2020-02-10 20:57:55 +08:00
louie
df2a90c9b8 Remove the dependency on request.el 2020-02-10 19:51:02 +08:00
louie
0d219e4118 Refactor multi api call 2020-02-10 19:47:49 +08:00
louie
375d6d66d2 Refactor api functions 2020-02-10 19:47:47 +08:00
louie
3c52675134 Compute SHA1 against file content instead of file name 2019-11-11 18:58:00 +08:00
louie
308cd97a9d Add support for exporting field contents literally 2019-11-11 18:58:00 +08:00
louie
5a19baefa9 Update examples 2019-11-11 18:58:00 +08:00
louie
b8f6986ab9 Doc stuff 2019-11-11 18:57:58 +08:00
louie
b6065cd2f7 Add more commands 2019-11-03 20:14:09 +08:00