Open Yevgnen opened 7 years ago
Could you show me how to reproduce this issue ? quickrun.el removes temporary file after command is finished. If some unexpected error occurs then temporary file is left.
Thanks for your reply. Looking in the code, the file is removed only when has error.
I also do. How to remove temporary file? When I run the file, it outputs files like qr_*. These termporary files are very noisy to me.
Looking in the code, the file is removed only when has error.
I think this is the issue. Mark it with bug
label.
I was also confused about this issue and found it was derived from quickrun-timeout-seconds.
I set nil to turn off the timeout, but the codes to delete the temporal files weren't reached. If you want to run the subprocess for a long time, I recommend setting a large number with the variable without setting nil.
Consider this issue never fix since 2016, i use my own solution, create a hidden folder on current work directory, then put temp there.
Following code not work, because the command never run again.
(setq quickrun-option-default-directory ".quickrun/")
(defun quickrun--create-option-default-directory ()
(unless (file-directory-p quickrun-option-default-directory)
(make-directory quickrun-option-default-directory)))
(advice-add 'quickrun :before #'quickrun--create-option-default-directory)
;; Then other code
(require 'quickrun)
;; ...
so, i hack following fun let output tmp file hidden.
(require 'quickrun)
(defun quickrun--temp-name (src)
"Not documented."
(let* ((extension (file-name-extension src))
(suffix (or (and extension (concat "." extension)) ""))
(dir (quickrun--default-directory)))
(expand-file-name (concat dir (make-temp-name ".qr_") suffix))))
Every time I run
quickrun
, the temp file is left there. Is there any specified reason for keeping these files ? quickrun.el