From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steven Arntson Newsgroups: gmane.emacs.help Subject: Re: using "variables" (correct term?) Date: Thu, 05 Feb 2015 18:10:59 -0800 Message-ID: <87wq3vssb0.fsf@stevenarntson.com> References: <87egq41a29.fsf@stevenarntson.com> <87r3u4jb9f.fsf@yahoo.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423188683 25621 80.91.229.3 (6 Feb 2015 02:11:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Feb 2015 02:11:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 06 03:11:22 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YJYOA-0002dz-3f for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Feb 2015 03:11:22 +0100 Original-Received: from localhost ([::1]:46342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJYO9-0000M1-FX for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Feb 2015 21:11:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJYNy-0000LK-Oc for help-gnu-emacs@gnu.org; Thu, 05 Feb 2015 21:11:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJYNv-0001J2-I4 for help-gnu-emacs@gnu.org; Thu, 05 Feb 2015 21:11:10 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJYNv-0001IQ-Au for help-gnu-emacs@gnu.org; Thu, 05 Feb 2015 21:11:07 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YJYNs-0002XW-RW for help-gnu-emacs@gnu.org; Fri, 06 Feb 2015 03:11:05 +0100 Original-Received: from 104.244.220.59 ([104.244.220.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Feb 2015 03:11:04 +0100 Original-Received: from steven by 104.244.220.59 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Feb 2015 03:11:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 104.244.220.59 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:MpGlk5qbxBh+zkrLHYGP/XXneyY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102521 Archived-At: Nicolas Richard writes: >> I'm trying to send out some form letters to various people, and am >> looking for a way to define something at the top, like: >> >> #+RECIPIENT: Jane Doe >> >> which would automatically replace itself in the letter when referenced >> with "RECIPIENT". Is this called a "variable"? How would I go about >> doing it? I'm using org-mode, but the solution needn't be org-based. > > Org somehow re-invented file local variables with its own syntax and > parsing. That's what most of these #+FOO: lines are. But they are not > arbitrary, so I don't think you can't use RECIPIENT (I didn't test). > > OTOH, there is a feature called "macro" which are, again, specific to Org: > (info "(org) Macro replacement") > > (they are not macros in the "keyboard macro" sense.) > > HTH, Thanks for this---it does look like org macros are what I was looking for. However, I have heedlessly plunged into Auctex. I found this snippet for a TeX file that does the job also: \newcommand{\commandname}{text to insert} Then just \commandname{} wherever I want the text to go. It will fit my purposes. Best, steven arntson