emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ahmed Fasih <wuzzyview@gmail.com>
To: emacs-orgmode@gnu.org
Subject: 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	[thread overview]
Message-ID: <CAN3TgMpaiPmbrnMFOLQu5pErsZcP19AbD5ppNejiRdJ98atoJQ@mail.gmail.com> (raw)

[-- 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 --]

                 reply	other threads:[~2013-07-11 15:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN3TgMpaiPmbrnMFOLQu5pErsZcP19AbD5ppNejiRdJ98atoJQ@mail.gmail.com \
    --to=wuzzyview@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).