From owner-freebsd-questions@FreeBSD.ORG Tue Oct 17 12:36:50 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B510B16A40F for ; Tue, 17 Oct 2006 12:36:50 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACD2443D69 for ; Tue, 17 Oct 2006 12:36:48 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id k9HCaJ0s003065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 17 Oct 2006 15:36:23 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.8/8.13.8) with ESMTP id k9HCatpA013405; Tue, 17 Oct 2006 15:36:56 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.8/8.13.8/Submit) id k9HCasUS012900; Tue, 17 Oct 2006 15:36:54 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 17 Oct 2006 15:36:54 +0300 From: Giorgos Keramidas To: Svein Halvor Halvorsen Message-ID: <20061017123654.GE68213@gothmog.pc> References: <45340E01.5080709@lvor.halvorsen.cc> <20061016231947.GA25692@epia2.farid-hajji.net> <453421C5.2020801@lvor.halvorsen.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <453421C5.2020801@lvor.halvorsen.cc> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.594, required 5, AWL -0.20, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: questions@freebsd.org, cpghost Subject: Re: python-mode in emacs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2006 12:36:50 -0000 On 2006-10-17 02:20, Svein Halvor Halvorsen wrote: >cpghost wrote: >> Well, it doesn't cause any harm to add to your ~/.emacs >> >> ;; Add python-mode >> (autoload 'python-mode "python-mode" "Python editing mode." t) >> (setq auto-mode-alist >> (cons '("\\.py$" . python-mode) auto-mode-alist)) >> (add-hook 'python-mode-hook 'turn-on-font-lock) >> >>> Are there any way to get emacs to automatically read files in this >>> directory? Am I missing something? Shouldn't the ports system by >>> default be setup in a way that this would work? >> >> I don't know. But having Emacs auto-load every mode from there >> doesn't seem a good idea. And the port can't do that either, since >> it's a per-user decision. > > I wasn't suggesting emacs autoload every mode, but rather that emacs > simply read the files, and offer me the choice of using modes defines > in such files. > > E.g. do the same as > $emacs -l /usr/local/share/emacs/site-lisp/python-mode.el > > If I start emacs by just typing "emacs", and then use "esc-x" > python-mode is not an option. However, If I use the -l option, > python-mode is not automatically loaded, but emacs will then offer me > the option of loading it later. > > Your suggested additions to my .emacs file, seems to work, though. The newer versions of GNU Emacs include `python-mode' in the core Emacs distribution, so you might want to try the editors/emacs-devel port :) The distfiles of this port are generated from CVS snapshots of Emacs 22.X, which is going to be the next release of GNU Emacs. This version of Emacs still has a few rough edges (i.e. the GTK+ UI crashes on FreeBSD 7.0-CURRENT), but it has worked remarkably well for several months here. If you give it a try, please let me know, as all the testing we can get is nice.