unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* not-instantly-obvious method to get output of shell command to variable
@ 2014-07-30 22:39 Emanuel Berg
  2014-07-31  4:54 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Emanuel Berg @ 2014-07-30 22:39 UTC (permalink / raw)
  To: help-gnu-emacs

Just wrote this to load the configuration files from
.emacs.

Did spend some (pleasant) time getting the output of
the shell (zsh) command "ls" into the variable `files'
(check it out).

Perhaps that is yet another thing to add for everyone
to use from the holster?

I agree silly configuration and cool hacks shouldn't be
added (unless they are really cool) but such basic
building blocks are great. It boosts creativity if
people don't have to get stuck on details all the time
when they want to do creative stuff.

(let ((files (with-temp-buffer
               (call-process-shell-command
                "ls ~/.emacs.d/emacs-init/**/*.elc ~/.emacs-no-bc"
                nil ; no INFILE
                t)  ; BUFFER (t = current buffer, i.e. the temp one)
               (buffer-substring (point-min) (point-max)) )))
  (dolist (f (split-string files)) (load-file f)) )
  
-- 
underground experts united


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

end of thread, other threads:[~2014-07-31 20:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30 22:39 not-instantly-obvious method to get output of shell command to variable Emanuel Berg
2014-07-31  4:54 ` Eli Zaretskii
2014-07-31  8:28 ` Nicolas Richard
     [not found] ` <mailman.6325.1406795217.1147.help-gnu-emacs@gnu.org>
2014-07-31 20:14   ` Emanuel Berg

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