Penny Leach | 5 Jul 2012 21:29
Picon

zsh fix not working inside thunderbird's external editor

Hi there,

I found the fix for the zsh problem in the troubleshooting page on the
wiki and it works perfectly for me if I launch macvim in any sort of
ordinary way.  However, I'm using the external editor plugin for
Thunderbird, and when it launches macvim, the PATH variable is not set
properly.

The launch command for the thunderbird plugin is: /Applications/
MacVim.app/Contents/MacOS/Vim -g --nofork

I don't see any good reason for this to cause the zsh variables to not
be read, any insight would be appreciated.

Thanks,
Penny

--

-- 
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

björn | 10 Jul 2012 22:59
Picon
Gravatar

Re: zsh fix not working inside thunderbird's external editor

On Thu, Jul 5, 2012 at 9:29 PM, Penny Leach wrote:
>
> I found the fix for the zsh problem in the troubleshooting page on the
> wiki and it works perfectly for me if I launch macvim in any sort of
> ordinary way.  However, I'm using the external editor plugin for
> Thunderbird, and when it launches macvim, the PATH variable is not set
> properly.
>
> The launch command for the thunderbird plugin is: /Applications/
> MacVim.app/Contents/MacOS/Vim -g --nofork
>
> I don't see any good reason for this to cause the zsh variables to not
> be read, any insight would be appreciated.

Hi,

I'm afraid I don't use zsh so can not really contribute at all to this
thread.  Normally my response would be to ask on vim_use but this
really is specific to the Mac so I don't think you'll get much help
there.

Are there no zsh users on this list that have a clue what's going on here?

Björn

--

-- 
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

(Continue reading)

Ben Schmidt | 16 Jul 2012 01:44
Picon
Gravatar

Re: zsh fix not working inside thunderbird's external editor

On 6/07/12 5:29 AM, Penny Leach wrote:
> Hi there,
>
> I found the fix for the zsh problem in the troubleshooting page on the
> wiki and it works perfectly for me if I launch macvim in any sort of
> ordinary way.  However, I'm using the external editor plugin for
> Thunderbird, and when it launches macvim, the PATH variable is not set
> properly.
>
> The launch command for the thunderbird plugin is: /Applications/
> MacVim.app/Contents/MacOS/Vim -g --nofork
>
> I don't see any good reason for this to cause the zsh variables to not
> be read, any insight would be appreciated.
>
> Thanks,
> Penny

This doesn't work because starting a MacVim instance using the Vim
executable directly, or the mvim script, inherits the environment of the
caller. It doesn't go through the login shell like when using the New
Window menu command inside MacVim.

I get around this by means of a wrapper script that runs MacVim in a
login shell. My script is /Users/ben/bin/loginvim:

#!/bin/bash -l
/usr/local/bin/mvim "$ <at> "

mvim is from the MacVim distribution, but installed to /usr/local.
(Continue reading)

Penny Leach | 17 Jul 2012 09:20
Picon

Re: zsh fix not working inside thunderbird's external editor

On Monday, July 16, 2012 1:44:29 AM UTC+2, Ben Schmidt wrote:
> After a bit of experimentation, I think the following will work for zsh.
> It&#39;s a bit nasty (shells everywhere) but login was crashing when I used
> it in a shebang line, so I had to do this:
> 
> #!/bin/sh
> /usr/bin/login -f &quot;$USER&quot; /bin/zsh /usr/local/bin/mvim &quot;$ <at> &quot;
> 
> You or someone else might know of some other magic, though. I&#39;m not
> really familiar with zsh, so I&#39;m just feeling my way around.

Yay! That worked perfectly.  I experimented a little bit trying to find
another way to do it but failed so I will just stick with your solution.
Thanks very much!

Penny

--

-- 
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Gmane