From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: [export] Easy way to make children of Beamer frames generate list items? Date: Sat, 14 Sep 2013 17:15:08 +0200 Message-ID: <20130914151508.GH28088@kuru.dyndns-at-home.com> References: <5234728E.3000901@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKrZC-0003FT-QN for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 11:15:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKrZ4-0004b1-C9 for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 11:15:22 -0400 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]:38738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKrZ4-0004aq-4p for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 11:15:14 -0400 Received: by mail-ee0-f43.google.com with SMTP id e52so1157030eek.30 for ; Sat, 14 Sep 2013 08:15:13 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Christoph and John, I'll take an extreme view here. So apologies in advance. On Sat, Sep 14, 2013 at 09:40:50AM -0500, John Hendy wrote: > On Sat, Sep 14, 2013 at 9:28 AM, Christoph LANGE > wrote: > > Dear all, > > > > here is another problem that I have with reusing old Beamer > > presentations (Org version 7) with the new exporter. > > > > The manual says that "all frame's children become `block' environments". > > > > Is there a way of reverting to the default behaviour of the old > > exporter, which by default exported frame's children as list items? > > E.g. by setting a certain property on the frame's children? > > > > Tricky problem, and I could see how this would be an issue. I guess I > always held to using unordered lists (- blah) for my lists vs. relying > on the nested headling functionality (** blah). I wonder if you could > tweak the beamer definition somehow to make a sort of "legacy beamer" > class for exporting these? I think it is unwise to keep coming up with ways to support semantically wrong behaviour just for the sake of backwards compatibility. This was changed with good reason and after a lot of discussions. If you continue on this path, you will have to keep maintaining this yourself for all eternity (sorry about the hyperbole :-p). It's a lot of work for a long time just to avoid some annoying work now. > For example, I have the default template in my .emacs from the Beamer > setup instructions on Worg: > > #+begin_src .emacs > > (add-to-list 'org-latex-classes > '("beamer" > "\\documentclass\[presentation\]\{beamer\}" > ("\\section\{%s\}" . "\\section*\{%s\}") > ("\\subsection\{%s\}" . "\\subsection*\{%s\}") > ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}"))) > > > #+end_src > > Perhaps something there could be tweaked? I'm no lisp or org -> latex > mapping person, but perhaps others will have an idea of how you can > map something dynamically so that "One level below the H:number > setting gets converted to \itemize" (vs. the current conversion to > \begin{example} ? I think the answer is in your response; the template is for headlines up to a depth n as specified by H:n. The old (and new) behaviour was (is) for all headlines deeper than n (n+1 and onwards). This is core-functionality, not something that is configurable. That said, I think converting headlines to lists is not difficult. You should be able to define a keyboard macro to semi-automate it. You can mark a headline, C-c @, followed by C-c - to convert to a list. Actually, I think it should be possible to write a custom function to traverse a buffer and convert all headlines deeper than n to lists using these same functions. How about a combination of org-map-entries with a custom function which does something like this (semi-pseudo-code): (lambda nil (if (> depth 3) ; assuming n=3 in H:n (progn (org-mark-subtree) (org-ctrl-c-minus)))) I think you can get depth with something like this: (car (org-heading-components)) Hope this helps, -- Suvayu Open source is the future. It sets us free.