Closed jhenahan closed 5 years ago
Hi! Sorry for the very late reply. I'm no objed
user myself (even though I think it looks interesting). I looked at its code and it seems like objed-word-object
(and other objects) are defined with a macro named objed-define-object
. The way RYO works, when modifying commands (adding names, etc), is that it creates a new command and in its definition use call-interactively
to call the original command. In this case the original command is objed-word-object
.
I tried objed
and tried to used M-x eval-expression
with (call-interactively 'objed-word-object)
, but that did nothing. @clemera Do you know why call-interactively
doesn't work with objed objects?
@Kungsgeten You would have to adjust the value of real-this-command
. This is to guard against accidental activation internally. You could do:
(let ((real-this-command 'objed-word-object))
(call-interactively 'objed-word-object))
@clemera Thanks! I've updated so that real-this-command
is set before calling interactively. Hopefully this doesn't break anything else ;)
Awesome! I'll give it a look and see if that gets me any further. Thanks!
If there are further problems integrating with objed let me know, I'm glad to help!
Not totally sure where to go looking for this one, as it's quite strange.
I've recently been trying to port my existing RYO bindings for
expand-region
to useobjed
.The following work:
But if I add
:name
on either of those bindings, all the docstrings are right but the key does nothing. I can't for the life of me figure out why. Any ideas?