Re: Using environment variables in path names
Martin Svenson <phromo <at> gmail.com>
2010-11-02 21:07:27 GMT
np! If I had thought before writing my mail, I would also have mentioned the backquote:
(setq muse-project-alist
`("website" ,muse-path))
The backquote means that everything is quoted EXCEPT symbols preceded with comma. See http://cl-cookbook.sourceforge.net/macros.html and the section on backquote and you'll have a much cleaner looking setq.
On Tue, Nov 2, 2010 at 10:01 PM, Peter Davis
<pfd <at> pfdstudio.com> wrote:
Excellent! Thank you, Martin.
I'm not much of a lisp maven (yet). I was just trying to cobble something from examples I found in the Muse doc, though obviously there are subtleties that I missed.
Thanks!
-pd
On Tue, Nov 2, 2010 at 4:49 PM, Martin Svenson
<phromo <at> gmail.com> wrote:
The problem is that you're quoting (using the shorthand ') your variables, which means they will appear as symbols in your list and not be substituted.
Compare this:
(setq muse-project-alist
(list
'("website" ; my various writings
("~/Pages" :default "index")
(:base "html" :path "~/public_html")
(:base "pdf" :path "~/public_html/pdf"))
(list "Info"
(list muse-path :default "index")
(list :base "html" :path (concat muse-path "\\HTML")))))
If you want a nicer muse-define-project syntax, write a method or play around with a macro :)
// Martin
I'm trying to set up Muse so that my projects (and ultimately my emacs setup files) live in a Dropbox folder. I've set an environment variable, DROPBOX, to where the folder is mounted on my Win7 system. However, I can't publish my projects. My emacs init.el contains:
(setq drop-box (getenv "DROPBOX"))
(setq muse-path (concat drop-box "\\Muse"))
(setq load-path (add-to-list 'load-path "~/emacsdir/muse/lisp"))
(require 'muse-mode)
(require 'muse-html)
(require 'muse-latex)
(require 'muse-project)
(setq muse-project-alist
'(("website" ; my various writings
("~/Pages" :default "index")
(:base "html" :path "~/public_html")
(:base "pdf" :path "~/public_html/pdf"))
("Info"
(muse-path :default "index")
(:base "html" :path (concat muse-path "\\HTML"))
)))
But when I try to C-c C-p, I get:
Assertion failed: (file-name-directory path)
Any clues about what I'm doing wrong, or how to fix it?
Thank you!
-pd
_______________________________________________
Muse-el-discuss mailing list
Muse-el-discuss <at> gna.org
https://mail.gna.org/listinfo/muse-el-discuss
<div>
<p>np! If I had thought before writing my mail, I would also have mentioned the backquote:<br><br>(setq muse-project-alist<br> `("website" ,muse-path))<br><br>The backquote means that everything is quoted EXCEPT symbols preceded with comma. See <a href="http://cl-cookbook.sourceforge.net/macros.html">http://cl-cookbook.sourceforge.net/macros.html</a> and the section on backquote and you'll have a much cleaner looking setq.<br><br></p>
<div class="gmail_quote">On Tue, Nov 2, 2010 at 10:01 PM, Peter Davis <span dir="ltr"><<a href="mailto:pfd <at> pfdstudio.com">pfd <at> pfdstudio.com</a>></span> wrote:<br><blockquote class="gmail_quote">
<div><br></div>
<div>Excellent! Thank you, Martin.</div>
<div><br></div>
<div>I'm not much of a lisp maven (yet). I was just trying to cobble something from examples I found in the Muse doc, though obviously there are subtleties that I missed.</div>
<div><br></div>
<div>Thanks!</div>
<div><br></div>
<div>-pd</div>
<div>
<div></div>
<div class="h5">
<div><br></div>
<br><div class="gmail_quote">On Tue, Nov 2, 2010 at 4:49 PM, Martin Svenson <span dir="ltr"><<a href="mailto:phromo <at> gmail.com" target="_blank">phromo <at> gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote">The problem is that you're quoting (using the shorthand ') your variables, which means they will appear as symbols in your list and not be substituted.<br><br>Compare this:<br><br>(setq muse-project-alist<br> (list<div>
<br>
'("website" ; my various writings<br> ("~/Pages" :default "index")<br> (:base "html" :path "~/public_html")<br> (:base "pdf" :path "~/public_html/pdf"))<br>
</div>
(list "Info"<br> (list muse-path :default "index")<br> (list :base "html" :path (concat muse-path "\\HTML")))))<br><br>If you want a nicer muse-define-project syntax, write a method or play around with a macro :)<br><br>// Martin<br><br><div class="gmail_quote">
<div>
<div></div>
<div>On Tue, Nov 2, 2010 at 7:30 PM, Peter Davis <span dir="ltr"><<a href="mailto:pfd <at> pfdstudio.com" target="_blank">pfd <at> pfdstudio.com</a>></span> wrote:<br>
</div>
</div>
<blockquote class="gmail_quote"><div>
<div></div>
<div>
I'm trying to set up Muse so that my projects (and ultimately my emacs setup files) live in a Dropbox folder. I've set an environment variable, DROPBOX, to where the folder is mounted on my Win7 system. However, I can't publish my projects. My emacs init.el contains:<br><br>
(setq drop-box (getenv "DROPBOX"))<br>
(setq muse-path (concat drop-box "\\Muse"))<br>
(setq load-path (add-to-list 'load-path "~/emacsdir/muse/lisp"))<br>
(require 'muse-mode)<br>
(require 'muse-html)<br>
(require 'muse-latex)<br>
(require 'muse-project)<br>
(setq muse-project-alist<br>
'(("website" ; my various writings<br>
("~/Pages" :default "index")<br>
(:base "html" :path "~/public_html")<br>
(:base "pdf" :path "~/public_html/pdf"))<br>
("Info"<br>
(muse-path :default "index")<br>
(:base "html" :path (concat muse-path "\\HTML"))<br>
)))<br><br>
But when I try to C-c C-p, I get:<br><br>
Assertion failed: (file-name-directory path)<br><br><br>
Any clues about what I'm doing wrong, or how to fix it?<br><br>
Thank you!<br><br>
-pd<br>
</div>
</div></blockquote>
</div>
</blockquote>
<div><br></div>
<div><br></div>
</div>
</div>
</div>
<br>_______________________________________________<br>
Muse-el-discuss mailing list<br><a href="mailto:Muse-el-discuss <at> gna.org">Muse-el-discuss <at> gna.org</a><br><a href="https://mail.gna.org/listinfo/muse-el-discuss" target="_blank">https://mail.gna.org/listinfo/muse-el-discuss</a><br><br>
</blockquote>
</div>
<br>
</div>