Note that there are some explanatory texts on larger screens.

plurals
  1. POGit is not using the first editor in my $PATH
    primarykey
    data
    text
    <p>I am using OS X 10.8, and I used brew to install a more recent version of emacs than the one shipped with OS X.</p> <p>The newer emacs binary is installed in <code>/usr/local/bin</code> (24.2.1), and the old "shipped-with-osx" one in <code>/usr/bin</code> (22.1.1).</p> <p>I updated my <code>$PATH</code> env variable by prepending <code>/usr/local/bin</code> to it. It works fine in my shell (ie. typing <code>emacs</code> runs the 24.2.1 version), but when git opens the editor, the emacs version is 22.1.1.</p> <p>Isn't git supposed to use <code>$PATH</code> to find the editor I want to use ?</p> <p>Additional informations:</p> <pre><code>$ type -a emacs emacs is /usr/local/bin/emacs emacs is /usr/bin/emacs emacs is /usr/local/bin/emacs $ env PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin SHELL=/bin/zsh PAGER=most EDITOR=emacs -nw _=/usr/bin/env </code></pre> <p>Please note that I'd prefer not to set the absolute path of my editor directly in my git conf, as I use this conf across multiple systems.</p> <p><strong>EDIT</strong>: Here's an bit of my <code>.zshrc</code>:</p> <pre><code># Mac OS X if [ `uname` = "Darwin" ]; then # Brew binaries PATH="/usr/local/bin":"/usr/local/sbin":$PATH else # Everyone else (Linux) # snip fi </code></pre> <p>So, yes, I could add a line <code>export EDITOR='/usr/local/bin emacs -nw'</code> in the first <code>if</code>, but I'd like to understand why <code>git</code> is not using my <code>PATH</code> variable :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload