The file is not deleted when you close Report Designer. rdl.data in the same directory as the report definition file. When you preview the same report again using the same query, parameters, and credentials, Report Designer retrieves the cached copy rather than rerunning the query. I am new to elisp so I do not know if this solution is robust, but it works for me and seems to be more elegant than the one below.When you preview a report, the data for the report is cached to a file on the local computer.
This will delete the default setting for PDF files and instead open them in Evince (and retain everything else included in org-file-apps). emacs: PDFs visited in Org-mode are opened in Evince (and not in the default choice) This can be done by adding the following to your. What you want to do is to alter the list org-file-apps. You can use a construct similar to but adapt it to PDF files and Evince. The others all assume the entry exists in one form or another. The only solution that would not fail if PDFs were removed is your second one.
It also means it won't overwrite your changes.Īdding (if (assoc to the PDF entry won't hurt anything, it will simply ensure that if PDFs are ever removed from the default org-file-apps that it will still be added. Since org-file-apps is a defcustom it won't change the values if you set them before org is loaded, if you build the list from scratch (including default values as in your second (uglier) solution) you could simply setq in your init.el and everything would work. The difference between add-hook and eval-after-load is explained here. If org is already loaded it will evaluate immediately (I mistakenly thought it ran each time a library was loaded, but it seems to be only the first time). (setcdr (assoc "\\.pdf\\'" org-file-apps) "evince %s")))Įval-after-load only evaluates the block when (require 'org) is called. pdf association directly within the alist (setcdr (assoc "\\.txt\\'" org-file-apps) "notepad.exe %s") in a future version of org, use if to avoid errors txt files aren't in the list initially, but in case that changes
The if is only needed for values that aren't in the list by default, just to make sure you don't end up with conflicts somewhere down the line.
It will only set the values once on startup, you won't have to worry about entries being added or not (unless you regularly reload org).Ĭombine that with setcdr and you can avoid having to delete from the list and then re-add, add if and you'll ensure that you either add or change the value. Another possible construct that could work for this would be to use eval-after-load rather than add-hook.