Results 1 to 6 of 6
Hello there,
I am just starting out with ubuntu.
I downloaded emacs, and wanted to use php-mode, so i downloaded something called php-mode. I would have posted a link, but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-23-2010 #1Just Joined!
- Join Date
- Dec 2010
- Posts
- 33
How do I install php mode on emacs?
Hello there,
I am just starting out with ubuntu.
I downloaded emacs, and wanted to use php-mode, so i downloaded something called php-mode. I would have posted a link, but this forum restricts me from doing that.
Inside are a bunch of files, and no readme. I tried to ask google how to install this, but found nothing that made sense to me (i am still a n00b).
So I wanted to ask if somebody could give me comprehensive directions.
Thanks!
Kind regards,
Marius
- 12-23-2010 #2
You should in almost all cases default to installing software through your package manager.
Ubuntu -- Details of package php-elisp in maverickCode:sudo apt-get install php-elisp
- 12-23-2010 #3Just Joined!
- Join Date
- Dec 2010
- Posts
- 33
Will this apt-thing (how do i know which packages can be installed with this method?) find the custom directory i chose for my emacs?
Thanks.M
- 12-23-2010 #4
How did you install emacs? If it wasn't using the package manager, then installing php-elisp that way will also install emacs again, since it won't recognize a manual install.
Package management:
Debian Linux apt-get package management cheat sheet
https://help.ubuntu.com/community/SynapticHowto
https://help.ubuntu.com/community/Repositories/Ubuntu
- 12-23-2010 #5Just Joined!
- Join Date
- Dec 2010
- Posts
- 33
- 12-23-2010 #6
Well, I don't really use emacs, but looking at the package, seems like it's just a make file, so run
Not sure if make install works in this case. And from the make script it appears to mostly be building the documentation. The heart of it is the php-mode.el file which is already there.Code:make sudo make install
And, looking around, it seems this is the case, and you can just move that file to the location of your choice.
How To Install php-mode Without Root Privelages | Karol Krizka
Using Emacs to edit PHP files Flame’s blog
So edit your ~/.emacs file and add
Replace /your/custom/path with the path to the directory with your php-mode.el file of course.Code:(setq load-path (cons "/your/custom/path" load-path)) (autoload 'php-mode "php-mode" "PHP editing mode" t) (add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode)) (add-to-list 'auto-mode-alist '("\\.php5\\'" . php-mode)) (add-to-list 'auto-mode-alist '("\\.php4\\'" . php-mode)) (add-to-list 'auto-mode-alist '("\\.php3\\'" . php-mode))
Are you opposed to installing emacs the usual (and supported) way?


Reply With Quote

