emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
@ 2010-06-30 18:49 Tassilo Horn
  2010-06-30 19:44 ` Sébastien Vauban
  0 siblings, 1 reply; 14+ messages in thread
From: Tassilo Horn @ 2010-06-30 18:49 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

I have an org file like that:

--8<---------------cut here---------------start------------->8---
#+STARTUP: beamer
#+LaTeX_CLASS: beamer
#+TITLE: Implementieren, Integrieren, Installieren
#+AUTHOR: Tassilo Horn
#+EMAIL: horn@uni-koblenz.de
#+LANGUAGE: de
#+BEAMER_FRAME_LEVEL: 2
#+LaTeX_CLASS_OPTIONS: [presentation]
#+BEAMER_HEADER_EXTRA: \usetheme{Madrid} \institute{IST, University Koblenz}

* Implementieren

** Composite Pattern

   #+ATTR_LaTeX: width=\textwidth
   [[./composite-pattern.png]]
--8<---------------cut here---------------end--------------->8---

Unfortunately, the image doesn't show up, but the #+ATTR_LaTeX is
displayed literally.  Here's the LaTeX code produced by the LaTeX
export.

--8<---------------cut here---------------start------------->8---
\begin{frame}
\frametitle{Composite Pattern}
\label{sec-1_3}


   \#+ATTR_\LaTeX{}: width=\textwidth
   \includegraphics[width=\textwidth]{./composite-pattern.png}
\end{frame}
--8<---------------cut here---------------end--------------->8---

As you can see, the option is there, but it's also added (nearly)
literally...

Emacs  : GNU Emacs 24.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-06-29 on thinkpad
Package: Org-mode version 6.36trans (release_6.36.461.g798e)

current state:
==============
(setq
 org-log-done 'time
 org-archive-default-command 'org-archive-set-tag
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-link-frame-setup '((vm . vm-visit-folder) (gnus . org-gnus-no-new-news) (file . find-file-other-window))
 org-special-ctrl-a/e 'reversed
 org-agenda-files '("/home/horn/repos/org")
 org-agenda-include-diary t
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-gnus-prefer-web-links t
 org-fontify-whole-heading-line t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-attach-directory "/home/horn/repos/org/attachments"
 org-special-ctrl-k t
 org-agenda-time-leading-zero t
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-agenda-restore-windows-after-quit t
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-finalize-agenda-hook '(th-org-agenda-to-appt)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "DELEGATED(g)" "IDEA(i)" "|" "DONE(d)" "CANCELLED(c)"))
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-directory "/home/horn/repos/org"
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers)
 org-mode-hook '(th-org-mode-init
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-refile-targets '((org-agenda-files :maxlevel . 5))
 org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-hash-at-point org-babel-execute-src-block-maybe)
 org-complete-tags-always-offer-all-agenda-tags t
 org-return-follows-link t
 org-confirm-elisp-link-function 'yes-or-no-p
 org-refile-use-outline-path 'file
 org-log-into-drawer "LOGBOOK"
 org-icalendar-categories '(all-tags category)
 org-agenda-mode-hook '(th-org-agenda-mode-init)
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks))
 org-enforce-todo-dependencies t
 org-refile-allow-creating-parent-nodes 'confirm
 org-occur-hook '(org-first-headline-recenter)
 org-icalendar-include-body t
 org-agenda-skip-additional-timestamps-same-entry nil
 org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code)
 org-modules '(org-attach org-protocol org-id org-bbdb org-bibtex org-docview org-gnus org-info org-jsinfo org-irc
               org-w3m)
 org-columns-default-format "%50ITEM %TODO %ALLTAGS %SCHEDULED %DEADLINE"
 outline-minor-mode-hook '(th-outline-minor-mode-init)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames
                               org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-attach-method 'mv
 org-export-blocks '((src org-babel-exp-src-blocks nil) (comment org-export-blocks-format-comment t)
                     (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil))
 )

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

* Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 18:49 Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)] Tassilo Horn
@ 2010-06-30 19:44 ` Sébastien Vauban
  2010-06-30 20:44   ` Eric Schulte
  0 siblings, 1 reply; 14+ messages in thread
From: Sébastien Vauban @ 2010-06-30 19:44 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Tassilo,

Tassilo Horn wrote:
> * Implementieren
>
> ** Composite Pattern
>
>    #+ATTR_LaTeX: width=\textwidth
>    [[./composite-pattern.png]]
>
> Unfortunately, the image doesn't show up, but the #+ATTR_LaTeX is
> displayed literally.  Here's the LaTeX code produced by the LaTeX
> export.

Just for information, this must be the same cause as for the symptom I
described in "Tables and environment with parameters".

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 19:44 ` Sébastien Vauban
@ 2010-06-30 20:44   ` Eric Schulte
  2010-06-30 20:58     ` Sébastien Vauban
  2010-06-30 21:05     ` Nicolas Goaziou
  0 siblings, 2 replies; 14+ messages in thread
From: Eric Schulte @ 2010-06-30 20:44 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

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

Hi,

The attached patch fixes this issue (and I believe the issue Sébastien
mentioned earlier) on my system.

Best -- Eric


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-exp-comment-regexp-now-matches-indented-comments.patch --]
[-- Type: text/x-diff, Size: 1005 bytes --]

From 9a80e142eb9d39d70dbaa4a574653bea76abb31b Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Wed, 30 Jun 2010 13:41:13 -0700
Subject: [PATCH] org-exp: comment regexp now matches indented comments

* lisp/org-exp.el (org-export-handle-comments): comment regexp no
  longer requires comments to start at the beginning of a line.
---
 lisp/org-exp.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 54afdac..766167e 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1638,7 +1638,7 @@ table line.  If it is a link, add it to the line containing the link."
   "Remove comments, or convert to backend-specific format.
 COMMENTSP can be a format string for publishing comments.
 When it is nil, all comments will be removed."
-  (let ((re "^\\(#\\|[ \t]*#\\+ \\)\\(.*\n?\\)")
+  (let ((re "^[ \t]*\\(#\\|[ \t]*#\\+ \\)\\(.*\n?\\)")
 	pos)
     (goto-char (point-min))
     (while (or (looking-at re)
-- 
1.7.0.4


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


Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> Hi Tassilo,
>
> Tassilo Horn wrote:
>> * Implementieren
>>
>> ** Composite Pattern
>>
>>    #+ATTR_LaTeX: width=\textwidth
>>    [[./composite-pattern.png]]
>>
>> Unfortunately, the image doesn't show up, but the #+ATTR_LaTeX is
>> displayed literally.  Here's the LaTeX code produced by the LaTeX
>> export.
>
> Just for information, this must be the same cause as for the symptom I
> described in "Tables and environment with parameters".
>
> Best regards,
>   Seb

[-- Attachment #4: 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 related	[flat|nested] 14+ messages in thread

* Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 20:44   ` Eric Schulte
@ 2010-06-30 20:58     ` Sébastien Vauban
  2010-06-30 21:05     ` Nicolas Goaziou
  1 sibling, 0 replies; 14+ messages in thread
