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

Page renaming fails if the target directory that does not exist #107

Closed
wasowski opened this issue Oct 25, 2020 · 4 comments
Closed

Page renaming fails if the target directory that does not exist #107

wasowski opened this issue Oct 25, 2020 · 4 comments

Comments

@wasowski
Copy link
Contributor

wasowski commented Oct 25, 2020

wiki#page#rename fails with a generic message Cannot rename if the target directory does not exist. This makes it difficult (or more difficult than need be) to move pages around. At the very least, I think the error message should be more specific, but I am wondering whether the directories should not be created automatically with something like mkdir -p before attempting to move. One possibility is to keep the current behavior of WikiPageRename as is (with a clearer error message) and add WikiePageRename! that would also create folders.

Opinions?

(I created a PR to show a test case demonstrating the problem, and also added a small patch to produce a more informative error message.)

@lervag
Copy link
Owner

lervag commented Oct 27, 2020

Thanks for opening this issue! I think it makes sense to create the directory if it does not exist (at least if we ask first). I'll look into your PR later, I've been very busy working on something on vimtex lately, and there's only so much time... :)

@wasowski
Copy link
Contributor Author

No rush at all. I think the page renaming functionality has still several deficiencies that makes it hard to reorganize your wiki (and messy wiki is really a problem over time). I just started with this tiny issue, because I am also very overloaded, so I am trying to move in the smallest steps possible, and slowly. No rush at all.

@lervag
Copy link
Owner

lervag commented Oct 28, 2020

Thanks. Just as a general remark: I've found it useful to "ignore" the mess in my wiki. Entropy always increases. I try to decrease the entropy whenever I work on a topic, but I find it more important to add my thoughts with low-to-no barrier than to make everything structured and well thought-out. I consider my wiki to be very a very long-term investment and anytime I add or improve features to wiki.vim it increases the value of my wiki. [/ot]

@lervag
Copy link
Owner

lervag commented Oct 28, 2020

Ok, let's move the discussion to #108 to keep things in one thread. I'll respond more thorougly there.

@lervag lervag closed this as completed Oct 28, 2020
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