AndrewCopeland / zettelkasten

Creating notes with the zettelkasten note taking method and storing all notes on github
Apache License 2.0
89 stars 11 forks source link

editing a zettel in Emacs on Ubuntu/WSL #10

Closed TheEditor closed 4 years ago

TheEditor commented 4 years ago

Doing a "./zk my-first" and firing emacs, editing and saving and exiting I get two files. A "blah-my-first.md" and "blah-my-first.md~".

2020 04 11 1150pm

AndrewCopeland commented 4 years ago

It looks related to this issue: https://stackoverflow.com/questions/2680389/how-to-remove-all-files-ending-with-made-by-emacs

emacs is creating this file as a temp file. Whats the content of each of these files? Are they the same? I will push a fix to this right now though.

TheEditor commented 4 years ago

The content is the zettel template, before the edits I make.

Odd, this doesn't happen when I've used emacs for Lisp stuff.

TheEditor commented 4 years ago

Yeah, looking at that SO page you'd think there would be a way to set a flag before entering emacs that would alter that behavior. This is the kind of thing zk shouldn't have to worry about.

AndrewCopeland commented 4 years ago

Yeah it isn't however I added a quick clean up method after running an editor to resolve this issue.

The commit can be found here: https://github.com/AndrewCopeland/zettelkasten/commit/678740eef3e7efbe172d99353fe9d779ab951744

AndrewCopeland commented 4 years ago

I have a feeling this issue might occur with other editors so just removing the file seems to be the appropriate approach.

TheEditor commented 4 years ago

And that did the trick.

AndrewCopeland commented 4 years ago

Fantastic, thanks for all the feedback. I really appreciate it. I will close out this case now.