emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Export error. Have a look at my backtrace?
@ 2011-02-08 16:31 Jeff Horn
  2011-02-08 16:55 ` Lawrence Mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Horn @ 2011-02-08 16:31 UTC (permalink / raw)
  To: Org-mode ml

[-- Attachment #1: Type: text/plain, Size: 600 bytes --]

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.

Thanks for any pointers.

Jeff

-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/

[-- Attachment #2: html-subtree-export-backtrace --]
[-- Type: application/octet-stream, Size: 32838 bytes --]

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Export error. Have a look at my backtrace?
  2011-02-08 16:31 Export error. Have a look at my backtrace? Jeff Horn
@ 2011-02-08 16:55 ` Lawrence Mitchell
  2011-02-08 20:31   ` Jeff Horn
  0 siblings, 1 reply; 3+ messages in thread
From: Lawrence Mitchell @ 2011-02-08 16:55 UTC (permalink / raw)
  To: emacs-orgmode

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.  What happens is
that Emacs tries to guess the major mode of the temporary
buffer.  Aquamacs 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.  Here's the
definition of said function:

(defun objc-mode-buffer-check ()
   (if (string-match "\\.m$" buffer-file-name)
       (save-restriction
        (narrow-to-region (point-min)
                          (min (point-max)
                               (+ (point-min) magic-mode-regexp-match-limit)))
        (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.  So you should probably shout at the Aquamacs developers :P.

Lawrence
-- 
Lawrence Mitchell <wence@gmx.li>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: Export error. Have a look at my backtrace?
  2011-02-08 16:55 ` Lawrence Mitchell
@ 2011-02-08 20:31   ` Jeff Horn
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Horn @ 2011-02-08 20:31 UTC (permalink / raw)
  To: Lawrence Mitchell; +Cc: emacs-orgmode

Forwarded to Aquamacs. Thanks.

On Tue, Feb 8, 2011 at 11:55 AM, Lawrence Mitchell <wence@gmx.li> 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.  What happens is
> that Emacs tries to guess the major mode of the temporary
> buffer.  Aquamacs 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.  Here's the
> definition of said function:
>
> (defun objc-mode-buffer-check ()
>   (if (string-match "\\.m$" buffer-file-name)
>       (save-restriction
>        (narrow-to-region (point-min)
>                          (min (point-max)
>                               (+ (point-min) magic-mode-regexp-match-limit)))
>        (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.  So you should probably shout at the Aquamacs developers :P.
>
> Lawrence
> --
> Lawrence Mitchell <wence@gmx.li>
>
>
> _______________________________________________
> 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
>



-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-08 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08 16:31 Export error. Have a look at my backtrace? Jeff Horn
2011-02-08 16:55 ` Lawrence Mitchell
2011-02-08 20:31   ` Jeff Horn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).