A rough account of what I did with Emacs recently.
(mapcar
(lambda(envstring)
(if (not (string-match "=" envstring))
() ;; there's a stray empty string in here
(setenv
(substring envstring 0 (string-match "=" envstring))
(substring envstring (+ 1 (string-match "=" envstring))))))
(split-string (shell-command-to-string "/bin/bash --login -c env") "[\r\n]+"))
which is a bit unpleasant but does the job. So now I
could add the following:(setq ps/external-dir (shell-command-to-string
"perly_sense external_dir")) and expect it to actually work. Which it did.previous month | current month | next month