Welcome to iraf.net Friday, May 03 2024 @ 06:47 PM GMT
cbender |
04/11/2007 03:40PM (Read 4587 times)
|
|
|
Status: offline
Registered: 04/11/2007
Posts: 4
|
I am running IRAF 2.12.2a under RHEL5, and have emacs set as the default editor. I would like to add a command line option to the emacs call so that the top level frame opens with a width of 82 (or more) instead of the default 80 characters, without actually modifying my .emacs file (I'd like normal emacs behaviour outside of IRAF). This would avoid line wrapping when editing fits headers and would save me from manually resizing the window each time.At a csh/tcsh prompt this is easily done with >emacs -g 82IRAF doesn't seem to be able to understand that. If I do the following:
set editor="emacs -g 82"
then I get:
cannot find edcap file for `emacs -g 82'I also tried aliasing "clemacs" to "emacs -g 80" and setting the default editor to "clemacs", but that didn't work either. The only 'edcap' file I have is /iraf/iraf/pkg/cl/edcap.c, which suggests to me that the problem is compiled into the cl. Is there a way to include normal command line options like this in IRAF?Thanks
Chad BenderN.B. I would just run vi, but was having trouble with the whole delete/backspace thing under xgterm, and for some reason using emacs as the editor fixed that.
|
|
|
|
fitz |
04/11/2007 03:40PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Chad,There's no way to include the flag in the editor definition, however you can simply include as part of the command in IRAF, e.g.[code:1:2f3a5bdda4]cl> edit -g 82 myfile[/code:1:2f3a5bdda4]Alternatively, the 'emacs' command is declared by default in your login.cl so using the 'emacs' command should work as well.As for the BS/DEL problems, the ECL is an enhanced version of the CL that fixes this and adds arrow-history manipulation as well. This is the default in the v2.13 releases from this site, or see the iraf.noao.edu web page for details.Cheers,
-Mike
|
|
|
|
cbender |
04/11/2007 03:40PM
|
|
|
Status: offline
Registered: 04/11/2007
Posts: 4
|
[quote:e974a6efc9="fitz"]
There's no way to include the flag in the editor definition, however you can simply include as part of the command in IRAF, e.g.[code:1:e974a6efc9]cl> edit -g 82 myfile[/code:1:e974a6efc9]
[/quote:e974a6efc9]Thanks for the quick response. When I try the above, I get a segmentation error:cl> show editor
emacs
cl> edit tmpfile ;;this works fine
cl> edit -g 82 tmpfile
ERROR: segmentation violation
edit (-g, 82, tmpfile)Any ideas? If not, I'll just live with it - no big deal.Thanks
Chad
|
|
|
|
fitz |
04/11/2007 03:40PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Ugly, but try enclosing the '-g 82' in quotes so it's seen as one argument. Because it's a builtin task you can't redeclare it, but you could write a myedit.cl procedure script to hide the flag, e.g.[code:1:091a87c4ab]
procedure myedit (fname)
file fname
begin
edit("-g 82", fname)
end
[/code:1:091a87c4ab]
-Mike
|
|
|
|
| |
|
Content generated in: 0.14 seconds |
|