Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

acidity

macrumors regular
Original poster
Sep 7, 2006
115
0
Hello All

Just bought a new MacBook for myself after being in Windows world for my lifetime. Its beautiful :)

I have couple of questions though -

1.) First thing I did after starting up Mac was to Install FireFox and Thunderbird which was pretty easy as the binaries were given in .dmg format. Now I went ahead and downloaded Emacs from http://www.webweavertech.com/ovidiu/emacs.html. The binaries are given in .pkg format. So I click on it and install the application. Now I cant seem to find where it installed Emacs. I use Spotlight and see that Emacs is installed but when I click on it, the app does not run. It blinks for couple of seconds in the dashboard and then it goes off.

What is the problem? Is there some problem with the application?

Also, I how can I do a search of the filesystem like I can do in Windows i.e. dir filename /s or use F3 to use the Windows search.

Do you suggest to use Emacs from this website: http://aquamacs.org/download.shtml or you suggest me to use XEmacs (which I have not used earlier...I prefer to use GNU Emacs).

Any help would be appreciated....

I am sure I am gonna come back again with more queries.

-- Ritesh
 

acidity

macrumors regular
Original poster
Sep 7, 2006
115
0
One more problem that I am having is inspite of giving a password to my account, it never asks for one when I start my Macbook. It will straight go and login to my account. I dont want anybody else to use my Mac so I want the password to be put in before somebody can log in.

If I log out then you will need to enter the password to log in. This is kinda strange.

How can I configure that?
 

iMeowbot

macrumors G3
Aug 30, 2003
8,634
0
acidity said:
I dont want anybody else to use my Mac so I want the password to be put in before somebody can log in.
In System Preferences under the Accounts pane, click Login Options at the bottom left. Uncheck the "Automatically log in as:" box.
Also, I how can I do a search of the filesystem like I can do in Windows i.e. dir filename /s or use F3 to use the Windows search.
In addition to Spotlight, you can get a more feature-filled interface from Finder. Click on the desktop, any Finder window or its dock icon and press apple-F.

If you want to do something like dir /s filename at the Terminal prompt, try

find . -name filename

(or -iname for a case-insensitive version)

====

Here is a more up-to-date Emacs you may want to try (it's Universal).
 

khammack

macrumors regular
Sep 28, 2004
166
0
Portland, OR
acidity said:
I use Spotlight and see that Emacs is installed but when I click on it, the app does not run. It blinks for couple of seconds in the dashboard and then it goes off.

A couple of techniques that might help you troubleshoot:
  1. From spotlight, type emacs, then click "Show All". A new window will appear. Click on "Emacs" from this new window and use the "Get Info" command (Apple-I) to get detailed information about the file. The location of your installed Emacs program will be listed under "Where". You can use the "Get Info" command from finder on any file you want.
  2. Also, if emacs tries to start and fails, it may spit out a message to the console. Use console.app to check.
What is the problem? Is there some problem with the application?

....

Do you suggest to use Emacs from this website: http://aquamacs.org/download.shtml or you suggest me to use XEmacs (which I have not used earlier...I prefer to use GNU Emacs).
YES. I've used both XEmacs and GNU Emacs over the years; I prefer GNU Emacs. Aquamacs is basically a version of the GNU Emacs port you already downloaded, but with more MacOSX specific refinements. Although if you've used Emacs on other platforms you probably won't like the default configuration of Aquamacs. It opens new files in a new window, and other silliness like that. You can turn off all that stuff and make it work just like any other emacs (but with excellent fonts).

-kev
 

iDavidLeeRoth

macrumors regular
Sep 4, 2006
117
0
I was wondering about this too. I'm trying to use friends' Macs so I can become used to them before I get that 24inch imac.
 

acidity

macrumors regular
Original poster
Sep 7, 2006
115
0
khammack said:
A couple of techniques that might help you troubleshoot:
  1. From spotlight, type emacs, then click "Show All". A new window will appear. Click on "Emacs" from this new window and use the "Get Info" command (Apple-I) to get detailed information about the file. The location of your installed Emacs program will be listed under "Where". You can use the "Get Info" command from finder on any file you want.
  2. Also, if emacs tries to start and fails, it may spit out a message to the console. Use console.app to check.

YES. I've used both XEmacs and GNU Emacs over the years; I prefer GNU Emacs. Aquamacs is basically a version of the GNU Emacs port you already downloaded, but with more MacOSX specific refinements. Although if you've used Emacs on other platforms you probably won't like the default configuration of Aquamacs. It opens new files in a new window, and other silliness like that. You can turn off all that stuff and make it work just like any other emacs (but with excellent fonts).

-kev


This gets even more interesting. I did a spotlight and finder search on Emacs as you suggested and found out that Emacs.app is available in the Application directory. Now if I go to the directory from the terminal and start Emacs, it starts the Emacs which came bundled with MacOS X 10.4.7. I dont like it coz it dosnt color the set mark which makes it difficult for me so I thought the .pkg which I downloaded form the above the link would be helpful.

But when I do a search on Emacs from SpotLight, I find this app with the GNU logo on it and when I click on it, the logo just comes on the dashboard, jumps couple of time and it goes off.

So is the application I installed the same as the one which came by default with the Mac?? Maybe they dont start from the GUI and you have to go the terminal to start it. I am confused :)

