-
Notifications
You must be signed in to change notification settings - Fork 37
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
RFC auto-save of WIP/drafts #58
Comments
Just putting this here for anyone hacking at this, I was able to accomplish this in my configs. You have to stop atomic chrome from setting (advice-add 'atomic-chrome-send-buffer-text :around (lambda (orig-fun &rest args)
(let ((flag (buffer-modified-p)))
(apply orig-fun args)
(set-buffer-modified-p flag)
)
))
) After you do this if you try to save the buffer you'll be prompted for a filename. I like this personally because then I can choose the project location and file extention at that point. (define-key map (kbd "C-c C-s") 'atomic-chrome-send-buffer-text)
(define-key map (kbd "C-c C-c") 'atomic-chrome-close-current-buffer) My atomic chrome is configured to auto update, so for quick edits I just don't "save", and it works all the same (besides, my modeline reporting modifications). For something more I save the file and choose where and what extenstion. There might be a better way to achieve this but it works great for me, I feel like this should be the default (or at least configurable) If you really want to have a configured directory where your files go, you'd just have to set the visited file name yourself, maybe replacing chars or whatever. (let
((name (s-replace-all '((" " . "_") ("(" . "") (")" . "") ("<" . "") (">" . "")) (buffer-name))))
(set-visited-file-name (f-join "~/some/directory" name))
) however I'd rather just be prompted |
Did I miss anything?
The text was updated successfully, but these errors were encountered: