10

Is there a way to run ielm, but with variables bound to a certain buffer?

I know about M-:, but having a shell like ielm to inspect things would be much easier.

1 Answer 1

14

Hit C-c C-b to select a buffer for IELM to work upon.

4
  • 2
    Thanks. Almost what I want. How about point changing functions though? Is there a way to make them work? (end-of-buffer) for example.
    – ustun
    Dec 3, 2014 at 13:27
  • 3
    Actually, the change is done which you can see by using (progn (end-of-buffer) (point)), however all changes are wrapped in a save-excursion block (among others) that reverts them afterwards.
    – wasamasa
    Dec 3, 2014 at 13:54
  • 1
    Ah, OK, no way to get around then it seems, thanks. My main purpose is just to demo emacs command using ielm, to show how it affects the other buffer.
    – ustun
    Dec 3, 2014 at 14:01
  • You're free to ask on the emacs-devel mailing list or report a bug to find out what exactly the rationale behind this is since commands that unintentionally move point usually restore it themselves using save-excursion. If your discussion leads somewhere, linking to it would be useful.
    – wasamasa
    Dec 3, 2014 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.