Find the answer to your Linux question:
Results 1 to 5 of 5
hi, can anyone tell me in a few simple steps how to configure emacs so i can use w3m? thanks...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2011
    Posts
    14

    using w3m with emacs


    hi,
    can anyone tell me in a few simple steps how to configure emacs so i can use w3m?
    thanks

  2. #2
    Linux User
    Join Date
    Nov 2008
    Location
    Tokyo, Japan
    Posts
    260
    Check out http://emacs-w3m.namazu.org Get your files and instructions from here.

    I don't know how much you know about Emacs, but it is similar to Java in that it is a virtual machine which executes bytecode (analogous to ".class" files) compiled from a high level language called Emacs-Lisp. These files are located in the "/usr/share/emacs/$VERSION/lisp" directory, where of course $VERSION is the version of Emacs you are using. Usually, installing an extension to Emacs will automatically copy files to this directory.

    Using extending functionality of Emacs requires executing Emacs-Lisp programs using various methods, usually using some command in the Emacs command line, which you open using "Alt-X" then entering the command. You can also assign a keyboard shortcut (called a keyboard macro in Emacs parlence), to execute the command without having to use "Alt-X" every time.

    According to the "Configuration" section of the website I pointed you to, once you have installed the program using "make install", you can open emacs, then type "Alt-X" then enter the command "w3m" to run the program in the emacs editor.

    Make sure you follow all of the instructions on the site carefully.

  3. #3
    Just Joined!
    Join Date
    Mar 2011
    Posts
    14
    thanks for the link, i'll look into it!
    ps: i already have installed w3m on Xemacs, but it won't load on emacs, so my guess is i need to find the 'configure' file and make some changes so it will run on emacs too? also i haven't been able to find the configuration file to do this

    i want to use emacs and w3m to debug my C cgi apps. should i use xemacs or emacs?
    i have no experience with both

  4. #4
    Linux User
    Join Date
    Nov 2008
    Location
    Tokyo, Japan
    Posts
    260
    Quote Originally Posted by rudie View Post
    thanks for the link, i'll look into it!
    ps: i already have installed w3m on Xemacs, but it won't load on emacs, so my guess is i need to find the 'configure' file and make some changes so it will run on emacs too? also i haven't been able to find the configuration file to do this

    i want to use emacs and w3m to debug my C cgi apps. should i use xemacs or emacs?
    i have no experience with both
    If you download the most recent ".tar.gz" package from the "emacs-w3m" homepage, you can "tar xzf emacs-w3m-1.4.3.tar.gz" to decompress that package you downloaded, and the extracted files should contain a "configure" program.

    I prefer to stay inside the terminal so I would use emacs, but if you like the GUI, use xemacs, it is really a matter of preference. I have never used xemacs, but it allows for displaying images and icons. The website I mentioned above seems to indicate that it does install icons, but this doesn't guarantee your "w3m" program is able to use these features to display images as you see in a graphical web browser, as the Emacs version uses "w3m" at its core which is not designed to display images as far as I know.

    Are you unfamiliar with "configure" and "make"? Here is an opportunity to learn a bit more about Linux, I think:

    Linux programmers can use an application called "autoconf" to generate software configuration programs called "configure" and an application called "automake" to generate compile/install scripts that can be executed with the "make" command.

    When you download a tarball (".tar.gz" file) of a linux program, most programs will include a "configure" script in the tarball which allows you to automatically compile and install the program. You execute "configure", and you specify any install options, it will check your system for dependencies and if there were no problems, it generate a make script called "Makefile", containing information necessary to compile and install the program. You then time "make && make install" to execute this script which will compile and install the program, as long as there are no errors. You can run "./configure --help" to make it output a list of various command line options you could use.

    I often find it make my life easier to use "./configure --prefix=/usr" which tells "configure" and "make" to install the program into the various "/usr" directories, like "/usr/share/emacs/..." and "/usr/bin". The default is always "/usr/local", and if you use this default, you need to make sure emacs is configured to search through "/usr/local/share/emacs/..." or "/usr/local/bin", as well as its ordinary "/usr/share/emacs/..." directory.

    As far as I know, the difference exists to separate programs you installed using "configure && make" from programs you installed using your package manager, "apt-get" or "yum" or "emerge" or whatever. However, many programs assume everything is in "/usr" and do not check "/usr/local" and you must often configure additional environment variables, like "PATH" and "LD_LIBRARY_PATH" to correct this.

    One other thing to note: it seems this Emacs program was last updated in 2004. This means the code has probably not been maintained, and you could have problems due to bugs, or problems with a more recent version of Emacs not being backwards compatible with "emacs-w3m", so be cautious of that.

    If Emacs comes to bother you, Linux always provides multiple ways to solve problems. You could search for an IDE that is targeted to web development, like the result of this google search.

    Another alternative is to use "vim", but unless you already know how to use "vim" (which is well worth your time) it can be very tricky for beginners. But "vim" has a simple but powerful built-in "make" command. If you write your own "Makefile" for your website that launches a web browser that displays the page you are editing, you can edit the webpage/CGI source in "vim", then enter the ":make" command from inside of the vim editor to automatically launch the browser and display changes. Thats how I do it, because this method doesn't require any Emacs-Lisp code, just the standard "make" code.

  5. #5
    Just Joined!
    Join Date
    Mar 2011
    Posts
    14
    thanks for the tips!
    my main goal is to find a IDE in wich i can edit my html forms and debug my cgi programs written in C.
    so if i would 'post' my form i can use gdb to debug.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •