From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: latex-mode hook? Date: Tue, 9 Sep 2014 09:51:51 +0200 Organization: WMI UAM Message-ID: <20140909095151.706f3cdd@aga-netbook> References: <87bnqr27vm.fsf@skimble.plus.com> <87ppf7feq0.fsf@debian.uxu> <878ultg4mc.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1410249813 751 80.91.229.3 (9 Sep 2014 08:03:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2014 08:03:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 09 10:03:29 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XRGE1-0001ir-Fy for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 09:52:29 +0200 Original-Received: from localhost ([::1]:48007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRGE1-0000FP-5P for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 03:52:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRGDb-0008Qs-3D for help-gnu-emacs@gnu.org; Tue, 09 Sep 2014 03:52:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRGDV-000653-LB for help-gnu-emacs@gnu.org; Tue, 09 Sep 2014 03:52:03 -0400 Original-Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:47010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRGDV-00064g-EF for help-gnu-emacs@gnu.org; Tue, 09 Sep 2014 03:51:57 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id A6AC845794 for ; Tue, 9 Sep 2014 09:51:54 +0200 (CEST) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zu4ncTS49B4a for ; Tue, 9 Sep 2014 09:51:54 +0200 (CEST) Original-Received: from aga-netbook (abvd91.neoplus.adsl.tpnet.pl [83.8.201.91]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 5FA5B45773 for ; Tue, 9 Sep 2014 09:51:54 +0200 (CEST) In-Reply-To: <878ultg4mc.fsf@debian.uxu> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.20; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:808:114:2::50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99723 Archived-At: Dnia 2014-09-08, o godz. 23:54:35 Emanuel Berg napisa=C5=82(a): > Marcin Borkowski writes: >=20 > > and LaTeX-mode is the AUCTeX's one > > (which is much, much better think autocompletion >=20 > I > I think > I think not C-c C-e enum TAB RET and you get \begin{enumerate} (point) \end{enumerate} How is that not a win? And it even understands your \newcommand and \newenvironment invocations. > > Also the texmathp function. > > And parsing of \usepackage[...]{inputenc}. And more. >=20 > What are those? texmathp (as the name implies?) returns t if the point is in math mode and nil otherwise. It knows about $...$, \(...\), \[...\], \begin{equation} ... \end{equation}, it handles $...$ inside \text{...} inside \[...\] etc. correctly... See here: http://mbork.pl/?search=3Dtexmathp for two possible applications. In AUCTeX, if I have \usepackage[cp1250]{inputenc} near the beginning, the buffer is automatically put in the respective encoding. It's not a big deal in English-speaking countries, I guess, but here in Poland, where Windoze uses CP-1250, old Linux files use ISO-8859-2 and everyone else uses UTF-8, it's /very/ convenient. Best, --=20 Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University