* using "variables" (correct term?)
@ 2015-02-05 18:34 Steven Arntson
2015-02-05 18:38 ` Andreas Politz
2015-02-05 21:31 ` Nicolas Richard
0 siblings, 2 replies; 6+ messages in thread
From: Steven Arntson @ 2015-02-05 18:34 UTC (permalink / raw)
To: help-gnu-emacs
Perhaps what I'm really searching for here is just the correct term,
because I don't think it's "variables."
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.
Ever-a-newbie,
Steven Arntson
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using "variables" (correct term?)
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
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Politz @ 2015-02-05 18:38 UTC (permalink / raw)
To: Steven Arntson; +Cc: help-gnu-emacs
Steven Arntson <steven@stevenarntson.com> 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
I think this would rather be called a macro, since a variable denotes a
place in memory.
-ap
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using "variables" (correct term?)
2015-02-05 18:38 ` Andreas Politz
@ 2015-02-05 19:01 ` Steven Arntson
0 siblings, 0 replies; 6+ messages in thread
From: Steven Arntson @ 2015-02-05 19:01 UTC (permalink / raw)
To: help-gnu-emacs
Andreas Politz <politza@hochschule-trier.de> writes:
> Steven Arntson <steven@stevenarntson.com> 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
>
> I think this would rather be called a macro, since a variable denotes a
> place in memory.
>
> -ap
Searching on "emacs macros" leads me to information on the kind
of macro you "record" with `C-x (' in order to reproduce a series of
keystrokes.
For the moment, I'm looking into Auctex as perhaps a way of leveraging
Latex for this. I've always avoided Latex because of its learning
curve, but perhaps this will be the thing that finally propels me!
-steven
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using "variables" (correct term?)
2015-02-05 18:34 using "variables" (correct term?) Steven Arntson
2015-02-05 18:38 ` Andreas Politz
@ 2015-02-05 21:31 ` Nicolas Richard
2015-02-06 2:10 ` Steven Arntson
1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Richard @ 2015-02-05 21:31 UTC (permalink / raw)
To: Steven Arntson; +Cc: help-gnu-emacs
Steven Arntson <steven@stevenarntson.com> writes:
> Perhaps what I'm really searching for here is just the correct term,
> because I don't think it's "variables."
>
> 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,
--
Nicolas Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: using "variables" (correct term?)
2015-02-05 21:31 ` Nicolas Richard
@ 2015-02-06 2:10 ` Steven Arntson
0 siblings, 0 replies; 6+ messages in thread
From: Steven Arntson @ 2015-02-06 2:10 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.19347.1423161313.1147.help-gnu-emacs@gnu.org>]
* Re: using "variables" (correct term?)
[not found] <mailman.19347.1423161313.1147.help-gnu-emacs@gnu.org>
@ 2015-02-05 20:07 ` Barry Margolin
0 siblings, 0 replies; 6+ messages in thread
From: Barry Margolin @ 2015-02-05 20:07 UTC (permalink / raw)
To: help-gnu-emacs
In article <mailman.19347.1423161313.1147.help-gnu-emacs@gnu.org>,
Steven Arntson <steven@stevenarntson.com> wrote:
> Perhaps what I'm really searching for here is just the correct term,
> because I don't think it's "variables."
>
> 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.
>
> Ever-a-newbie,
> Steven Arntson
This is generally called "mail merge" or "templates".
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-02-06 2:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[not found] <mailman.19347.1423161313.1147.help-gnu-emacs@gnu.org>
2015-02-05 20:07 ` Barry Margolin
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).