To check this I went to the terminal and did a Find as listed above for console.app but surprisingly the find command spit outs:

PHP:
find: ./.Spotlight-V100: Permission denied
find: ./.Trashes: Permission denied
find: ./private/etc/cups/certs: Permission denied
find: ./private/var/backups: Permission denied
find: ./private/var/db/dhcpclient: Permission denied
find: ./private/var/db/netinfo/local.nidb: Permission denied
find: ./private/var/db/openldap/openldap-data: Permission denied
find: ./private/var/db/openldap/openldap-slurp: Permission denied
find: ./private/var/db/shadow: Permission denied
find: ./private/var/db/Spotlight-V100: Permission denied
find: ./private/var/launchd/0: Permission denied
find: ./private/var/root: Permission denied
find: ./private/var/spool/cups: Permission denied
find: ./private/var/spool/fax: Permission denied
find: ./private/var/spool/mqueue: Permission denied
find: ./private/var/spool/postfix/active: Permission denied
find: ./private/var/spool/postfix/bounce: Permission denied
find: ./private/var/spool/postfix/corrupt: Permission denied
find: ./private/var/spool/postfix/defer: Permission denied
....
find: ./System/Library/User Template/Dutch.lproj/Desktop: Permission denied
find: ./System/Library/User Template/Dutch.lproj/Documents: Permission denied
find: ./System/Library/User Template/Dutch.lproj/Library: Permission denied
find: ./System/Library/User Template/Dutch.lproj/Movies: Permission denied
find: ./System/Library/User Template/Dutch.lproj/Music: Permission denied
find: ./System/Library/User Template/Dutch.lproj/Pictures: Permission denied
find: ./System/Library/User Template/Dutch.lproj/Public/Drop Box: Permission denied
find: ./System/Library/User Template/English.lproj/Desktop: Permission denied
find: ./System/Library/User Template/English.lproj/Documents: Permission denied
find: ./System/Library/User Template/English.lproj/Library: Permission denied
find: ./System/Library/User Template/English.lproj/Movies: Permission denied
find: ./System/Library/User Template/English.lproj/Music: Permission denied
find: ./System/Library/User Template/English.lproj/Pictures: Permission denied
find: ./System/Library/User Template/English.lproj/Public/Drop Box: 
...
find: ./System/Library/User Template/French.lproj/Public/Drop Box: Permission denied
find: ./System/Library/User Template/German.lproj/Desktop: Permission denied
find: ./System/Library/User Template/German.lproj/Documents: Permission denied
find: ./System/Library/User Template/German.lproj/Library: Permission denied
find: ./System/Library/User Template/German.lproj/Movies: Permission denied
find: ./System/Library/User Template/German.lproj/Music: Permission denied
find: ./System/Library/User Template/German.lproj/Pictures: Permission denied
find: ./System/Library/User Template/German.lproj/Public/Drop Box: Permission denied
find: ./System/Library/User Template/Italian.lproj/Desktop: Permission denied
find: ./System/Library/User Template/Italian.lproj/Documents: Permission denied
find: ./System/Library/User Template/Italian.lproj/Library: Permission denied
find: ./System/Library/User Template/Italian.lproj/Movies: Permission denied
.....
denied
find: ./System/Library/User Template/Japanese.lproj/Pictures: Permission denied
find: ./System/Library/User Template/Japanese.lproj/Public/Drop Box: Permission denied
find: ./System/Library/User Template/ko.lproj/Desktop: Permission denied
find: ./System/Library/User Template/ko.lproj/Documents: Permission denied
find: ./System/Library/User Template/ko.lproj/Library: Permission denied
find: ./System/Library/User Template/ko.lproj/Movies: Permission denied
find: ./System/Library/User Template/ko.lproj/Music: Permission denied
find: ./System/Library/User Template/ko.lproj/Pictures: Permission denied
find: ./System/Library/User Template/ko.lproj/Public/Drop Box: Permission denied
find: ./System/Library/User Template/no.lproj/Desktop: Permission denied
find: ./System/Library/User Template/no.lproj/Documents: Permission denied
find: ./System/Library/User Template/no.lproj/Library: Permission denied
find: ./System/Library/User Template/no.lproj/Movies: Permission denied
find: ./System/Library/User Template/no.lproj/Music: Permission denied
find: ./System/Library/User Template/no.lproj/Pictures: Permission denied
......
find: ./System/Library/User Template/zh_TW.lproj/Documents: Permission denied
find: ./System/Library/User Template/zh_TW.lproj/Library: Permission denied
find: ./System/Library/User Template/zh_TW.lproj/Movies: Permission denied
find: ./System/Library/User Template/zh_TW.lproj/Music: Permission denied
find: ./System/Library/User Template/zh_TW.lproj/Pictures: Permission denied
find: ./System/Library/User Template/zh_TW.lproj/Public/Drop Box: Permission denied