From: Sébastien Vauban @ 2010-06-30 20:58 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric,

> The attached patch fixes this issue (and I believe the issue Sébastien
> mentioned earlier) on my system.
>
> Subject: [PATCH] org-exp: comment regexp now matches indented comments
>
> * lisp/org-exp.el (org-export-handle-comments): comment regexp no
>   longer requires comments to start at the beginning of a line.

What do you (all) think of the idea of foreseeing a possibility to have (at
least some interesting of) those "table properties" (like TBLNAME and
formulas) outputted in the PDF documents, for debugging or giving more insight
to the reader -- something that normal people can't have with Excel tables
copied/pasted in Word documents ;-)

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 20:44   ` Eric Schulte
  2010-06-30 20:58     ` Sébastien Vauban
@ 2010-06-30 21:05     ` Nicolas Goaziou
  2010-06-30 21:26       ` Eric Schulte
  1 sibling, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2010-06-30 21:05 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Sébastien Vauban, emacs-orgmode

Hi Eric,

I do not think this is the right fix. You are only allowing lines
like :

---
     # a line of text
---

to be treated as comments, when they are not! The first regex is the
one matching comments definition (# on column 0 and '#+ ' everywhere).
Handling of lines like #+ATTR_LaTeX should be processed outside of
comments handling functions to not add confusion.

Moreover, I mailed a fix earlier (see thread with Sebastian Rose:
unwanted #+attr_backend and #+backend stuff) which already solves that
problem, among others.

Regards,

-- Nicolas

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

* Re: Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 21:05     ` Nicolas Goaziou
@ 2010-06-30 21:26       ` Eric Schulte
  2010-06-30 22:22         ` Nicolas Goaziou
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Schulte @ 2010-06-30 21:26 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Sébastien Vauban, emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hi Eric,
>
> I do not think this is the right fix. You are only allowing lines
> like :
>
> ---
>      # a line of text
> ---
>
> to be treated as comments, when they are not! The first regex is the
> one matching comments definition (# on column 0 and '#+ ' everywhere).
> Handling of lines like #+ATTR_LaTeX should be processed outside of
> comments handling functions to not add confusion.
>
> Moreover, I mailed a fix earlier (see thread with Sebastian Rose:
> unwanted #+attr_backend and #+backend stuff) which already solves that
> problem, among others.
>

Yes, this patch has been floundering on the patchwork server for a while
now.  I've been reticent to apply it hoping that someone with more
familiarity with the export engine would take care of it.  At this point
however I think delaying it's application is doing more hard than good.

I'd like to apply this, however one last question.  This patch doesn't
address Sébastien's table issue, namely

--8<---------------cut here---------------start------------->8---
** table comment issue
#+BEGIN_changemargin {-4.2cm}{0cm}
  #+TBLNAME: AutresFPNVE
  #+ATTR_LaTeX: align=lrrrrr
  |   |                                          | Montant total (\EUR) | Taux amort (\%) | Part pro. (\%) | Déduc (\%) | NVE (\EUR) |
  |---+------------------------------------------+----------------------+-----------------+----------------+------------+------------|
  |   | Documentation et formation               |                51.05 |                 |                |            |       0.00 |
  |   | Communications GSM                       |               831.16 |             100 |             25 |        100 |     207.79 |
  |   | Internet (Dommel)                        |               167.88 |             100 |             33 |        100 |      55.40 |
  |   | Fournitures à amortir (ordinateur + GSM) |               762.51 |              33 |             80 |        100 |     201.30 |
  |   | Restaurant                               |               304.70 |             100 |            100 |         69 |     210.24 |
  |---+------------------------------------------+----------------------+-----------------+----------------+------------+------------|
  |   | Total                                    |                      |                 |                |            |    1062.02 |
  | ^ |                                          |                      |                 |                |            |      Total |
  #+TBLFM: $7=$3*$4*$5*$6/1000000;%.2f::@2$3=51.05::@3$3=9.00+184.88+51.22+201.82+45.67+69.03+62.93+54.16+38.87+39.77+36.35+37.46::@4$3=12*13.99::@6$3=146.50+158.20;%.2f::@7$7=vsum(@-I..@-II);%.2f
#+END_changemargin
--8<---------------cut here---------------end--------------->8---

Before I apply, should the patch be updated to handle this case?  Let me
know and I'll either apply the current version of the patch, or an
updated version.

Thanks for your patience -- Eric

>
> Regards,
>
> -- Nicolas

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

* Re: Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 21:26       ` Eric Schulte
@ 2010-06-30 22:22         ` Nicolas Goaziou
  2010-06-30 22:49           ` Eric Schulte
  2010-07-01  7:25           ` Sébastien Vauban
  0 siblings, 2 replies; 14+ messages in thread
From: Nicolas Goaziou @ 2010-06-30 22:22 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Sébastien Vauban, emacs-orgmode

I don't know about #+BEGIN_changemargin (but as far as I understand,
it's coming from org-exp-blocks and should be handled during
preprocess-hook, so it is beyond the scope of this patch).

There is some design choice involved here. Until recently, there was a
catch-all function called org-export-handle-comments that was called
at the end of the export process and removed any line starting with
a #. It was certainly useful, but made things hard to debug : had
the #+ATTR_LaTeX line been misinterpreted or just silently deleted ?

At the moment, org-export-handle-comments only handles... comments.
But everything that is not comments has to be taken care of somewhere
else. For example, org-export-attach-captions-and-attributes
deletes #+CAPTIONS and #+ATTR_backend in the process, and
org-export-select-backend-specific-text deletes #+backend
and #+ATTR_backend not used (that's what my patch do, actually).

If you want to apply my patch (v. 2), we have to define a function to
remove #+TBLFM and #+TBLNAME lines because there is none at the
moment. It could be org-export-special-table-lines but it doesn't look
like it's the purpose of that function.

Otherwise, you can just ignore the patch and bring back the full power
to org-export-handle-comments.

I personally prefer avoiding do-it-all functions. But I'm not a
maintainer.

Regards,

-- Nicolas

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

* Re: Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 22:22         ` Nicolas Goaziou
@ 2010-06-30 22:49           ` Eric Schulte
  2010-06-30 23:03             ` Eric Schulte
  2010-07-01  4:44             ` Tassilo Horn
  2010-07-01  7:25           ` Sébastien Vauban
  1 sibling, 2 replies; 14+ messages in thread
From: Eric Schulte @ 2010-06-30 22:49 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Sébastien Vauban, emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> I don't know about #+BEGIN_changemargin (but as far as I understand,
> it's coming from org-exp-blocks and should be handled during
> preprocess-hook, so it is beyond the scope of this patch).
>
> There is some design choice involved here. Until recently, there was a
> catch-all function called org-export-handle-comments that was called
> at the end of the export process and removed any line starting with
> a #. It was certainly useful, but made things hard to debug : had
> the #+ATTR_LaTeX line been misinterpreted or just silently deleted ?
>
> At the moment, org-export-handle-comments only handles... comments.
> But everything that is not comments has to be taken care of somewhere
> else. For example, org-export-attach-captions-and-attributes
> deletes #+CAPTIONS and #+ATTR_backend in the process, and
> org-export-select-backend-specific-text deletes #+backend
> and #+ATTR_backend not used (that's what my patch do, actually).
>

Thanks for the explanation, I found it very useful.

>
> If you want to apply my patch (v. 2), we have to define a function to
> remove #+TBLFM and #+TBLNAME lines because there is none at the
> moment. It could be org-export-special-table-lines but it doesn't look
> like it's the purpose of that function.
>
> Otherwise, you can just ignore the patch and bring back the full power
> to org-export-handle-comments.
>
> I personally prefer avoiding do-it-all functions. But I'm not a
> maintainer.
>

I've applied your patch.  I agree that a catchall cleanup function at
the end of the export process is not solution.  Especially when it makes
some perfectly valid constructs (e.g. nested blocks) impossible to
export.

I'll add a function for clearing out tblname and tblfm lines, and insert
it at the appropriate place in the export process.

Many thanks -- Eric

>
> Regards,
>
> -- Nicolas

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

* Re: Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 22:49           ` Eric Schulte
@ 2010-06-30 23:03             ` Eric Schulte
  2010-07-01  4:44             ` Tassilo Horn
  1 sibling, 0 replies; 14+ messages in thread
From: Eric Schulte @ 2010-06-30 23:03 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Sébastien Vauban, emacs-orgmode

"Eric Schulte" <schulte.eric@gmail.com> writes:

[...]
>
> I'll add a function for clearing out tblname and tblfm lines, and insert
> it at the appropriate place in the export process.
>

done -- Eric

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

* Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 22:49           ` Eric Schulte
  2010-06-30 23:03             ` Eric Schulte
@ 2010-07-01  4:44             ` Tassilo Horn
  2010-07-01  7:48               ` Carsten Dominik
  1 sibling, 1 reply; 14+ messages in thread
From: Tassilo Horn @ 2010-07-01  4:44 UTC (permalink / raw)
  To: emacs-orgmode

"Eric Schulte" <schulte.eric@gmail.com> writes:

Hi Eric,

> I've applied your patch.  I agree that a catchall cleanup function at
> the end of the export process is not solution.  Especially when it
> makes some perfectly valid constructs (e.g. nested blocks) impossible
> to export.

I can confirm that it works for me, now.

Thanks,
Tassilo

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

* Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-06-30 22:22         ` Nicolas Goaziou
  2010-06-30 22:49           ` Eric Schulte
@ 2010-07-01  7:25           ` Sébastien Vauban
  1 sibling, 0 replies; 14+ messages in thread
From: Sébastien Vauban @ 2010-07-01  7:25 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nicolas, Eric, Tassilo and everybody else,

Nicolas Goaziou wrote:
> I don't know about #+BEGIN_changemargin (but as far as I understand, it's
> coming from org-exp-blocks and should be handled during preprocess-hook, so
> it is beyond the scope of this patch).

