From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Horn Subject: Re: Re: Export error. Have a look at my backtrace? Date: Tue, 8 Feb 2011 15:31:58 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=36945 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmuEW-0004lz-Uz for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 15:32:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmuEV-0003VM-Q9 for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 15:32:20 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:37340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmuEV-0003Um-LE for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 15:32:19 -0500 Received: by fxm12 with SMTP id 12so6692883fxm.0 for ; Tue, 08 Feb 2011 12:32:18 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Lawrence Mitchell Cc: emacs-orgmode@gnu.org Forwarded to Aquamacs. Thanks. On Tue, Feb 8, 2011 at 11:55 AM, Lawrence Mitchell wrote: > Jeff Horn wrote: > >> Hey orgsters, > >> Export started behaving weirdly for me earlier this week. When I >> export to HTML or ASCII to a temporary buffer, I get the attached >> backtrace. This occurs in emacs 24 (Aquamacs) with org-mode 7.4. The >> error does not occur if I export to file. > >> Also, exporting to a temporary buffer works as expected in emacs 23.2 >> with org-mode 7.4 in terminal emacs. > >> Error occurs with every file I have tried in the past few days. Can >> anyone else reproduce? I'll come up with a minimal working example if >> needed. > > This is an Aquamacs specific issue, I believe. =A0What happens is > that Emacs tries to guess the major mode of the temporary > buffer. =A0Aquamacs has the following entry in either > magic-mode-alist, or magic-fallback-mode-alist. > > (objc-mode-buffer-check . objc-mode) > > So it calls the objc-mode-buffer-check function, and puts the > buffer in objc-mode if the former returns non-nil. =A0Here's the > definition of said function: > > (defun objc-mode-buffer-check () > =A0 (if (string-match "\\.m$" buffer-file-name) > =A0 =A0 =A0 (save-restriction > =A0 =A0 =A0 =A0(narrow-to-region (point-min) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(min (point-max) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (+ (point-min= ) magic-mode-regexp-match-limit))) > =A0 =A0 =A0 =A0(looking-at "\\(.\\|\n\\)*#\\(include\\|define\\|import\\)= ")))) > > > The culprit is the first line, this function should first check > that buffer-file-name is a string before trying to match against > it. =A0So you should probably shout at the Aquamacs developers :P. > > Lawrence > -- > Lawrence Mitchell > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --=20 Jeffrey Horn http://www.failuretorefrain.com/jeff/