[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "source" shell commands
From: |
David Kastrup |
Subject: |
Re: "source" shell commands |
Date: |
Sat, 24 Mar 2007 15:35:22 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) |
Tassilo Horn <tassilo@member.fsf.org> writes:
> Matthew Flaschen <matthew.flaschen@gatech.edu> writes:
>
>> Is there an elisp function to "source" a shell file; i.e. an
>> alternative to:
>>
>> (shell-command (concat "source \"" (expand-file-name "~/.rc") "\""))
>
> Sure.
>
> --8<---------------cut here---------------start------------->8---
> (defun mf-source (file)
> (interactive "f")
> (shell-command (concat "source \"" file "\"")))
> --8<---------------cut here---------------end--------------->8---
Quoting is always good for trouble. I'd rather use
(defun mf-source (file)
(interactive "f")
(call-process shell-file-name nil nil nil "source" file))
assuming that you don't care about the output.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- "source" shell commands, Matthew Flaschen, 2007/03/24
- Re: "source" shell commands, Tassilo Horn, 2007/03/24
- Re: "source" shell commands,
David Kastrup <=
- Re: "source" shell commands, Barry Margolin, 2007/03/24
- Re: "source" shell commands, Matthew Flaschen, 2007/03/24
- Re: "source" shell commands, Matthew Flaschen, 2007/03/24
- Re: "source" shell commands, Peter Dyballa, 2007/03/25
- Re: "source" shell commands, Matthew Flaschen, 2007/03/25
- Re: "source" shell commands, Peter Dyballa, 2007/03/25
- Re: "source" shell commands, Matthew Flaschen, 2007/03/25
- Re: "source" shell commands, Peter Dyballa, 2007/03/26
- Re: "source" shell commands, Matthew Flaschen, 2007/03/26
- Message not available
- Re: "source" shell commands, Tim X, 2007/03/25