A year ago, u/vsavchenko announced https://www.reddit.com/r/emacs/comments/wemj1z/writing_emacs_dynamic_modules_in_swift. I had been meaning to try it out for some time. Finally had the chance and it’s really neat!
For example, most of the sharing logic from the experiment in the screen grab is below:
try env.defun(
"macos-module--share",
with: """
Share files in ARG1.
ARG1 must be a vector (not a list) of file paths.
"""
) { (env: Environment, files: [String]) in
let urls = files.map { URL(fileURLWithPath: $0) }
let picker = NSSharingServicePicker(items: urls)
guard let view = NSApp.mainWindow?.contentView else {
return
}
let x = try env.funcall("macos--emacs-point-x") as Int
let y = try env.funcall("macos--emacs-point-y") as Int
let rect = NSRect(
x: x + 15, y: Int(view.bounds.height) - y + 15, width: 1, height: 1
)
picker.show(relativeTo: rect, of: view, preferredEdge: .maxY)
return
}
I can think of two options:
M-x find-dired RET RET RET
(or adjust query): which will list all files recursively in dired. You probably don’t need to copy them elsewhere for renaming. Use M-x dired-toggle-read-only
(or C-x C-q
), rename in-place, and commit (toggle again C-x C-q
). https://xenodium.com/batch-renaming-with-counsel-find-dired-and-wdireddired-subtree
: enables drilling down to multipe subdirectories from the same dired buffer. Expand the subdirectories needing management, and edit like 1. (via C-x C-q
) https://xenodium.com/drill-down-emacs-dired-with-dired-subtreeEdit: markup
Pick any that you like from https://emacsrocks.com. My favourite is https://emacsrocks.com/e13.html well worth watching until the end where it all comes together.