Skip to content

Extract the remote virtual-Dired guard into a macro#205

Merged
bbatsov merged 1 commit into
masterfrom
dedup-remote-guard
Jul 1, 2026
Merged

Extract the remote virtual-Dired guard into a macro#205
bbatsov merged 1 commit into
masterfrom
dedup-remote-guard

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 1, 2026

Copy link
Copy Markdown
Owner

The three virtual-Dired actions (helm-projectile-dired-files-new-action, -add-action, -delete-action) each opened with the same six-line guard that bails out with a message when the project root is remote and helm-projectile-virtual-dired-remote-enable is nil. Pull it into a helm-projectile--with-virtual-dired macro so the check lives in one place.

Pure refactor. A small test covers the macro's three cases (local, remote-disabled, remote-enabled).

  • The commits are consistent with our contribution guidelines
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog
  • You've updated the readme (no user-facing change)

`helm-projectile-dired-files-new-action', `-add-action' and
`-delete-action' each opened with the same six-line check that bails out
with a message when the project root is remote and virtual Dired is
disabled. Move it into a `helm-projectile--with-virtual-dired' macro so
the guard lives in one place.
@bbatsov bbatsov merged commit 97b042a into master Jul 1, 2026
10 checks passed
@bbatsov bbatsov deleted the dedup-remote-guard branch July 1, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant