Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
anybody authored and tarsius committed Oct 4, 2011
1 parent b5c85b7 commit 48a6b3d
Show file tree
Hide file tree
Showing 13 changed files with 409 additions and 337 deletions.
29 changes: 29 additions & 0 deletions AUCTeXonOSX
@@ -0,0 +1,29 @@
= Solutions for editing LaTeX with Emacs on Mac OS X =

== Use Aquamacs ==

AquamacsEmacs comes with the latest version of AUCTeX, as well as a range of LaTeX-related configurations and packages (such as drag&drop support, close PDF viewer integration, etc.).

== Building AucTeX on OS/X with vanilla Emacs.app ==
: Borrowed from this [http://superuser.com/questions/171681/installing-auctex-1-86-over-emacs-app-in-os-x forum]
# Install the MacTeX 2010 (based on TeXLive 2010) distribution package
# [http://emacsformacosx.com/ Download OS X emacs], place in /Applications
# [http://www.gnu.org/software/auctex/ Download the Auctex tarball] and
# Go to the Auctex directory, and configure with this specific command (Emacs.app and TeXLive 2010 on OS/X):
<pre>
./configure --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs \
--with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp \
--with-texmf-dir=/usr/local/texlive/texmf-local
make
sudo make install
</pre>
:: to install the AucTeX elisp files inside the Emacs.app, the info files to /usr/local/share/info, etc.
:: Edit your ~/.emacs file to load Auctex/preview-latex, and point Emacs to your Latex executables (you can verify by Esc ! echo $PATH and Ctrl_h v exec-path that they aren't there already):

<pre>
(setenv "PATH" (concat "/usr/texbin:/usr/local/bin:" (getenv "PATH")))
(setq exec-path (append '("/usr/texbin" "/usr/local/bin") exec-path))
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
</pre>
:: Auctex and preview-latex should work now. One thing to keep in mind: with older versions of Auctex, the ps pathway seems to work better than pdf; if preview-latex images aren't appearing with the error "/typecheck in --setfileposition--", try disabling "Generate PDF" via "Menu Bar -> Command -> TeXing option".
1 change: 1 addition & 0 deletions BannedContent
Expand Up @@ -20,3 +20,4 @@
muzzles
url\.vn
vietnam
girisergos
8 changes: 8 additions & 0 deletions ColorTheme
Expand Up @@ -567,6 +567,14 @@ a 256 color terminal? Might be a bit better. -- AlexSchroeder

== Bugs and caveats ==

[new:DaveAbrahams:2011-10-03 19:03 UTC]

Unfortunately, nothing here says where the bug tracker is, so I can't report anything there. Should you happen to blow the stack trying to do color-theme-select, you might want to try this patch, which detects and suppresses such infinite recursions: https://gist.github.com/1259919

It happened to me because of https://github.com/dbrock/zenburn-el/issues/13

[new]

=== Installing ColorTheme (from tar.gz file) ===

After downloading the tar.gz file, there's a Makefile, a README, and a number
Expand Down
7 changes: 5 additions & 2 deletions DefineKeyLazy
@@ -1,4 +1,4 @@
;; I write a macro named define-key-lazy in
[[Joseph]] wrote a macro named define-key-lazy in
Lisp:joseph-util.el
<pre>
(define-key-lazy python-mode-map [(meta return)] 'eval-print-last-sexp 'python)
Expand Down Expand Up @@ -35,5 +35,8 @@ equals to

</pre>

[new]
It's usually best to rely on hooks for modes since they build their key maps at run-time not load-time.

----
CategoryKeys [[Joseph]]
CategoryKeys
60 changes: 6 additions & 54 deletions EmacsForMacOS
Expand Up @@ -13,60 +13,25 @@ If you've used Emacs before and already have your own emacs initialization file,

[http://www.hoenn.net/blog/index.php?/archives/76-Die-Emacssituation-unter-OS-X.html Auf Deutsch] (in German).

=== OS X Binary Vanilla builds ===

These builds are based on the BZR version of GNU Emacs and do not contain any additional packages or patches. Popular Mac keyboard shortcuts are available though (e.g. Command-O for opening a file); these are mapped to the Super modifier (i.e., the Apple/Command key functions as Super).

* [http://emacsformacosx.com/ GNU Emacs 23.3 (Cocoa)]
* [http://atomized.org/wp-content/cocoa-emacs-nightly/ Nightly builds] of GNU Emacs 23 (Cocoa) from BZR, provided by IanEure

==== Building AucTeX on OS/X with vanilla Emacs.app ====
: Borrowed from this [http://superuser.com/questions/171681/installing-auctex-1-86-over-emacs-app-in-os-x forum]
# Install the MacTeX 2010 (based on TeXLive 2010) distribution package
# [http://emacsformacosx.com/ Download OS X emacs], place in /Applications
# [http://www.gnu.org/software/auctex/ Download the Auctex tarball] and
# Go to the Auctex directory, and configure with this specific command (Emacs.app and TeXLive 2010 on OS/X):
<pre>
./configure --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs \
--with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp \
--with-texmf-dir=/usr/local/texlive/texmf-local
make
sudo make install
</pre>
:: to install the AucTeX elisp files inside the Emacs.app, the info files to /usr/local/share/info, etc.
:: Edit your ~/.emacs file to load Auctex/preview-latex, and point Emacs to your Latex executables (you can verify by Esc ! echo $PATH and Ctrl_h v exec-path that they aren't there already):

<pre>
(setenv "PATH" (concat "/usr/texbin:/usr/local/bin:" (getenv "PATH")))
(setq exec-path (append '("/usr/texbin" "/usr/local/bin") exec-path))
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
</pre>
:: Auctex and preview-latex should work now. One thing to keep in mind: with older versions of Auctex, the ps pathway seems to work better than pdf; if preview-latex images aren't appearing with the error "/typecheck in --setfileposition--", try disabling "Generate PDF" via "Menu Bar -> Command -> TeXing option".



=== OS X Distributions with extras ===

Custom distributions contain startup routines and tweaks to make Emacs' UI behavior more "Mac-like". In addition to that, they typically include recent versions of popular packages.

* [http://homepage.mac.com/zenitani/emacs-e.html CarbonEmacsPackage] provides authentic look and feel of original Emacs, and is a Mac-friendly distribution based on GNU Emacs 22.3. It uses the ".emacs" file under an user's home directory, making the migration from/to a UNIX/Linux environment easy and straightforward. It comes with tons of extra packages (including AUCTeX, ColorTheme, EmacsMuse, EmacsSession, EmacsSpeaksStatistics, HaskellMode, HowmMode, [[Mew]], [NxhtmlMode nXhtml], PhpMode, PoMode, PsgmlMode, PythonMode, RubyMode etc.) Several Mac-friendly features are added; window-opacity, OSX keyboard shortcuts (MacKeyMode), cocoa-style print dialog (MacPrintMode) and support for filenames with accent signs. A Universal Binary application is available.

* [http://aquamacs.org AquamacsEmac]s is a convenient distribution based on GNU Emacs 23.2 and is based on Cocoa. Aquamacs comes preconfigured with a large number for packages and differs from other Emacsen in that it feels more like a Mac OS X application. OS X standard keyboard shortcuts are supported, files open in separate windows or tabs, nice fonts are available, and it has a convenient drag&drop installer. Hundreds of file types are supported (C, Java, HTML, Python, Ruby, AppleScript, XML, R (Splus), LaTeX (AUCTeX) etc.). All these extra modes come included and readily configured -- no InitFile hacking. Spell checking is easy to install (e.g., CocoAspell) and asian input methods are also supplied, and options to deal with the missing Meta key on Mac keyboards. A Universal App for PPC and Intel Macs that works well on Panther, Tiger and Leopard. Recommended for Mac users who want an Emacs that is tailored to the Mac.
* [http://aquamacs.org AquamacsEmac]s is a convenient distribution based on GNU Emacs 23.2. Aquamacs comes preconfigured with a large number for packages and differs from other Emacsen in that it feels more like a Mac OS X application. OS X standard keyboard shortcuts are supported, files open in separate windows or tabs, nice fonts are available, and it has a convenient drag&drop installer. Hundreds of file types are supported (C, Java, HTML, Python, Ruby, AppleScript, XML, R (Splus), LaTeX (AUCTeX) etc.). All these extra modes come included and readily configured -- no InitFile hacking. Spell checking is easy to install (e.g., CocoAspell) and asian input methods are also supplied, and options to deal with the missing Meta key on Mac keyboards. Aquamacs is based on Cocoa, the modern user interface framework in OS X. It is a ready-to-use Universal App for PPC and Intel Macs that works well on all recent Mac OS X versions. Recommended for Mac users who want an Emacs that is tailored to the Mac. [http://aquamacs.org/nightlies.shtml Experimental versions] based on GNU Emacs 24 (in development) are also available.

* [http://vgoulet.act.ulaval.ca/en/emacs/mac Emacs for OS X Modified] is a distribution based on the latest stable release of GNU Emacs with a few additions, most notably [CategoryESS ESS] and AUCTeX. Otherwise, this is a stock distribution of Emacs. Users of Emacs on other platforms will appreciate the similar look and feel of the application.


* [http://homepage.mac.com/zenitani/emacs-e.html CarbonEmacsPackage] provides authentic look and feel of original Emacs, and is a Mac-friendly distribution based on an older version of Emacs, GNU Emacs 22.3. ([http://groups.google.com/group/carbon-emacs/browse_thread/thread/8d87f6babc1f3e29 Newer versions are not planned].) It uses the ".emacs" file under an user's home directory, making the migration from/to a UNIX/Linux environment easy and straightforward. It comes with tons of extra packages (including AUCTeX, ColorTheme, EmacsMuse, EmacsSession, EmacsSpeaksStatistics, HaskellMode, HowmMode, [[Mew]], [NxhtmlMode nXhtml], PhpMode, PoMode, PsgmlMode, PythonMode, RubyMode etc.) Several Mac-friendly features are added; window-opacity, OSX keyboard shortcuts (MacKeyMode), cocoa-style print dialog (MacPrintMode) and support for filenames with accent signs. A Universal Binary application is available.

* [http://members.shaw.ca/akochoi-xemacs/ XEmacs 21.5.18 *beta*], AndrewChoi. Also available via !DarwinPorts. Via patches from his home page, you can fix a number of issues, and the patches apply to XEmacs 21.5.22 (See AkochoiXEmacsGplCompliance).

=== OS 9 Binaries ===

The newest available version is 20.6. It does not support asynchronous processes or network connections, so Gnus and ViewMail do not work. A hack using AppleEvents has been used to make RMAIL interface with Eudora if it exists on the Macintosh.
=== OS X Binary Vanilla builds ===

The most recent available version of XEmacs is Pitts Jarvis's [http://homepage.mac.com/pjarvis/xemacs.html XEmacs 19.14].
These builds are based on the BZR version of GNU Emacs and do not contain any additional packages or patches. Popular Mac keyboard shortcuts are available though (e.g. Command-O for opening a file); these are mapped to the Super modifier (i.e., the Apple/Command key functions as Super).

* [http://emacsformacosx.com/ GNU Emacs 23.3 (Cocoa)]

Thanks to SebastienKirche, a precompiled development release of [http://sebastien.kirche.free.fr/emacs_stuff/en.html GNU Emacs 21.3.50] is available for Mac OS 9. The cut/copy/paste buffer is not shared with the OS, so no pasting from other applications. Drag and drop is not supported on the command line, but draging a text file to the application icon is. Also, it works when QuickTime 5.0.5 is installed, but not with 4.1.2 If you're missing QT5 you should be able to get it [http://docs.info.apple.com/article.html?artnum=120132 here].

== Building Emacs From Source ==

Expand Down Expand Up @@ -151,19 +116,6 @@ Directions to build and install may be found in the file newly downloaded to ema
Note: Carbon emacs has been replaced with Cocoa Emacs in Emacs 23.x.




=== Building Emacs for OS 9 ===

Emacs can be compiled on the classic MacOS using the Macintosh
Programmer's Workshop. MPW is a unix-like environment for the
MacOS, which used to cost thousands $$$$ USD but is
now freely available due to believed obsolescence. Die hard
MacOS9 aficiondos rejoice[http://uebersetzer1.wordpress.com/ .]
MPW is available from:
ftp://ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./
Then, follow the instructions in the Emacs source, in the file $EMACS/mac/INSTALL .

== Packages ==

=== Fink ===
Expand Down
7 changes: 5 additions & 2 deletions SmartTabs
Expand Up @@ -21,8 +21,7 @@ This page provides code which improves on Emacs' auto-indenting, so that wheneve
[:Implementations]
== Code ==

: ''This should probably be packaged to make things easier. <tt>[http://gist.github.com/188961 smart-tabs.el]</tt>, anyone?
See <tt>[http://github.com/jcsalomon/smarttabs jcsalomon/smarttabs]</tt> on GitHub where I’ve merged all the branches I could find.''
: ''This has been packaged and is available as a minor mode; see [[#Packaging|below]]''

Add the code below to <tt>[InitFile .emacs]</tt> to make Emacs insert the proper amount of tabs and spaces automatically, provided ##indent-tabs-mode## is not disabled (see [[#Toggling|toggling]]). Then, to indent ''and'' align, just press '##<tab>##' as usual.

Expand Down Expand Up @@ -134,6 +133,10 @@ Smart tabs are only used when ##indent-tabs-mode## is non-##nil## (default). Typ

See GuessStyle for a package which attempts to determine the proper values for ##indent-tabs-mode## and the indentation offset by analysing how the file is formatted. (Of course, since smart tabs are tab size-independent, such files do not ''have'' an offset.)

[:Packaging]
== Packaging ==
This code is now available as an Emacs minor mode on [[http://github.com/jcsalomon/smarttabs|GitHub]]; see the file <tt>smart-tabs-mode.el</tt>. Bug reports, code contributions, etc., are all welcome. —JCSalomon

[:SimpleAlgorithm]
== Code explanation ==

Expand Down

0 comments on commit 48a6b3d

Please sign in to comment.