Emacs in separate window

Discussion in 'Mac OS X System & Mac Software' started by Qman, Jan 31, 2002.

  1. Qman

    Qman Registered

    Joined:
    Jan 17, 2002
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Anyone know how to get emacs to pop up in a separate window?

    Right now I have XDarwin going and can use xterms and all that jazz. What Im curious about, though, is how come on linux, when I type "emacs" in an xterm window, emacs pops up in a new window, but in OS X, it only opens up in the xterm window (or Terminal window)? I dont want to use xemacs...though if anyone could point me to a good port of that Id appreciate it too. I really just want to use the good ol emacs but be able to use my mouse to click on the menu items and scroll bar, etc. And also get colors going.

    Thanks!
     
  2. howardm4

    howardm4 Registered

    Joined:
    Jun 4, 2001
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    because the emacs that is provided in OSX wasn't compiled w/ Xwindows
    (why would it have been?). So, you probably want to get the source
    tarball off of darwin.apple.com (or wherever) and recompile it on a box
    that has Xwindows and make sure you compile w/ Xwindow support.
     
  3. Qman

    Qman Registered

    Joined:
    Jan 17, 2002
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the tip, howardm4.

    I downloaded the source but hit a snag - the first step to building emacs on a machine is to run the configure script that builds a script to make emacs on your particular hardware and os. Unfortunately, it doesnt want to set things up for os x (doesnt recognize it as a supported platform).

    Do you have a recommendation on which platform I should make the script build for? I browsed through the list in {emacs path}/etc/MACHINES and didnt see anything that looked obviously right. I figured it might be a bsd one, or the apple-powerpc-gnulinux one.

    Anyone else out there actually do this (build emacs on OS X) successfully?

    Thanks!
     
  4. howardm4

    howardm4 Registered

    Joined:
    Jun 4, 2001
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    actually, you can d/l the correctly mod'd source from Apple's Darwin site.
     
  5. kwiersma

    kwiersma Registered

    Joined:
    Oct 3, 2001
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software developer
    Location:
    Minneapolis, MN
    Could someone post the url for getting either a compiled binary or the source?

    I am trying to get emacs setup with xwin as well and understand that he Darwin version is the best way to go. I looked around out on the Darwin site but couldn't find any info on where to d/l the Darwin emacs source or binary.

    Thanks :)
     
  6. Qman

    Qman Registered

    Joined:
    Jan 17, 2002
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    I too would like that info.

    kwiersma, I have done the following so far:

    I went to www.gnu.org and downloaded the source for emacs 21.1. Then I went here and got the mac patch and followed all instructions. Unfortunately, after configuring, making, and installing as per the instructions, it didnt work. Im not really sure why, tho, as I didnt get any error messages or warnings.

    Maybe you can try this too and see if it works for you. If it does, please let me know.

    If anyone else knows issues with the steps I have taken, please post here.

    Thanks
     
  7. jcihocki

    jcihocki Registered

    Joined:
    Feb 2, 2002
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    [root@localhost xemacs-21.5.4]# ./configure \
    --with-x11 \
    --with-xpm \
    --with-png \
    --with-jpeg \
    --error-checking=none \
    --with-ncurses

    I actually just compiled xemacs on darwin tonight and it worked fine, with this config. I had to omit --with-tiff because my libtiff is a little flaky (need to actually compile it myself). It autodetected the host and seemed to chug along fine, so this should be an option for you. Note that this is xemacs ALONE. I figured since emacs came with darwin, why reinvent the wheel. But I do need xemacs since gvim is fubar under Xdarwin (can't focus the damn window for the life of me).

    Cheers,
    John
     
  8. beef

    beef Dinner

    Joined:
    Apr 2, 2001
    Messages:
    172
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    professional bum, parttime drunk
    Location:
    Ann Arbor, MI
    emacs as an aqua app is available from sourceforge.

    or you can just set up a .term file and make it run emacs when opened. again, set alias for it...

    well... if you insist on using xemacs, i dunno what to tell you... since I don't use xemacs.

     
  9. kwiersma

    kwiersma Registered

    Joined:
    Oct 3, 2001
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software developer
    Location:
    Minneapolis, MN
    Here is the link I was able to find on Apple's Darwin site for downloading emacs source. The version seems earlier then the newest avaliable from gnu.org.

    http://www.publicsource.apple.com/projects/darwin/1.4/source/other/emacs-20.7-41.tar.gz

    If anyone has a better link, with more up-to-date code and instructions please post! :)

    I hoping that when I download and compile this at home with x11 support I should be able to run emacs in its own X11 window. Note that I DON'T want to run xemacs.

    --KW
     
  10. Qman

    Qman Registered

    Joined:
    Jan 17, 2002
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Exactly, kwiersma - like you I dont want xemacs; I want emacs running in its own x-window....aqua window would be ok too. Running it inside a terminal window is *not* what I want to do.

    Of course, compiling with x-windows support rather than aqua is somewhat preferred since I could run emacs remotely on any pc or linux box with an x-server.

    Did you have any success with the file you downloaded from Apple? I guess I would prefer to have the latest version of emacs, but even version 20.7 would be fine if it actually works.
     
  11. kwiersma

    kwiersma Registered

    Joined:
    Oct 3, 2001
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software developer
    Location:
    Minneapolis, MN
    I tryed compiling it tonight with X support but it was unable to locate one of the XWindows libraries it needed. I did a

    ./configure --with-x-libraries=/usr/X11R6/lib/ --with-x-includes=/usr/X11R6/include/

    but that must not have covered all the the stuff it need to link to. I have also read that I you need to compile ncurses and edit the termcat file (to get color terminal support) in order to get things working the way I want them.

    If I ever figure this out I am going to have to put a webpage out with instructions. :)

    --KW
     
  12. klpguy

    klpguy Registered

    Joined:
    Feb 28, 2002
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    fink.sourceforge.net has an emacs package (20.7 I think) that works with X. I haven't done it myself, but I've seen an emacs installed from this package working on a Macintosh G4 running OSX 10.1. The fink site has a bunch of other useful programs as well. They're all put together as Debian packages, which makes for easy and painless installation, or so I've been told.
     
  13. kwiersma

    kwiersma Registered

    Joined:
    Oct 3, 2001
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software developer
    Location:
    Minneapolis, MN
    Fink is probably the way to go on this one. Unforunatly I was never able to get fink to download and install X-Win for me correctly. I find it a might confusion to use and am at somewhat of an intermediate CLI guy.

    I instead used .pkg X-Win installer which worked great, but is harder to update and get software for. Fink, when it works makes installing stuff so easy. Maybe I will try a re-nstall with fink so I can install a good emacs version.

    --KW
     
  14. kwiersma

    kwiersma Registered

    Joined:
    Oct 3, 2001
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software developer
    Location:
    Minneapolis, MN
    I go fink working again for me and installed XWindows from fink and emacs and it works great now! :)

    On a related note be VERY carful using pkgInstall --delete (from the macosxgnu.org site) when uninstalling pkg's. I used this to delete two pkg's from my system and it ended up deleting the whole /var directory (since I had to use the above command with sudo). So now I have to go in and redo all my use accounts and who knows what else. Just a heads up...

    But at least my emacs works great under XWindows now!

    --Kurt

    PS -- whatever problems I had with fink went away with the newest version and it has worked great. Very impressive!
     

Share This Page