You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-13Lines changed: 5 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,28 +80,20 @@ Here's the code to do this:
80
80
```
81
81
-`pathaction-after-create-buffer-hook`: This hook is executed after the pathaction buffer is created. It runs from within the pathaction buffer, enabling further customization or actions once the buffer is available.
82
82
83
-
## Preventing save-some-buffers from asking the user if they really want to save the current buffer
83
+
## Saving all buffers before executing pathaction
84
84
85
-
By default, `pathaction-before-run-hook`triggers `save-some-buffers` to ensure that all buffers are saved before executing actions or commands that impact the current buffer or any other buffer being edited.
85
+
By default, `pathaction-before-run-hook`only calls a function to save the current buffer before executing actions or commands that affect the current or any other edited buffer.
86
86
87
-
By default, `save-some-buffers` requests user confirmation.
88
-
89
-
To disable the confirmation prompt from `save-some-buffers`, use the following configuration:
87
+
To make `pathaction` save all buffers, use the following configuration:
90
88
```emacs-lisp
91
89
(defun my-save-some-buffers ()
92
90
"Prevent `save-some-buffers' from prompting by passing 1 to it."
This will disable all interactive prompts when saving buffers using `save-some-buffers`.
103
-
104
-
**Customizing `save-some-buffers`:** The `save-some-buffers` function can be customized by setting `save-some-buffers-default-predicate` to a predicate function that returns nil for files that should not be automatically saved.
96
+
(If you want to prevent `save-some-buffers` from prompting the user before saving, replace `(save-some-buffers)` with `(save-some-buffers t)`.)
0 commit comments