emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Newbie elisp programmer requests a pointer to backtics...
@ 2010-04-14  0:19 Russell L. Carter
  2010-04-14  9:52 ` David Maus
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Russell L. Carter @ 2010-04-14  0:19 UTC (permalink / raw)
  To: emacs-orgmode

Hi there,
Many thanks for org-mode and all of its amazing capabilities.  This elisp
newbie (but fluent in many other languages) has a concrete and simple request:

Where do I find good-enough documentation for the backtics
prefixing the parenthesis and the commas prefixing the associative
list values in the following code (lines of interest prefixed by
"here->", uninteresting lines elided):

(setq observer-base-dir "~/projects/blogs/observer")
(setq observer-blog-dir (concat observer-base-dir "/jekyll/_posts"))
(add-to-list 'org-publish-project-alist
here->         `("observer-blog"
here->         :base-directory ,observer-base-dir
here->         :publishing-directory ,observer-blog-dir
		.
		.
		.
here->	     `("observer" :components ("observer-blog")))

I greatly prefer a pointer to the fundamental docs in lieu of an
explanation here.  I figured these out by mimicking working
code, and they work for me.  But what are these operators|delimiters
actually doing?

I have both the latest versions of the GNU Emacs Lisp Reference Manual
and the Introduction to Programming in Emacs Lisp, sitting before me
and they have been extensively interrogated, as has google.  Yet still
I have to bother the list.  I'm sorry!

Many thanks,
Russell

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Newbie elisp programmer requests a pointer to backtics...
  2010-04-14  0:19 Newbie elisp programmer requests a pointer to backtics Russell L. Carter
@ 2010-04-14  9:52 ` David Maus
  2010-04-14 16:13   ` Russell L. Carter
  2010-04-14  9:58 ` Thomas Jost
  2010-04-14 13:35 ` John Wiegley
  2 siblings, 1 reply; 7+ messages in thread
From: David Maus @ 2010-04-14  9:52 UTC (permalink / raw)
  To: Russell L. Carter; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 695 bytes --]

Russell L. Carter wrote:

>I greatly prefer a pointer to the fundamental docs in lieu of an
>explanation here.  I figured these out by mimicking working code, and
>they work for me.  But what are these operators|delimiters actually
>doing?

>I have both the latest versions of the GNU Emacs Lisp Reference Manual
>and the Introduction to Programming in Emacs Lisp, sitting before me
>and they have been extensively interrogated, as has google.  Yet still
>I have to bother the list.  I'm sorry!

These things are called backquotes, discussed in GNU Emacs Lisp
Reference Manual Section 13.5.

HTH
 -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Newbie elisp programmer requests a pointer to backtics...
  2010-04-14  0:19 Newbie elisp programmer requests a pointer to backtics Russell L. Carter
  2010-04-14  9:52 ` David Maus
@ 2010-04-14  9:58 ` Thomas Jost
  2010-04-14 15:05   ` Dan Davison
  2010-04-14 13:35 ` John Wiegley
  2 siblings, 1 reply; 7+ messages in thread
From: Thomas Jost @ 2010-04-14  9:58 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 612 bytes --]

On Tue, 13 Apr 2010 17:19:46 -0700, "Russell L. Carter" <rcarter@pinyon.org> wrote:
> Where do I find good-enough documentation for the backtics
> prefixing the parenthesis and the commas prefixing the associative
> list values in the following code (lines of interest prefixed by
> "here->", uninteresting lines elided):

Hello,

I had the same question a few months ago. I googled something like "lisp
backquote comma" and found these links:
- http://www.psg.com/~dlamkins/sl/chapter20.html
- http://cl-cookbook.sourceforge.net/macros.html

Hope this helps :)

Regards,

-- 
Thomas/Schnouki

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Newbie elisp programmer requests a pointer to backtics...
  2010-04-14  0:19 Newbie elisp programmer requests a pointer to backtics Russell L. Carter
  2010-04-14  9:52 ` David Maus
  2010-04-14  9:58 ` Thomas Jost
@ 2010-04-14 13:35 ` John Wiegley
  2 siblings, 0 replies; 7+ messages in thread
From: John Wiegley @ 2010-04-14 13:35 UTC (permalink / raw)
  To: Russell L. Carter; +Cc: emacs-orgmode

A back-quoted form is just like a quoted form, except every ,foo is substituted by the evaluation of foo.

  (defvar foo 123)

  `(foo ,foo) => '(foo 123)

They can be nested:

  `(foo `(foo ,,foo))

And lists can be directly interpolated:

  (defvar foo '(123 456))

  `(foo ,foo)  => '(foo (123 456))
  `(foo ,@foo) => '(foo 123 456)

You can do this to see how any form will expand:

  M-: (pp-to-string (macroexpand `(foo ,foo)))

