Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not remove the temp file when finished ? #84

Open
Yevgnen opened this issue Nov 17, 2016 · 6 comments
Open

Why not remove the temp file when finished ? #84

Yevgnen opened this issue Nov 17, 2016 · 6 comments
Labels

Comments

@Yevgnen
Copy link

Yevgnen commented Nov 17, 2016

Every time I run quickrun, the temp file is left there. Is there any specified reason for keeping these files ?
quickrun.el

@syohex
Copy link
Contributor

syohex commented Nov 20, 2016

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.

@Yevgnen
Copy link
Author

Yevgnen commented Nov 20, 2016

Thanks for your reply. Looking in the code, the file is removed only when has error.

@fu123456
Copy link

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.

@jcs090218
Copy link
Collaborator

Looking in the code, the file is removed only when has error.

I think this is the issue. Mark it with bug label.

@jcs090218 jcs090218 added the bug label Oct 22, 2020
@shishimaru
Copy link

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.

@zw963
Copy link

zw963 commented Mar 16, 2024

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))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

6 participants