all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Steven Arntson <steven@stevenarntson.com>
To: help-gnu-emacs@gnu.org
Subject: Re: using "variables" (correct term?)
Date: Thu, 05 Feb 2015 18:10:59 -0800	[thread overview]
Message-ID: <87wq3vssb0.fsf@stevenarntson.com> (raw)
In-Reply-To: 87r3u4jb9f.fsf@yahoo.fr

Nicolas Richard <theonewiththeevillook@yahoo.fr> 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





  reply	other threads:[~2015-02-06  2:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 18:34 using "variables" (correct term?) Steven Arntson
2015-02-05 18:38 ` Andreas Politz
2015-02-05 19:01   ` Steven Arntson
2015-02-05 21:31 ` Nicolas Richard
2015-02-06  2:10   ` Steven Arntson [this message]
     [not found] <mailman.19347.1423161313.1147.help-gnu-emacs@gnu.org>
2015-02-05 20:07 ` Barry Margolin

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

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

  git send-email \
    --in-reply-to=87wq3vssb0.fsf@stevenarntson.com \
    --to=steven@stevenarntson.com \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.