org-screenshot icon indicating copy to clipboard operation
org-screenshot copied to clipboard

Inserting image without polluting PROPERTIES?

Open w3bdev1 opened this issue 4 years ago • 2 comments
trafficstars

I insert image as per the path in org-attach-screenshot-dirfunction.

But after every insertion, it adds following PROPERTIES under the heading,

:PROPERTIES:
:ATTACH_DIR: ../_resources
:END:

... which seems unnecessary and polluting in my opinion. Is there a way to avoid it?

Btw this plugin is very helpful. Thanks for making it.

w3bdev1 avatar Jul 17 '21 11:07 w3bdev1

Sorry for answering so late. I had had a short look at that time, but then got sidetracked... This separate entry is triggered by this line in the code.

(org-entry-put nil "ATTACH_DIR" funcdir)

The property is only inserted in the section if it is not yet set within the current context, e.g. by an inherited entry from the above section or from a global settting. In my own documents I always use (actually I generate it through yast) a setting in the header that configures the same path as my user function...

#+PROPERTY: ATTACH_DIR /tmp/test-att

I could introduce a switch variable for you where one could configure whether the Property should be put into the section for the normal case or not. That probably would be a clean solution.

dfeich avatar Aug 13 '21 07:08 dfeich

Yeah a switch variable will be solution. Thanks

w3bdev1 avatar Sep 26 '21 09:09 w3bdev1