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

Cannot change the template/snippet folder #2369

Closed
4 tasks done
joebetsill opened this issue Jul 26, 2024 · 5 comments · Fixed by #2370
Closed
4 tasks done

Cannot change the template/snippet folder #2369

joebetsill opened this issue Jul 26, 2024 · 5 comments · Fixed by #2370
Assignees
Labels
Milestone

Comments

@joebetsill
Copy link

joebetsill commented Jul 26, 2024

⚠️ This issue respects the following points: ⚠️

  • This is a bug. Not a question or feature request.
  • The topic is not already reported at Issues. (I've searched it).
  • Markor is up to date. See Releases for the latest version. Updates are available from F-Droid and GitHub.
  • The bug is still present in the latest development version (git master). (Please download and try the test version of Markor, named Marder. Don't worry; Markor and Marder appear as completely separate applications. You can install both side-by-side, and Markor settings are not touched. In case the issue is resolved there, you don't need to create a bug report. The change will be part of the next Markor update.)

Description

When I go to Settings> Other> Snippet/Template Directory:

  1. The directory shown is always /whatever/path/the/default/notebook/is/set/to/.app/snippets, even though there is no .app/snippets folder at that location. Not even on a fresh install, when it points to the Documents/markor/.app/snippets folder.
  2. The snippets/templates folder cannot be changed. No matter what I select with the folder selection prompt, the folder is still set to the original one, as described in step 1.

As a side note: I'm not sure that I grasp how snippets and templates are expected to work, and maybe that's part of my problem. I am trying to select my Obsidian template folder as the Markor template folder, with the idea that my Obsidian templates would show up in the new file prompt under templates in Markor.

Edit: I made a backup of my settings and checked the resulting file, and it shows the correct (what I previously selected) folder location for pref_key__snippet_directory_path.

Steps to reproduce

  1. See the description field.

Information

Android version: 14
Device: Pixel 8 Pro
App Version: 2.12.4 (153)

Source

GitHub Releases

Format / File type

Not specific

Additional info / Log

-
@gsantner
Copy link
Owner

gsantner commented Jul 26, 2024 via email

@joebetsill
Copy link
Author

joebetsill commented Jul 26, 2024 via email

@gsantner
Copy link
Owner

Normal text files also here, no special things. The snippets should then show up listed by their filenames

@joebetsill
Copy link
Author

For the rest, can you try creating the folders with .app/snippets yourself and check if it works then?

This does work. Markdown files placed in the manually created .app/snippets folder show up in the templates drop-down in the new file prompt.

Do you think allowing to choose any folder for template and snippets could be added, instead of making a hard requirement for it to terminate in .app/snippets?

@joebetsill
Copy link
Author

joebetsill commented Jul 26, 2024

It seems like line 130 of /model/AppSettings.java incorrectly references pref_key__quicknote_filepath and since that's a file, it always fails the subsequent check to ensure the snippets directory is a directory, which then sets it back to default.

gsantner pushed a commit that referenced this issue Jul 27, 2024
…kitext newfile #2362, virtual directory browser #2350) (PR #2370 by @hardhard1)

* Jump by a line identifier, not by id
* For all nodes, use eval
* Fixed bad key in snippet directory setting
* Fix virtual folders and wikitext underscores
@gsantner gsantner added this to the Markor v2.13 milestone Jul 27, 2024
@gsantner gsantner added the bug label Jul 27, 2024
elyahw pushed a commit to writing-tools/marelias-notepad that referenced this issue Sep 26, 2024
…santner#2369, wikitext newfile gsantner#2362, virtual directory browser gsantner#2350) (PR gsantner#2370 by @hardhard1)

* Jump by a line identifier, not by id
* For all nodes, use eval
* Fixed bad key in snippet directory setting
* Fix virtual folders and wikitext underscores

(cherry picked from commit 57aaf0f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants