[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Best way to let M-/ (dabbrev-expand) work for with code variables in
From: |
Ahmed Fasih |
Subject: |
[O] Best way to let M-/ (dabbrev-expand) work for with code variables in prose via the =code= notation |
Date: |
Thu, 11 Jul 2013 11:12:51 -0400 |
I am enjoying literate programming with org-mode. I'd like to solicit advice on good ways to go about making one of my favorite emacs keycombinations, M-/ (dabbrev-expand), work with literate programming in org-mode.
The setup: I have a code block in which a variable name is used. Later, outside the code block, I'd like to refer to that variable name, and since it's code, I'd like it to be inside =equal sign= markup. The starting = prevents M-/ from matching the first few characters of the variable name. Example:
#+BEGIN_SRC python
my_cool_variable = 42
#+END_SRC
I'd like to now type "=my" and have M-/ be smart enough to consider "my_cool_variable" and complete it to "=my_cool_variable=".
I can try hacking up something simple-minded to do this but would like some guidance to find a way that will break the least number of things for the least number of people. Many thanks,
Ahmed
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] Best way to let M-/ (dabbrev-expand) work for with code variables in prose via the =code= notation,
Ahmed Fasih <=