ISouthRain <isouthr...@qq.com> writes: > Example: > test.el: > ;; All code > (add-hook 'org-mode-hook '(lambda () > (setq-local org-yank-image-save-method (format > "./attach/%s/" (file-name-nondirectory buffer-file-name))))) > ;; End > > Start test emacs: > emacs -q -l test.el > M-x org-capture RET t > Message out: Capture abort: Wrong type argument: stringp, nil > > But My friend tested it on a Linux system with no problems.
This is because org-capture creates a non-file org-mode buffer, where your code errs. Not a bug in org-mode. Canceled. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>