emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Best way to let M-/ (dabbrev-expand) work for with code variables in prose via the =code= notation
@ 2013-07-11 15:12 Ahmed Fasih
  0 siblings, 0 replies; only message in thread
From: Ahmed Fasih @ 2013-07-11 15:12 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1079 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-11 15:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-11 15:12 Best way to let M-/ (dabbrev-expand) work for with code variables in prose via the =code= notation Ahmed Fasih

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).