]> git.eshelyaron.com Git - emacs.git/commit
Don't create directory in erc-truncate compat check
authorF. Jason Park <jp@neverwas.me>
Mon, 30 Sep 2024 09:10:02 +0000 (02:10 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 14 Oct 2024 17:38:31 +0000 (19:38 +0200)
commit7fde7a6b18076e57d20df69910fbbc6f93d66514
tree344f8181b6fc17354ced8abe40c16dff55e5dc0d
parenta6b1d8c9cfee4953adeed0450fc4442730e0e55d
Don't create directory in erc-truncate compat check

* lisp/erc/erc-log.el (erc-log--check-writable-nocreate-p): New variable.
(erc-logging-enabled): Use `erc-log--save-in-progress-p' flag to
conditionally avoid creating a directory when checking if the location
is writable.
(erc-log--call-when-logging-enabled-sans-module)
(erc-log--check-legacy-implicit-enabling-by-truncate): Rename former to
latter, and guard against creating a ~/log directory just to see if it's
writable when calling `erc-logging-enabled'.
(erc-truncate-mode): Explain legacy "implicit logging" behavior in doc
string.
* lisp/erc/erc-truncate.el (erc-truncate--warn-about-logging): Make more
concise, and defer to `erc-truncate-mode' doc string for particulars.
* lisp/erc/erc.el (erc-directory-writable-p): Add comment to rename on
next non-patch release.

(cherry picked from commit 1de2c86317356dbbf5e7f935d3889b2698bc30f6)
lisp/erc/erc-log.el
lisp/erc/erc-truncate.el
lisp/erc/erc.el