Re: [O] [Bug] beamer backend and org-reload

2013-03-06 Thread Suvayu Ali
I can confirm this is fixed now.  :)

Thanks,


On Wed, Mar 06, 2013 at 12:29:10AM +0100, Nicolas Goaziou wrote:
 Hello,
 
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  Hi Achim,
 
  On Tue, Mar 05, 2013 at 07:26:54PM +0100, Achim Gratz wrote:
  Suvayu Ali writes:
   That said, I have noticed something odd about the new exporter and
   org-reload.  I think with the new exporter after doing org-reload, org
   related config is not reloaded properly.
  
  Config is not reloaded at all (and never has been), any configuration
  variables that are already existing are not touched when the file gets
  reloaded.
  
   This borks the Org instance.  This is more visible when using the
   Beamer backend since it requires customisation of org-latex-classes by
   the user.  One of these days, I'll try to come up with a proper recipe
   to reproduce this.
  
  Please do, this should not happen.
 
  Here is the recipe:
 
  1. emacs -nw -Q -l ~/minimal-org.el
 
 ;;; minimal-org.el: Minimal setup to load latest `org-mode'
 
 ;;; Code:
 (setq debug-on-error t
   debug-on-signal nil
   debug-on-quit nil)
 
 (add-to-list 'load-path (expand-file-name ~/build/org-mode/lisp))
 
 (require 'ox-beamer)
 (add-to-list 'org-latex-classes
  '(beamer
\\documentclass\[presentation\]\{beamer\}
(\\section\{%s\} . \\section*\{%s\})
(\\subsection\{%s\} . \\subsection*\{%s\})
(\\subsubsection\{%s\} . \\subsubsection*\{%s\})))
 
  2. C-x C-f some-file.org RET
  3. Now try to export: C-c C-e.  You can see menu options for beamer export.
  4. Now reload Org: C-c C-x !.  Try step 3 again.  You will notice the
 entries for beamer is missing.
 
 This should be fixed in master. Thank you.
 
 
 Regards,
 
 -- 
 Nicolas Goaziou

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [Bug] beamer backend and org-reload

2013-03-05 Thread Achim Gratz
Suvayu Ali writes:
(add-to-list 'org-latex-classes
 '(beamer
   \\documentclass\[presentation\]\{beamer\}
   (\\section\{%s\} . \\section*\{%s\})
   (\\subsection\{%s\} . \\subsection*\{%s\})
   (\\subsubsection\{%s\} . \\subsubsection*\{%s\})))

Pilot error, I'd say: org-latex-classes is a defcustom, I don't think it
is a good idea to muck with the data directly (it doesn't have
getter/setter methods IIRC, but still).  So what happens when you add
the beamer classes properly, via customize — and then do an org-reload?



Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] [Bug] beamer backend and org-reload

2013-03-05 Thread Suvayu Ali
Hi Achim,

On Tue, Mar 05, 2013 at 09:50:29PM +0100, Achim Gratz wrote:
 Suvayu Ali writes:
 (add-to-list 'org-latex-classes
  '(beamer
\\documentclass\[presentation\]\{beamer\}
(\\section\{%s\} . \\section*\{%s\})
(\\subsection\{%s\} . \\subsection*\{%s\})
(\\subsubsection\{%s\} . \\subsubsection*\{%s\})))
 
 Pilot error, I'd say: org-latex-classes is a defcustom, I don't think it
 is a good idea to muck with the data directly (it doesn't have
 getter/setter methods IIRC, but still).  So what happens when you add
 the beamer classes properly, via customize — and then do an org-reload?

I see the same problem when I put the following in my minimal-org.el

(custom-set-variables
 '(org-latex-classes (quote ((beamer \\documentclass[presentation]{beamer} 
(\\section{%s} . \\section*{%s}) (\\subsection{%s} . \\subsection*{%s}) 
(\\subsubsection{%s} . \\subsubsection*{%s})) (chapter 
\\documentclass[11pt]{report} (\\chapter{%s} . \\chapter*{%s}) 
(\\section{%s} . \\section*{%s}) (\\subsection{%s} . \\subsection*{%s}) 
(\\subsubsection{%s} . \\subsubsection*{%s})) (article 
\\documentclass[11pt]{article} (\\section{%s} . \\section*{%s}) 
(\\subsection{%s} . \\subsection*{%s}) (\\subsubsection{%s} . 
\\subsubsection*{%s}) (\\paragraph{%s} . \\paragraph*{%s}) 
(\\subparagraph{%s} . \\subparagraph*{%s})) (report 
\\documentclass[11pt]{report} (\\part{%s} . \\part*{%s}) (\\chapter{%s} 
. \\chapter*{%s}) (\\section{%s} . \\section*{%s}) (\\subsection{%s} . 
\\subsection*{%s}) (\\subsubsection{%s} . \\subsubsection*{%s})) (book 
\\documentclass[11pt]{book} (\\part{%s} . \\part*{%s}) (\\chapter{%s} . 
\\chapter*{%s}) (\\section{%s} . \\section*{%s}) (\\subsection{%s} . 
\\subsection*{%s}) (\\subsubsection{%s} . \\subsubsection*{%s})
)

I did encounter another curious problem though.  When in the customise
buffer I try to add a new class, I get a customize interface similar to
what is shown below.

  [INS] [DEL] List:
  LaTeX class: beamer
  LaTeX header: \documentclass[presentation]{article}
  Choice: [Value Menu] Heading:
numbered: \section{%s}
  unnumbered: \section*{%s}
  [INS] [DEL] List:
  LaTeX class: article
  LaTeX header: \documentclass[11pt]{article}
  Levels:
  [INS] [DEL] Choice: [Value Menu] Heading:
numbered: \section{%s}
  unnumbered: \section*{%s}
  [INS] [DEL] Choice: [Value Menu] Heading:
numbered: \subsection{%s}
  unnumbered: \subsection*{%s}
  [...]

As you can see, there is no way to add deeper sectioning entries for the
new entry (beamer).  I worked around it for the moment to proceed with
my test, but I find this very curious indeed.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [Bug] beamer backend and org-reload

2013-03-05 Thread Nicolas Goaziou
Hello,

Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 Hi Achim,

 On Tue, Mar 05, 2013 at 07:26:54PM +0100, Achim Gratz wrote:
 Suvayu Ali writes:
  That said, I have noticed something odd about the new exporter and
  org-reload.  I think with the new exporter after doing org-reload, org
  related config is not reloaded properly.
 
 Config is not reloaded at all (and never has been), any configuration
 variables that are already existing are not touched when the file gets
 reloaded.
 
  This borks the Org instance.  This is more visible when using the
  Beamer backend since it requires customisation of org-latex-classes by
  the user.  One of these days, I'll try to come up with a proper recipe
  to reproduce this.
 
 Please do, this should not happen.

 Here is the recipe:

 1. emacs -nw -Q -l ~/minimal-org.el

;;; minimal-org.el: Minimal setup to load latest `org-mode'

;;; Code:
(setq debug-on-error t
  debug-on-signal nil
  debug-on-quit nil)

(add-to-list 'load-path (expand-file-name ~/build/org-mode/lisp))

(require 'ox-beamer)
(add-to-list 'org-latex-classes
 '(beamer
   \\documentclass\[presentation\]\{beamer\}
   (\\section\{%s\} . \\section*\{%s\})
   (\\subsection\{%s\} . \\subsection*\{%s\})
   (\\subsubsection\{%s\} . \\subsubsection*\{%s\})))

 2. C-x C-f some-file.org RET
 3. Now try to export: C-c C-e.  You can see menu options for beamer export.
 4. Now reload Org: C-c C-x !.  Try step 3 again.  You will notice the
entries for beamer is missing.

This should be fixed in master. Thank you.


Regards,

-- 
Nicolas Goaziou