Running Hugs98 under Win2k (December 2001 version), I can invoke the xemacs editor with
:! xemacs.lnk +10 c:/prog/hugs/example.hs Then I set Editor setting : -E"xemacs.lnk +%d %s" But if I then type :e it reports Warning: Editor terminated abnormally Any idea as to what might be wrong or how to fix it? Best wishes for the holiday season, -- P
----------------------------------------------------------------------- Philip Wadler wadler@avaya.com Avaya Labs http://www.research.avayalabs.com/user/wadler/ 233 Mount Airy Road, room 2C05 office: +1 908 696 5137 Basking Ridge, NJ 07920 fax: +1 908 696 5402 USA home: +1 908 626 9252 cell: +1 908 872 4436 ----------------------------------------------------------------------- "When a Mathematical Reasoning can be had it's as great a folly to make use of any other, as to grope for a thing in the dark, when you have a Candle standing by you." -- John Arbuthnot, 1692 -----------------------------------------------------------------------
Hi Phil,
you're experiencing a subtle difference between the
:edit and :! commands that was introduced very recently.
The latter executes a command via a command interpreter
(cmd.exe most likely, in your case), which understands
Win32 command shortcuts (i.e., ".lnk" files)
The :edit command doesn't go via a command shell, so
when it tries to execute the xemacs.lnk file as a binary,
it fails.
This difference in behaviour is unfortunate & I'll look into
whether we can do away with it. In the meantime, the solution
is to manually dereference the shortcut and instead of using
xemacs.lnk, use its application target. (In the unlikely event you
don't know where to locate that tidbit, right-click on xemacs.lnk
via the Explorer to bring up the Properties for the shortcut.)
hth
--sigbjorn
----- Original Message -----
From: "Philip Wadler"
Running Hugs98 under Win2k (December 2001 version), I can invoke the xemacs editor with
:! xemacs.lnk +10 c:/prog/hugs/example.hs Then I set Editor setting : -E"xemacs.lnk +%d %s" But if I then type :e it reports Warning: Editor terminated abnormally Any idea as to what might be wrong or how to fix it? Best wishes for the holiday season, -- P
----------------------------------------------------------------------- Philip Wadler wadler@avaya.com Avaya Labs http://www.research.avayalabs.com/user/wadler/ 233 Mount Airy Road, room 2C05 office: +1 908 696 5137 Basking Ridge, NJ 07920 fax: +1 908 696 5402 USA home: +1 908 626 9252 cell: +1 908 872 4436 ----------------------------------------------------------------------- "When a Mathematical Reasoning can be had it's as great a folly to make use of any other, as to grope for a thing in the dark, when you have a Candle standing by you." -- John Arbuthnot, 1692 -----------------------------------------------------------------------
_______________________________________________ Hugs-Bugs mailing list Hugs-Bugs@haskell.org http://www.haskell.org/mailman/listinfo/hugs-bugs
Thanks! That fixes it, but raises a new problem. The place where my xemacs binary lives is: C:\Program Files\XEmacs\XEmacs-21.4.5\i586-pc-win32\xemacs.exe What is the right way to enter this as a string literal so Hugs98 can process it? I am guessing that I double the backslashes, but how do I escape the space so Hugs will recognize a single file name? (Sorry to bug you with this simple stuff.) Many thanks, -- P
Here's some examples of how to configure Hugs to
use an editor whose filepath contain spaces:
* from within Hugs:
Prelude> :set -E"\"c:\\Program Files\\winedt\\winedt\""
* from the (cmd.exe) command-line:
d:\tmp> hugs -E"\"c:\Program Files\winedt\winedt\""
* from the (bash) command-line:
foo$ hugs -E"\"c:\Program Files\winedt\winedt\""
* via the EDITOR environment variable (cmd.exe):
d:\tmp> set EDITOR="c:\Program Files\winedt\winedt"
d:\tmp> hugs
* via the EDITOR environment variable (bash):
foo$ export EDITOR="\"c:\\Program Files\\winedt\\winedt\""
foo$ hugs
Looks simple enough, but it can be a trying experience to go through
the trial-and-error of figuring out just what kind of quoting does work.
hth
--sigbjorn
----- Original Message -----
From: "Philip Wadler"
Thanks! That fixes it, but raises a new problem.
The place where my xemacs binary lives is:
C:\Program Files\XEmacs\XEmacs-21.4.5\i586-pc-win32\xemacs.exe
What is the right way to enter this as a string literal so Hugs98 can process it? I am guessing that I double the backslashes, but how do I escape the space so Hugs will recognize a single file name? (Sorry to bug you with this simple stuff.)
Many thanks, -- P
participants (2)
-
Philip Wadler -
Sigbjorn Finne