To be correct, the `#+BEGIN_changemargin' comes from `Org-special-blocks', not
from `Org-exp-blocks':

--8<---------------cut here---------------start------------->8---
;; turn Org blocks into LaTeX environments and HTML divs
;; (markup in environments in LaTeX export, or giving LaTeX attributes to
;; sections in export)
(try-require 'org-special-blocks)
--8<---------------cut here---------------end--------------->8---

I've disabled, for months, `Org-exp-blocks' as I've switched to Org-Babel for
such cases:

--8<---------------cut here---------------start------------->8---
;; switch from org-exp-blocks to Org-babel!
;; ;; pre-process blocks when exporting org files (ditaa, dot, comment, R,
;; ;; etc.)
;; (try-require 'org-exp-blocks)
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-07-01  4:44             ` Tassilo Horn
@ 2010-07-01  7:48               ` Carsten Dominik
  2010-07-01  8:33                 ` Bernt Hansen
  0 siblings, 1 reply; 14+ messages in thread
From: Carsten Dominik @ 2010-07-01  7:48 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-orgmode

Hi everyone,

It seems that the patch in this thread has introduce the following  
problem:
Consider this test file.

> * Test
>
> # test
> \begin{equation}
> \e=mc^2
> \end{equation}
>
> but a^2 should still be treated nicely
>


When exported, the # test line is exported as

    \# test

I have not checked if this really was the patch which did
that, but I suspect it.  Could someone please check?

Thanks.

- Carsten

On Jul 1, 2010, at 6:44 AM, Tassilo Horn wrote:

> "Eric Schulte" <schulte.eric@gmail.com> writes:
>
> Hi Eric,
>
>> I've applied your patch.  I agree that a catchall cleanup function at
>> the end of the export process is not solution.  Especially when it
>> makes some perfectly valid constructs (e.g. nested blocks) impossible
>> to export.
>
> I can confirm that it works for me, now.
>
> Thanks,
> Tassilo
>
>
> _______________________________________________
> 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

- Carsten

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

* Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-07-01  7:48               ` Carsten Dominik
@ 2010-07-01  8:33                 ` Bernt Hansen
  2010-07-01  9:03                   ` Carsten Dominik
  0 siblings, 1 reply; 14+ messages in thread
From: Bernt Hansen @ 2010-07-01  8:33 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Tassilo Horn, emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi everyone,
>
> It seems that the patch in this thread has introduce the following
> problem:
> Consider this test file.
>
>> * Test
>>
>> # test
>> \begin{equation}
>> \e=mc^2
>> \end{equation}
>>
>> but a^2 should still be treated nicely
>>
>
>
> When exported, the # test line is exported as
>
>    \# test
>
> I have not checked if this really was the patch which did
> that, but I suspect it.  Could someone please check?
>
> Thanks.

Fun with git :)

