Re: [STUMP] Sourcing ~/.bashrc when starting Emacs from stumpwm
Mehul Sanghvi <[email protected]>
| Newsgroups | gmane.comp.window-managers.stumpwm.devel |
|---|---|
| Message-ID | <CAPo9-A8U==Pu1sw+epzUTK_g_zXPRVhRqdB-Of-87GQUhiLtcw@mail.gmail.com> |
How are you starting your stumpwm ? I never had this problem when I was using stumpwm. I always started it from my ~/.xinitrc and if I recall (that system died over a year ago and I didn't have any backups) and it had #!/bin/bash at the top of it. On Tue, Sep 8, 2015 at 1:53 PM, Shakthi Kannan <[email protected]> wrote: > Hi, > > I have the following code in my ~/.stumpwmrc on Ubuntu 14.10: > > === ~/.stumpwmrc === > > ;; Emacs > (defvar *emacs-command* nil > "Start an emacs client frame. Starts an emacs daemon if necessary.") > (setf *emacs-command* "emacsclient -c -a \"\"") > > (define-key *root-map* (kbd "e") "run-emacs") > (define-key *root-map* (kbd "C-e") "run-emacs") > > (defcommand run-emacs () () > (run-shell-command (concat "exec " *emacs-command*))) > > === END === > > When I login to stumpwm, an Emacs server starts in the background, and > an Emacs client opens up. This unfortunately doesn't run my ~/.profile > (which sources ~/.bashrc). Hence, I don't get the variables defined in > ~/.bashrc when I open eshell. > > #1 > > But, if I open a Bash terminal after logging into stumpwm and execute: > > $ bash -c 'emacsclient -c -a ""' > > it opens up an Emacs client, and I am able to see the ~/.bashrc > environment variables in eshell. > > #2 > > I tried using the following in ~/.stumpwmrc: > > (setf *emacs-command* "bash -c 'emacsclient -c -a \"\"'") > > but, I was not able to see the environment variables inside eshell. > > #3 > > I also tried running a command directly from inside stumpwm using "C-t > !" and 'sh -c emacsclient -c -a ""', and it opened the Emacs client, > but, I still don't see the environment variables in eshell. > > Is there a way to start an Emacs client after logging into stumpwmrc, > that inherits the bash environment settings? > > Appreciate any inputs in this regard, > > Thanks! > > SK > > -- > Shakthi Kannan > http://www.shakthimaan.com > > _______________________________________________ > Stumpwm-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/stumpwm-devel > -- Mehul N. Sanghvi email: [email protected] _______________________________________________ Stumpwm-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/stumpwm-devel