2018ko maiatzak 1an, Göktuğ Kayaalp-ek idatzi zuen: [...]
>> The approach that should be taken should be to use a header argument to >> specify an alist of variables and values to set in src block edit buffers. >> Then the usual methods (info "(org) Using header arguments") could be used >> to control the feature globally, per-buffer, per-language, per-subtree, >> and per-individual source block. > > I agree. But note that what I want to do is to set some buffer local > variables in the special block editing buffer. The header argument > ":lexical yes" seems to not affect the editing buffer Thinking about it some more, lexical binding is not a good case for this feature, since it has to be set not only in the edit buffer, but also when C-c C-c is used in the org-mode buffer to evaluate the src block. The :lexical header arg (which I did not know about) works for the latter but not the former. To complete the picture, Someone™ needs to implement a org-babel-edit-prep:emacs-lisp function which looks for :lexical yes in the header arguments and sets the value in the edit buffer appropriately. If lexical-binding is the major motivating factor, then maybe the above is enough. My original suggestion was for something like: #+begin_src emacs-lisp :edit-vars ((fill-column 72) (other-var other-val)) ... #+end_src This would set the variables in the edit buffer in the (hopefully) obvious way. It is not implemented yet, though. Aaron PS Itʼs best to use “reply all” and include the org mode mailing list in replies, to make sure everyone following the thread sees all the messages. -- Aaron Ecay