I am the administrator then how is it that I dont have access to those directories?

Didnt think that installing and running an Emacs would be so confusing....but I am loving it as it helps me in understanding the underlying things :)

The one provided at: homepage.mac.com/zenitani/emacs-e.html seemes more interesting as it clearly steps down steps to install the Emacs which seems similar to one by using .dmg format.

I can go ahead and install it but I dont want to corrup my system with multiple copies of same thing hanging around everywhere......

Hope my questions are not stupid and long....

-- Ritesh
 

acidity

macrumors regular
Original poster
Sep 7, 2006
115
0
I digged around a little bit and got more info.

I goto the Application section in Finder and I see Emacs with the GNU logo. I then select "Show package info" and go inside the MacOS folder. It has one Emacs binary in that folder which on clicking starts the Emac in terminal and there is another folder /bin in that.

Inside it there are bunch of applications and stuffs like Emacs, ctags etc. When I click on Emacs, it spits out the error:

PHP:
Welcome to Darwin!
/Applications/Emacs.app/Contents/MacOS/bin/emacs; exit
dhcp80ff6757:~ acidity$ /Applications/Emacs.app/Contents/MacOS/bin/emacs; exit
Warning: arch-dependent data dir (/usr/local/libexec/emacs/21.3.50/powerpc-apple-darwin7.5.0/) does not exist.
Warning: arch-independent data dir (/usr/local/share/emacs/21.3.50/etc/) does not exist.
Fatal error (6)Abort trap
logout

I guess this is the one which was installed by the above the binary and the one which works was the one bundled with Mac OS.

I guess the application is not running coz its a terminal app and its not supposed to run from Dashboard. Is that the reason??

-- Ritesh
 

khammack

macrumors regular
Sep 28, 2004
166
0
Portland, OR
acidity said:
This gets even more interesting. I did a spotlight and finder search on Emacs as you suggested and found out that Emacs.app is available in the Application directory. Now if I go to the directory from the terminal and start Emacs,

You're probably doing something like this:

