bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Improved awk-mode for emacs


From: SMU mails
Subject: Improved awk-mode for emacs
Date: Fri, 3 May 2002 21:50:36 -0500

Improved Awk-mode for Emacs


Awk is perhaps the lightest programming language. However, light-weight as it is, it's very gentle and powerful. Despite lots of popular programming languages available, like many other programmers, I take awk as a DAILY tool and like it the best.

The smallnest of awk makes it possible to add not so huge a menu to provide almost all the essential parts of the language. The new awk-mode, thus, is expected to make use of this advantage and turn Emacs into an awk-specific integrated development environment (IDE).

The new awk-mode requires package, compile. Since Xemacs team has made some modifications with the compile package, the Awk | Next/Previous/First Error do not work currently. I'll try to update my code so as to have it work with both Emacs and Xemacs soon if Xemacs users show their enthusiasm toward this new awk-mode.

Before you can enjoy the benefits this work can bring to you, you might need to make sure that

  1. GNU awk, gawk, has been installed in your system and its path is covered by the environment variable, PATH.

    If you have certain version of awk rather than gawk, please rename it as gawk (in MS Windows, gawk.exe).

  2. you had better have file, gawk.info. If you click Awk | Awk Manual and no corresponding buffer appears, you need to set variable, Info-default-directory-list, in your initialization file, .emacs, which is in your home directory, by adding statement like

    (setq Info-default-directory-list (cons "C:/cygwin/usr/info" Info-default-directory-list))

    Special benefits for Windows users

    You can obtain through Internet, gawk.hlp, a Windows help file, and put it right in your home directory. By doing so, you can start gawk.hlp within Emacs. In this case, you don't need gawk.info.

  3. Of course, awk-mode.el is put into the right directory. For example,
    • Emacs on Redhat Linux: /usr/share/emacs/20.7/lisp/progmodes
    • Emacs on Windows: X:\emacs-21.2\lisp\progmodes
    • XEmacs on Windows: X:\XEmacs\xemacs-packages\lisp\prog-modes
    and so on. Of course, you had better byte-compile it. At least, you NEED to delete or move away the old awk-mode.elc from the directory mentioned.

    If you can not put awk-mode.el into the above directories because of permission, you still have chance to use it. In this case, please modify your initialization file, say, .emacs, in your home directory, by adding

    (autoload 'awk-mode "~/awk-mode.el" "Awk editing mode." t)

    Here, I suppose you copy awk-mode.el into your home directory.

THE FOLLOWING ARE SNAPSHOTS... SEE ATTACHED SNAPSHOTS.TAR.GZ

A new menu, Awk, appears.


Submenus are helpful when you forget trivial but essential things, such as, built-in functions and variables.


Click Awk | Run... to run your awk script and obtain the result or error messages in the *running awk* window. While the awk code is running, you can interrupt it at any time via Awk | Stop Running. And through Awk | Next Error, Previous Error and/or First Error, you can browse your code wherever there exist syntax errors. As you can see, it's now very easy for you to program, debug and execute awk code.


Zhongxiao (David) Wang, address@hidden, Wednesday, May 1, 2002 at 10:23

Attachment: awk-mode.el
Description: Binary data

Attachment: snapshots.tar.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]