yibie / org-zettel-ref-mode

org-zettel-ref-mode: A Zettelkasten-style literature note tool that automatically extracts annotations and summaries from the original text, presenting them in an overview window.
19 stars 1 forks source link

M-x org-zettel-ref-init reports error #8

Open jason--liu opened 13 hours ago

jason--liu commented 13 hours ago

env

emacs 28.1
Ubuntu 20.04

my config

    (add-to-list 'load-path "~/.spacemacs.d/site-lisp/org-zettel-ref-mode")
    (require 'org-zettel-ref-mode)
    (setq org-zettel-ref-debug t)
    (setq org-zettel-ref-mode-type 'normal)
    (setq org-zettel-ref-overview-directory "~/org")

error log

Debug: Entering org-zettel-ref-init
Debug: source-buffer = #<buffer journal.org>
let: Wrong number of arguments: ((t) (file-path content source-file) "Create a normal overview file at FILE-PATH with CONTENT and SOURCE-FILE property." (if (file-exists-p file-path) nil (let ((temp-file file-path) (temp-buffer (generate-new-buffer " *temp file*" t))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert (format "#+SOURCE_FILE: %s
" source-file)) (insert (cdr content))) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))), 1
yibie commented 13 hours ago

收到,最重要的是知道你用什么模式。 我用同样的模式看看能不能复现。

jason--liu commented 12 hours ago

模式是指什么,org用的是原生Org,笔记包也是原生org

yibie commented 10 hours ago

@jason--liu 已经更新,修复了问题。麻烦测试一下看看。

jason--liu commented 9 hours ago

前面那个报错没有了,另外我发现一个偶现问题,就是quick markup后,即使sync后右边概览窗口也没有刚才markup的笔记 可以看下面的GIF。 Peek 2024-09-19 16-14

# Saved readme.org
Debug: Found existing overview file: /home/XD/org/readme-overview.org
Debug: Starting sync for overview file: /home/XD/org/readme-overview.org
Quick notes insertion completed successfully
Saving file /home/XD/org/readme-overview.org...
Wrote /home/XD/org/readme-overview.org
Debug: Sync completed successfully
yibie commented 9 hours ago

Get。我先尝试能不能复现。可否多 mark up 几次,用不同的样式,看看这个问题会重新出现。从错误日志来看,没有检查到错误,很难定位问题。

yibie commented 8 hours ago

我没有复现,用同一个样式 mark up,但无法同步的情况。倒是发现了,斜体 mark up 的内容,无法同步。 估计是正则的问题,晚点弄弄。

jason--liu commented 6 hours ago

这边试了下ItalicStrikethrough 都会遇到无法同步的问题。

yibie commented 4 hours ago

又更新了一版,我本地测试标记文本都可以同步了。