cd /Applications
emacs


When you should be doing this:

cd /Applications
open Emacs.app


In MacOSX, "Applications" are more than just an executable file. They are a directory full of everything that the App needs, which finder treats specially. If you click on an application directory from finder, you don't descend into it, but instead finder looks in the directory and launches stuff for you.

it starts the Emacs which came bundled with MacOS X 10.4.7. I dont like it coz it dosnt color the set mark which makes it difficult for me so I thought the .pkg which I downloaded form the above the link would be helpful.
I'm guessing something is messed up with your .pkg installed emacs. Just install Aquamacs and use it instead.

But when I do a search on Emacs from SpotLight, I find this app with the GNU logo on it and when I click on it, the logo just comes on the dashboard, jumps couple of time and it goes off.

So is the application I installed the same as the one which came by default with the Mac?? Maybe they dont start from the GUI and you have to go the terminal to start it. I am confused :)
OSX comes with a terminal-only version of emacs. Even if you hadn't installed the emacs .pkg, you could open Terminal.app and type "emacs" and you'd get a text-only emacs. This other .pkg installation just failed to install correctly, or needs additional configuration, that's all.

To check this I went to the terminal and did a Find as listed above for console.app but surprisingly the find command spit outs:

PHP:
find: ./.Spotlight-V100: Permission denied
find: ./.Trashes: Permission denied
...
find: ./System/Library/User Template/zh_TW.lproj/Public/Drop Box: Permission denied

I am the administrator then how is it that I dont have access to those directories?

You are a user with administrator privileges, which is not the same as being the administrator. If you really want to run that process as root, do this:


sudo find -name "Somefile"


The one provided at: homepage.mac.com/zenitani/emacs-e.html seemes more interesting as it clearly steps down steps to install the Emacs which seems similar to one by using .dmg format.

