You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bala Paranj <bp...@yahoo.com> on 2006/07/20 15:16:50 UTC

setting svn editor value

I am following the Pragmmatic Subversion book, it does not say how to set the environment for the
SVN EDITOR variable. I am on Mac OS. I don't have xemacs on my machine. Can someone please help
me? TIA.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: setting svn editor value

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 21, 2006, at 01:53, Bala Paranj wrote:

>> You don't need xemacs. xemacs is just a text editor; you can use any
>> you like. I use TextWrangler which is nice and free.
>>
>> In the file ~/.bash_profile I have this line:
>>
>> export EDITOR=editor.sh
>>
>> editor.sh is a small shell script located somewhere within my path.
>> (On my system that's ~/scripts) The contents of the script is:
>>
>> #!/bin/sh
>> edit +1 --wait --resume "$@"
>>
>> "edit" opens TextWrangler. +1 tells it to hilite the first line of
>> the file. --wait tells edit to wait until I save and close the file
>> in TextWrangler before returning control to the script. --resume
>> means the Terminal should come to the front when I save and close the
>> document in TextWrangler. (These options are specific to
>> TextWrangler's edit command; if you want to use a different editor,
>> you'll need to consult that editor's documentation.)
>
> Thank you for the suggestion. I installed the TextWrangler. I  
> created a scripts directory under my
> root directory. I created a editor.sh with the two lines you had  
> given. When I run the following
> command, it is bombing out. Please help.
>
> 19:47:51:~/work/sesame > svn propedit svn:ignore timelib
> sh: line 1: editor.sh: command not found
> svn: system('editor.sh svn-prop.tmp') returned 32512


1. By "root directory" I hope you mean "home directory", as in /Users/ 
<yourusername>


2. Is editor.sh executable? It needs to be. Make it so by doing this:

cd ~/scripts
chmod 755 editor.sh


3. Is the scripts directory in your path? I modified my path to put  
it there, because I found this convenient. If you want to do that  
too, you can add a line like this to your ~/.bash_profile:

export PATH=~/scripts:$PATH

Or if you don't want to modify your path, you can change the line  
that exports the editor variable to use the absolute path to the script:

export EDITOR=/Users/<yourusername>/scripts/editor.sh



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: setting svn editor value

Posted by Bala Paranj <bp...@yahoo.com>.
Thank you for the suggestion. I installed the TextWrangler. I created a scripts directory under my
root directory. I created a editor.sh with the two lines you had given. When I run the following
command, it is bombing out. Please help.

19:47:51:~/work/sesame > svn propedit svn:ignore timelib
sh: line 1: editor.sh: command not found
svn: system('editor.sh svn-prop.tmp') returned 32512
 
> You don't need xemacs. xemacs is just a text editor; you can use any  
> you like. I use TextWrangler which is nice and free.
> 
> In the file ~/.bash_profile I have this line:
> 
> export EDITOR=editor.sh
> 
> editor.sh is a small shell script located somewhere within my path.  
> (On my system that's ~/scripts) The contents of the script is:
> 
> #!/bin/sh
> edit +1 --wait --resume "$@"
> 
> "edit" opens TextWrangler. +1 tells it to hilite the first line of  
> the file. --wait tells edit to wait until I save and close the file  
> in TextWrangler before returning control to the script. --resume  
> means the Terminal should come to the front when I save and close the  
> document in TextWrangler. (These options are specific to  
> TextWrangler's edit command; if you want to use a different editor,  
> you'll need to consult that editor's documentation.)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: setting svn editor value

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 20, 2006, at 17:16, Bala Paranj wrote:

> I am following the Pragmmatic Subversion book, it does not say how  
> to set the environment for the
> SVN EDITOR variable. I am on Mac OS. I don't have xemacs on my  
> machine. Can someone please help
> me? TIA.

You don't need xemacs. xemacs is just a text editor; you can use any  
you like. I use TextWrangler which is nice and free.

In the file ~/.bash_profile I have this line:

export EDITOR=editor.sh

editor.sh is a small shell script located somewhere within my path.  
(On my system that's ~/scripts) The contents of the script is:

#!/bin/sh
edit +1 --wait --resume "$@"

"edit" opens TextWrangler. +1 tells it to hilite the first line of  
the file. --wait tells edit to wait until I save and close the file  
in TextWrangler before returning control to the script. --resume  
means the Terminal should come to the front when I save and close the  
document in TextWrangler. (These options are specific to  
TextWrangler's edit command; if you want to use a different editor,  
you'll need to consult that editor's documentation.)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org