Mercurial > utils
annotate emacs/win/e.bat @ 245:8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
author  Oleksandr Gavenko <gavenkoa@gmail.com> 

date  Fri, 26 Feb 2010 23:23:35 +0200 
parents  ea15eb62b804 
children  f9b1f51b8ac4 
rev  line source 

2
06536c9e15d4
Added file from bin/path.
Oleksandr Gavenko <gavenko@bifit.com.ua>
parents:
diff
changeset

1 @echo off 
211  2 
3 REM Written by Oleksandr Gavenko <gavenkoa@gmail.com>, 2008.  
4 REM File placed by author in public domain.  
2
06536c9e15d4
Added file from bin/path.
Oleksandr Gavenko <gavenko@bifit.com.ua>
parents:
diff
changeset

5 
5
7c6b58c4f138
Added r.bat. Added copyright notice.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset

6 REM View file in emacs buffer using emacsclientw. 
7
2f3ca206301b
If emacs not already running, run it.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset

7 REM If emacs not already running, run it. 
5
7c6b58c4f138
Added r.bat. Added copyright notice.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset

8 REM Put this file (e.bat) in your PATH. 
87
8c181c0bf731
Spell correction. Correct email.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
13
diff
changeset

9 REM Name `e' because `edit'. 
5
7c6b58c4f138
Added r.bat. Added copyright notice.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset

10 
245
8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset

11 REM If path to file contain spaces it must be inclosed into quotes. 
8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset

12 
8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset

13 REM Enclose %1 into quotes is danger because if %1 equal to "a b" result 
8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset

14 REM expression ""a b"" has two words, not one enclosed into quotes! 
2
06536c9e15d4
Added file from bin/path.
Oleksandr Gavenko <gavenko@bifit.com.ua>
parents:
diff
changeset

15 
245
8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset

16 if x%1 == xh goto usage 
8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset

17 if x%1 == xhelp goto usage 
8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset

18 if x%1 == xhelp goto usage 
8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset

19 
8d4828549738
Enclose %1 into quotes is danger because if %1 equal to "a b" result expression ""a b"" has two words, not one enclosed into quotes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset

20 emacsclientw a runemacs n %1 
2
06536c9e15d4
Added file from bin/path.
Oleksandr Gavenko <gavenko@bifit.com.ua>
parents:
diff
changeset

21 goto EOF 
06536c9e15d4
Added file from bin/path.
Oleksandr Gavenko <gavenko@bifit.com.ua>
parents:
diff
changeset

22 
06536c9e15d4
Added file from bin/path.
Oleksandr Gavenko <gavenko@bifit.com.ua>
parents:
diff
changeset

23 :usage 
107  24 @echo "emacsclient run script." 
25 @echo "Usage"  
26 @echo " e [h^help] <editfiles>"  
2
06536c9e15d4
Added file from bin/path.
Oleksandr Gavenko <gavenko@bifit.com.ua>
parents:
diff
changeset

27 
06536c9e15d4
Added file from bin/path.
Oleksandr Gavenko <gavenko@bifit.com.ua>
parents:
diff
changeset

28 :EOF 
06536c9e15d4
Added file from bin/path.
Oleksandr Gavenko <gavenko@bifit.com.ua>
parents:
diff
changeset

29 