I can go ahead and install it but I dont want to corrup my system with multiple copies of same thing hanging around everywhere......
What you want is an app that doesn't come as a .pkg file. This is what I described above; when you click on Terminal.app, or Mail.app, or Safari.app, etc you are really clicking on a directory that contains the entire application. You can move those wherever you want, and they don't install libraries all over your system like on Windows or Linux. They are "clean", you can drag to the trash and they are gone (almost; they leave config info in Library/Preferences/ but that's easy to clean up as well).

I know that Aquamacs fits this description; I haven't used the one at homepage.mac.com/zenitani/emacs-e.html, so you're on your own with that one.

-kev
 

acidity

macrumors regular
Original poster
Sep 7, 2006
115
0
I think there was some problem with .pkg format. I went ahead and sent it to trash and now it dosnt load up also but Emacs are still coming in Spotlight. Maybe its the terminal app.

I am going out now and when I come back I will try the AquaMacs.

Also, I couldnt find anything good regarding latex. Which is the best port of Latex, xDVI and dvipdf for Mac?
 

khammack

macrumors regular
Sep 28, 2004
166
0
Portland, OR
acidity said:
I think there was some problem with .pkg format. I went ahead and sent it to trash and now it dosnt load up also but Emacs are still coming in Spotlight. Maybe its the terminal app.
.pkg files require an "uninstaller", which may or may not be provided. Check the page where you downloaded yours from to see if they have one. Also, you may be interested in this:

http://appzapper.com/

This is just another good reason to avoid using .pkg files for regular apps, in my opinion.

Also, I couldnt find anything good regarding latex. Which is the best port of Latex, xDVI and dvipdf for Mac?

How hard did you try? If I type "tex on osx" in google this comes up first:

http://ii2.sourceforge.net/tex-index.html

That's pretty good, although it admittedly doesn't recommend a clear winner. I personally use TexShop combined with the fink installation of latex.

Also, many of your questions might be answered already on this forum. You should try the search function before posting. You won't have to wait for the answer and you'll create fewer duplicate threads (which doesn't bother me, but I think the community at this forum really doesn't like it when ask too many questions that have already been covered in detail elsewhere).

-kev
 

acidity

macrumors regular
Original poster
Sep 7, 2006
115
0
khammack said:
.pkg files require an "uninstaller", which may or may not be provided. Check the page where you downloaded yours from to see if they have one. Also, you may be interested in this:

http://appzapper.com/

This is just another good reason to avoid using .pkg files for regular apps, in my opinion.



How hard did you try? If I type "tex on osx" in google this comes up first:

http://ii2.sourceforge.net/tex-index.html

That's pretty good, although it admittedly doesn't recommend a clear winner. I personally use TexShop combined with the fink installation of latex.

Also, many of your questions might be answered already on this forum. You should try the search function before posting. You won't have to wait for the answer and you'll create fewer duplicate threads (which doesn't bother me, but I think the community at this forum really doesn't like it when ask too many questions that have already been covered in detail elsewhere).

-kev

Yeah. I did a search but I couldnt find anything definite regarding Tex. There were many options with their own limitations. I think I am gonna install AquaEmacs and install tex, tex to pdf converter from i-installer. That should be fine. I could use TexShop but I want to stick to Emcas because that is what I prefer.

Regarding dual posting, I am really about that. I should have searched on the forum before posting.

Sorry about that!!!
 

khammack

macrumors regular
Sep 28, 2004
166
0
Portland, OR
acidity said:
Yeah. I did a search but I couldnt find anything definite regarding Tex. There were many options with their own limitations. I think I am gonna install AquaEmacs and install tex, tex to pdf converter from i-installer. That should be fine. I could use TexShop but I want to stick to Emcas because that is what I prefer.
I also prefer Emacs for writing TeX documents; but I was thinking that TeXShop has a dvi viewer; after looking again, I can't seem to open dvi files with it, so I guess I was wrong.

I'm sure you've already discovered that Preview.app can read .ps and .pdf files, so Emacs + TeX is all you should need to install.

Also, I mentioned above that I personally use fink to install tex, rather than i-installer; if you have unix experience you may want to look at these two projects:

http://fink.sourceforge.net/
http://darwinports.opendarwin.org/

For installing TeX, I'm not sure whether fink is better than i-installer or not. If you know linux, fink is basically "apt" from the debian project. (Likewise, darwinports is basically the "ports" feature from FreeBSD and other *BSDs).

Regarding dual posting, I am really about that. I should have searched on the forum before posting.

Sorry about that!!!

Not to worry, nobody's scolding you or anything. :) When in doubt, just post a question. The worst that will happen is they'll remove it.

-kev
 

acidity

macrumors regular
Original poster
Sep 7, 2006
115
0
Thank you kev for all the help.

I have one last question. Since I just joined my university, I would be using Tex a lot to do my assignments and thus I want my tex using experience to be as smooth possible.

I installed TextShop and I use their library to do stuff like pdflatex, dvipdf etc.

Here is my scenario: I write and save tex file. Go to terminal to change it to pdf using pdflatex and then open the pdf file in TexShop to view in PDF. Now one good thing about the pdfviewer of Texshop is that if the pdf file is updated it will automatically refresh the file to show the latest changes which previewer dosnt seem to do.

Now I want to extend my emac to do something:

I save the file using a special command and in the background it runs pdflatex which will update the pdf file in Texshop. Ideally I would like another key binding (which I can skip for later) which will do pdflatex and if texshop is not started it will start it with that pdf. This is only required for the first time but I think I can skip on this for sometime later.

So I did google and found out this document which solves the same problem as mine: http://www.evergreen.loyola.edu/~educkworth/emacs_texshop.html

It says to update your .emacs file but I couldnt find anything by default so I went ahead and created one in the main folder.

In that I put the following command which should start pdflatex on pressing a key:

PHP:
(list "pdflatex" "pdflatex '\\nonstopmode\\input{%t}'" 'TeX-run-LaTeX nil t) 

(global-set-key "\M-t" 'do-pdflatex)
      (defun do-pdflatex ()
            "pdflatex the current file."   
            (interactive)
            (tex-command "pdflatex" 'tex-master-file))

When I open up the tex file and press M-t, emacs shows:

Symbol's function definition is void: tex-command

Whats wrong? Also, my second problem would be solved if I can just another set of command after pdflatex something like "textshop open thepdf".

PS: This is the first time, I am actually configuring Emacs... :)

BTW, Macs are fun :)
 

acidity

macrumors regular
Original poster
Sep 7, 2006
115
0
Also which book do you suggest to look for extending Emacs with LISP. Since I am coding most of the time, I will require to extend Emacs a lot according to my specification so would love to customize my emac.

Which book or resources do you people use?
 

khammack

macrumors regular
Sep 28, 2004
166
0
Portland, OR
acidity said:
Now I want to extend my emac to do something:

I save the file using a special command and in the background it runs pdflatex which will update the pdf file in Texshop. Ideally I would like another key binding (which I can skip for later) which will do pdflatex and if texshop is not started it will start it with that pdf. This is only required for the first time but I think I can skip on this for sometime later.
The standard way to do this is to just use the built in "M-x compile" command. Try it.

You'll notice that emacs prompts you for a "compile command". The default is "make -k" which requires that you write a Makefile for your .tex file. But you don't need to write a makefile; just delete the "make -k" part when prompted the first time and type this:

pdflatex test.tex

Emacs will remember this compile command next time, so if you're in a cycle of writing and previewing, you can set this the first time and keep using M-x compile until you exit.

So I did google and found out this document which solves the same problem as mine: http://www.evergreen.loyola.edu/~educkworth/emacs_texshop.html

I read that page, and whoever wrote it omitted very important details. For example:

Code:
 (list "pdfLaTeX" "pdflatex '\\nonstopmode\\input{%t}'" 'TeX-run-LaTeX nil t)
This creates a line in the "Command" menu with an item called "pdfLaTeX".
In short, no it does not. All that command does is create a LIST of strings, nothing more. To do something useful, it needs to be part of some other function that is not listed anywhere on his page.

-kev
 

khammack

macrumors regular
Sep 28, 2004
166
0
Portland, OR
There is some keybinding that I often hit accidentally that is normally innocuous, but when posting to macrumors it causes my half-finished reply to be submitted. So this is a continuation of what I was writing before.

acidity said:
When I open up the tex file and press M-t, emacs shows:

Symbol's function definition is void: tex-command

Whats wrong?

The short answer is the code on the website you found is useless all by itself.

Also, my second problem would be solved if I can just another set of command after pdflatex something like "textshop open thepdf".

Probably easiest to use a Makefile.

Then you can just leave the compile command:

M-x compile
Compile command: make -k

I've attached a Makefile that you can use to do this.

Edit: I can't seem to upload a Makefile. So paste this into a Makefile:

Code:
all:
	pdflatex file.tex
	open -a Texshop file.pdf

-kev
 

khammack

macrumors regular
Sep 28, 2004
166
0
Portland, OR
acidity said:
Also which book do you suggest to look for extending Emacs with LISP. Since I am coding most of the time, I will require to extend Emacs a lot according to my specification so would love to customize my emac.

Which book or resources do you people use?

Man, you've got a lot of questions. :D Fortunately they are right up my alley...

The best resource for emacs lisp is here:

http://www.gnu.org/software/emacs/emacs-lisp-intro/

There is an O'Reilly book, it's called:

Writing GNU Emacs Extensions
ISBN: 1565922611

I have a copy, but found it less useful than the online documentation.

-kev
 

acidity

macrumors regular
Original poster
Sep 7, 2006
115
0
Thanks for all the help. Yeah, I do have lot of questions.....hehehehhehhehehhhee.....I am just having dreams of doing so many things with Emacs that I am coming out with tons of ideas everyday and I see, I cant do much coz I dont know Emacs lisp.

I will probably buy the book coz its strenous to the eyes to look into the manual.

Its just a matter of time I guess. Once I get a hang of Lisp works, maybe it will not be a problem to do all these. Another issue being that I have never worked with a language like Lisp. More into C/C++/Win32 API, PHP etc. which follow the same pattern of language.

Anyway, thanks for all the help. I am sure I will come up with more questions regarding Emacs and I am definitely going to ask you :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.