9

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.

ustun
  • 193
  • 4

1 Answers1

12

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

wasamasa
  • 21,803
  • 1
  • 65
  • 97
  • 1
    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 03 '14 at 13:27
  • 2
    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 03 '14 at 13:54
  • 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 03 '14 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 03 '14 at 14:05