I am planning to insert screenshot in org-capture buffer.
I have a function that can create a screenshot image in a images
subdirectory of current directory. However, since the org-capture buffer is an indirect buffer, the buffer-file-name
result is nil, it can not create the subdirectory directly.
So how can I get the original buffer path in org-template, save the screenshot in the images
, and insert it to the org-capture buffer?
Of course, I can just finalize the org-capture buffer, go to the save place, and call screenshot function there. But it is kind of cumbersome, which i do not like very much. Please give me some hint if you have some idea. Thanks very much.
(buffer-name)
instead ofbuffer-file-name
?