yibie/org-zettel-ref-mode

Debuggin: insert quick note

Closed this issue · 2 comments

Ypot commented

When I insert a quick note, I get a debug message. Is this helpful or should I just turn debug mode nil?

Debugger entered--Lisp error: (void-variable err)
(error-message-string err)
(message "Error during synchronization: %s" (error-message-string err))
(error (message "Error during synchronization: %s" (error-message-string err)))
(let* ((source-buffer (or (buffer-base-buffer) (current-buffer))) (overview-file (org-zettel-ref-get-overview-file source-buffer)) (overview-buffer (or (get-buffer org-zettel-ref-current-overview-buffer) (find-file-noselect overview-file)))) (message "Debug: Starting sync for overview file: %s" overview-file) (if (buffer-live-p source-buffer) nil (error "Source buffer is not live")) (if (file-writable-p overview-file) nil (error "Overview file is not writable: %s" overview-file)) (save-current-buffer (set-buffer overview-buffer) (let ((inhibit-read-only t) (source-file-prop (org-zettel-ref-get-source-file-property))) (erase-buffer) (insert (format "#+TITLE: Overview for %s\n" (file-name-base (buffer-file-name source-buffer)))) (if source-file-prop (progn (insert source-file-prop "\n"))) (insert "#+filetags: :overview:\n#+STARTUP: showall\n\n") (insert "* Quick Notes\n\n") (org-zettel-ref-insert-quick-notes source-buffer overview-buffer) (insert "\n* Marked Text\n\n") (org-zettel-ref-insert-marked-text source-buffer overview-buffer) (save-buffer))) (message "Debug: Sync completed successfully") (error (message "Error during synchronization: %s" (error-message-string err))))
(condition-case err (let* ((source-buffer (or (buffer-base-buffer) (current-buffer))) (overview-file (org-zettel-ref-get-overview-file source-buffer)) (overview-buffer (or (get-buffer org-zettel-ref-current-overview-buffer) (find-file-noselect overview-file)))) (message "Debug: Starting sync for overview file: %s" overview-file) (if (buffer-live-p source-buffer) nil (error "Source buffer is not live")) (if (file-writable-p overview-file) nil (error "Overview file is not writable: %s" overview-file)) (save-current-buffer (set-buffer overview-buffer) (let ((inhibit-read-only t) (source-file-prop (org-zettel-ref-get-source-file-property))) (erase-buffer) (insert (format "#+TITLE: Overview for %s\n" (file-name-base (buffer-file-name source-buffer)))) (if source-file-prop (progn (insert source-file-prop "\n"))) (insert "#+filetags: :overview:\n#+STARTUP: showall\n\n") (insert "* Quick Notes\n\n") (org-zettel-ref-insert-quick-notes source-buffer overview-buffer) (insert "\n* Marked Text\n\n") (org-zettel-ref-insert-marked-text source-buffer overview-buffer) (save-buffer))) (message "Debug: Sync completed successfully") (error (message "Error during synchronization: %s" (error-message-string err)))))
org-zettel-ref-sync-overview()
(let* ((source-buffer (current-buffer)) (note-name (read-string "Enter note: "))) (insert (format "<<%s>>" note-name)) (org-zettel-ref-sync-overview))
org-zettel-ref-add-quick-note()
funcall-interactively(org-zettel-ref-add-quick-note)
command-execute(org-zettel-ref-add-quick-note record)
execute-extended-command(nil "org-zettel-ref-add-quick-note" nil)
funcall-interactively(execute-extended-command nil "org-zettel-ref-add-quick-note" nil)
command-execute(execute-extended-command)

Let me see, please wait.

And I want you tell me your emacs version, and what command you run.

One more, could you switch to message buffer, and copy the message with "debug"? This will help.

Thank you.

Update package, the bug is fixed.