,----
| 0e636dc2ed8dc4c2a4663551d975ee2a6719c967 is the first bad commit
| commit 0e636dc2ed8dc4c2a4663551d975ee2a6719c967
| Author: Eric Schulte <schulte.eric@gmail.com>
| Date:   Sun Jun 27 19:35:34 2010 -0700
| 
|     org-exp: check for protection before removing comments
|     
|     * lisp/org-exp.el (org-export-handle-comments): check for protection
|       before removing comments
| 
| :040000 040000 141f3fd1e9870e39b8dd863668d0d65dfc3677f3 9c5ff59abd1941ef3ba7969156a4ad6ad19fb0eb M	lisp
| bisect run success
`----

This commit was determined automatically with git bisect and the
following script/setup.

,----[ /tmp/test.org ]
| * Test
| 
| # test
| \begin{equation}
| \e=mc^2
| \end{equation}
| 
| but a^2 should still be treated nicely
`----

,----[ /tmp/bisect.sh ]
| #/bin/sh
| emacs -batch -q -l /home/bernt/minimal.emacs -l /tmp/export-quit.el 
| if grep '^\\# test' /tmp/test.tex
| then
|     exit 1
| else
|     exit 0
| fi
`----

,----[ /home/bernt/minimal.emacs ]
| (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
| (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
| (setq org-agenda-files '("/tmp/test.org"))
| (require 'org-install)
| 
| (global-set-key "\C-cl" 'org-store-link)
| (global-set-key "\C-ca" 'org-agenda)
| (global-set-key "\C-cb" 'org-iswitchb)
| 
`----