John

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Newbie elisp programmer requests a pointer to backtics...
  2010-04-14  9:58 ` Thomas Jost
@ 2010-04-14 15:05   ` Dan Davison
  2010-04-14 16:31     ` Russell L. Carter
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Davison @ 2010-04-14 15:05 UTC (permalink / raw)
  To: Russell L. Carter; +Cc: emacs-orgmode

Thomas Jost <schnouki@schnouki.net> writes:

> On Tue, 13 Apr 2010 17:19:46 -0700, "Russell L. Carter" <rcarter@pinyon.org> wrote:
>> Where do I find good-enough documentation for the backtics
>> prefixing the parenthesis and the commas prefixing the associative
>> list values in the following code (lines of interest prefixed by
>> "here->", uninteresting lines elided):
>
> Hello,
>
> I had the same question a few months ago. I googled something like "lisp
> backquote comma" and found these links:
> - http://www.psg.com/~dlamkins/sl/chapter20.html
> - http://cl-cookbook.sourceforge.net/macros.html

And for a scarily in-depth tutorial on lisp evaluation and macros (most
of which afaIaw translates fairly directly to elisp)

http://www.paulgraham.com/onlisptext.html

(I have a long way to go with that one...)

Dan

>
> Hope this helps :)
>
> Regards,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Newbie elisp programmer requests a pointer to backtics...
  2010-04-14  9:52 ` David Maus
@ 2010-04-14 16:13   ` Russell L. Carter
  0 siblings, 0 replies; 7+ messages in thread
From: Russell L. Carter @ 2010-04-14 16:13 UTC (permalink / raw)
  Cc: emacs-orgmode



David Maus wrote:
> Russell L. Carter wrote:
> 
>
> These things are called backquotes, discussed in GNU Emacs Lisp
> Reference Manual Section 13.5.

Ah.  Looking at that section, "backquote" instead of "backtic", and
the comma is a "special marker".   Exactly what I needed.

Much obliged,
Russell


> HTH
>  -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Newbie elisp programmer requests a pointer to backtics...
  2010-04-14 15:05   ` Dan Davison
@ 2010-04-14 16:31     ` Russell L. Carter
  0 siblings, 0 replies; 7+ messages in thread
From: Russell L. Carter @ 2010-04-14 16:31 UTC (permalink / raw)
  To: emacs-orgmode



Dan Davison wrote:
> Thomas Jost <schnouki@schnouki.net> writes:
> 

>> I had the same question a few months ago. I googled something like "lisp
>> backquote comma" and found these links:
>> - http://www.psg.com/~dlamkins/sl/chapter20.html
>> - http://cl-cookbook.sourceforge.net/macros.html
> 
> And for a scarily in-depth tutorial on lisp evaluation and macros (most
> of which afaIaw translates fairly directly to elisp)
> 
> http://www.paulgraham.com/onlisptext.html

Thanks all.  Scanning through these they look most excellent.

I have been putting off this day for 20 years, but because of org-mode
I'm now learning elisp.

Best,
Russell


> 
> (I have a long way to go with that one...)
> 
> Dan
> 
>> Hope this helps :)
>>
>> Regards,
> 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-04-14 16:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-14  0:19 Newbie elisp programmer requests a pointer to backtics Russell L. Carter
2010-04-14  9:52 ` David Maus
2010-04-14 16:13   ` Russell L. Carter
2010-04-14  9:58 ` Thomas Jost
2010-04-14 15:05   ` Dan Davison
2010-04-14 16:31     ` Russell L. Carter
2010-04-14 13:35 ` John Wiegley

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).