oantolin / embark

Emacs Mini-Buffer Actions Rooted in Keymaps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run action on region without sending "bounds" as first arg?

unhammer opened this issue · comments

I'm using https://gist.github.com/unhammer/f4a26e7de42cd9600ef9f7318ad0caab to mark org-mode columns and run rectangle-replace within the column. The replacement function needs the the target to be marked, so I added around-action-hooks embark--mark-target, but that means I have to add an unused first argument to the cua-replace-in-rectangle call. Is there a simpler way?

(Or perhaps has someone solved the whole "mark org-table column" problem already?)

I'm not sure I fully understand your problem, but I'd remove the unused argument from the function definition and also add embark--ignore-target to embark-injection-target-hooks for your function.

Let me know if that doesn't solve your problem.

Oh, that does solve it, great!