,----[ /tmp/export-quit.el ]
| (find-file "/tmp/test.org")
| (call-interactively 'org-export-as-latex)
| (save-buffers-kill-emacs)
`----

$ git bisect start master 188105
$ git bisect run /tmp/bisect.sh

-Bernt

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

* Re: Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)]
  2010-07-01  8:33                 ` Bernt Hansen
@ 2010-07-01  9:03                   ` Carsten Dominik
  0 siblings, 0 replies; 14+ messages in thread
From: Carsten Dominik @ 2010-07-01  9:03 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Tassilo Horn, emacs-orgmode


On Jul 1, 2010, at 10:33 AM, Bernt Hansen wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Hi everyone,
>>
>> It seems that the patch in this thread has introduce the following
>> problem:
>> Consider this test file.
>>
>>> * Test
>>>
>>> # test
>>> \begin{equation}
>>> \e=mc^2
>>> \end{equation}
>>>
>>> but a^2 should still be treated nicely
>>>
>>
>>
>> When exported, the # test line is exported as
>>
>>   \# test
>>
>> I have not checked if this really was the patch which did
>> that, but I suspect it.  Could someone please check?
>>
>> Thanks.
>
> Fun with git :)

Thank you my wizard. :)

This bug is squashed.

- Carsten

>
> ,----
> | 0e636dc2ed8dc4c2a4663551d975ee2a6719c967 is the first bad commit
> | commit 0e636dc2ed8dc4c2a4663551d975ee2a6719c967
> | Author: Eric Schulte <schulte.eric@gmail.com>
> | Date:   Sun Jun 27 19:35:34 2010 -0700
> |
> |     org-exp: check for protection before removing comments
> |
> |     * lisp/org-exp.el (org-export-handle-comments): check for  
> protection
> |       before removing comments
> |
> | :040000 040000 141f3fd1e9870e39b8dd863668d0d65dfc3677f3  
> 9c5ff59abd1941ef3ba7969156a4ad6ad19fb0eb M	lisp
> | bisect run success
> `----
>
> This commit was determined automatically with git bisect and the
> following script/setup.
>
> ,----[ /tmp/test.org ]
> | * Test
> |
> | # test
> | \begin{equation}
> | \e=mc^2
> | \end{equation}
> |
> | but a^2 should still be treated nicely
> `----
>
> ,----[ /tmp/bisect.sh ]
> | #/bin/sh
> | emacs -batch -q -l /home/bernt/minimal.emacs -l /tmp/export-quit.el
> | if grep '^\\# test' /tmp/test.tex
> | then
> |     exit 1
> | else
> |     exit 0
> | fi
> `----
>
> ,----[ /home/bernt/minimal.emacs ]
> | (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
> | (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\) 
> $" . org-mode))
> | (setq org-agenda-files '("/tmp/test.org"))
> | (require 'org-install)
> |
> | (global-set-key "\C-cl" 'org-store-link)
> | (global-set-key "\C-ca" 'org-agenda)
> | (global-set-key "\C-cb" 'org-iswitchb)
> |
> `----
>
> ,----[ /tmp/export-quit.el ]
> | (find-file "/tmp/test.org")
> | (call-interactively 'org-export-as-latex)
> | (save-buffers-kill-emacs)
> `----
>
> $ git bisect start master 188105
> $ git bisect run /tmp/bisect.sh
>
> -Bernt

- Carsten

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

end of thread, other threads:[~2010-07-01  9:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-30 18:49 Bug: #+ATTR_LaTeX broken in LaTeX export [6.36trans (release_6.36.461.g798e)] Tassilo Horn
2010-06-30 19:44 ` Sébastien Vauban
2010-06-30 20:44   ` Eric Schulte
2010-06-30 20:58     ` Sébastien Vauban
2010-06-30 21:05     ` Nicolas Goaziou
2010-06-30 21:26       ` Eric Schulte
2010-06-30 22:22         ` Nicolas Goaziou
2010-06-30 22:49           ` Eric Schulte
2010-06-30 23:03             ` Eric Schulte
2010-07-01  4:44             ` Tassilo Horn
2010-07-01  7:48               ` Carsten Dominik
2010-07-01  8:33                 ` Bernt Hansen
2010-07-01  9:03                   ` Carsten Dominik
2010-07-01  7:25           ` Sébastien Vauban

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).