emacs-geeknote
emacs-geeknote copied to clipboard
geeknote-command fails when argument to --tags flag is empty
for me at least
the current
(defun geeknote-create-old (title)
"Create a new note with the given title.
TITLE the title of the new note to be created."
(interactive "sName: ")
(message (format "geeknote creating note: %s" title))
(let ((note-title (geeknote--parse-title title))
(note-tags (geeknote--parse-tags title))
(note-notebook (geeknote--parse-notebook title)))
(async-shell-command
(format (concat geeknote-command " create --content WRITE --title %s --tags %s"
(when note-notebook " --notebook %s"))
(shell-quote-argument note-title)
(shell-quote-argument (or note-tags ""))
(shell-quote-argument (or note-notebook ""))))))
fails with
python ~/.emacs.d/opt/geeknote/geeknote/geeknote.py create --content WRITE --title emacs\ vs\ vim --tags '' --notebook ideas: exited abnormally with code 1.
removing --tags seems to work though obviously without the tagging feature
(defun geeknote-create (title)
"Create a new note with the given title.
TITLE the title of the new note to be created."
(interactive "sName: ")
(message (format "geeknote creating note: %s" title))
(let ((note-title (geeknote--parse-title title))
(note-tags (geeknote--parse-tags title))
(note-notebook (geeknote--parse-notebook title)))
(async-shell-command
(format (concat geeknote-command " create --content WRITE --title %s "
(when note-notebook " --notebook %s"))
(shell-quote-argument note-title)
(shell-quote-argument (or note-tags ""))
(shell-quote-argument (or note-notebook ""))))))
macOS Sierra 10.12 geeknote 2.0.11 python 2.7.10