From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ahmed Fasih 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 Message-ID: Reply-To: wuzzyview@gmail.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3079bdfce86da804e13dd324 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxIYE-0004Xn-AS for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 11:13:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxIY8-0004uc-6h for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 11:12:58 -0400 Received: from mail-vb0-x229.google.com ([2607:f8b0:400c:c02::229]:58741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxIY8-0004uW-34 for emacs-orgmode@gnu.org; Thu, 11 Jul 2013 11:12:52 -0400 Received: by mail-vb0-f41.google.com with SMTP id p13so643484vbe.14 for ; Thu, 11 Jul 2013 08:12:51 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --20cf3079bdfce86da804e13dd324 Content-Type: text/plain; charset=ISO-8859-1 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 --20cf3079bdfce86da804e13dd324 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am enjoying literate programming with org-mode. I'd like to solicit a= dvice on good ways to go about making one of my favorite emacs keycombinati= ons, M-/ (dabbrev-expand), work with literate programming in org-mode.=A0
The setup: I have a code block in which a variable name is u= sed. 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 =3Dequal sign= =3D markup. The starting =3D prevents M-/ from matching the first few chara= cters of the variable name. Example:

#+BEGIN_SRC python
my_cool_variable =3D 42
#+END_SRC

I'd like to now type "= =3Dmy" and have M-/ be smart enough to consider "my_cool_variable= " and complete it to "=3Dmy_cool_variable=3D".

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 numbe= r of things for the least number of people. Many thanks,
Ahmed --20cf3079bdfce86da804e13dd324--