[O] how to show deadlines in global to-do list?
Hi, Apologies if this is a common question -- I did do some google searching, but didn't find a straightforward answer and the agenda options are too complex for me to figure out quickly -- I'm too busy to devote a couple of hours figuring out the right way. I like the out-of-the-box to-do list, except one thing: I would like to see the items' deadlines. The weekly agenda view shows the deadlines, but I need a view where I can see *only* to-do items and their deadlines. I read in the manual about creating custom agenda views, and I see a lot about defining custom searches, but it isn't obvious (to me) how to customize the display of an existing search. I also checked M-x customize-group for agenda options, to do display options and line format, but I don't see anything self-evident. (I don't want to make a custom time-grid view searching only todos: I want the todos displayed in *priority* order, just, if there's a deadline, show it.) I'm quite busy and I have approximately 5 more minutes to devote to this, so if somebody could send me a simple way to add deadlines to the to-do list, I'd be much obliged. Thanks. James -- James Harkins /// dewdrop world jamshar...@dewdrop-world.net http://www.dewdrop-world.net Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal. -- Whitman blog: http://www.dewdrop-world.net/words audio clips: http://www.dewdrop-world.net/audio more audio: http://soundcloud.com/dewdrop_world/tracks
Re: [O] how to show deadlines in global to-do list?
At Fri, 02 Dec 2011 12:01:05 -0500, emacs-orgmode-requ...@gnu.org wrote: Date: Fri, 2 Dec 2011 03:01:36 + (UTC) From: Herbert Sitz hes...@gmail.com To: emacs-orgmode@gnu.org Subject: Re: [O] how to show deadlines in global to-do list? James Harkins jamshark70 at gmail.com writes: I like the out-of-the-box to-do list, except one thing: I would like to see the items' deadlines. The weekly agenda view shows the deadlines, but I need a view where I can see *only* to-do items and their deadlines. Here is one way: Include this line in your org-file's config lines, or just stick it in if you don't have config-line block: #+COLUMNS: %45ITEM %18DEADLINE ... snip Thanks, that's very helpful. It means I can focus my documentation searches on a couple of options rather than several dozen :) -- now that I know that to-do + column view is a good way (if not the best way). James -- James Harkins /// dewdrop world jamshar...@dewdrop-world.net http://www.dewdrop-world.net Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal. -- Whitman blog: http://www.dewdrop-world.net/words audio clips: http://www.dewdrop-world.net/audio more audio: http://soundcloud.com/dewdrop_world/tracks
Re: [O] how to show deadlines in global to-do list?
At Fri, 02 Dec 2011 12:01:05 -0500, emacs-orgmode-requ...@gnu.org wrote: Date: Fri, 2 Dec 2011 03:01:36 + (UTC) From: Herbert Sitz hes...@gmail.com To: emacs-orgmode@gnu.org Subject: Re: [O] how to show deadlines in global to-do list? James Harkins jamshark70 at gmail.com writes: I like the out-of-the-box to-do list, except one thing: I would like to see the items' deadlines. The weekly agenda view shows the deadlines, but I need a view where I can see *only* to-do items and their deadlines. Here is one way: Include this line in your org-file's config lines, or just stick it in if you don't have config-line block: #+COLUMNS: %45ITEM %18DEADLINE ... snip Okay! This is great. Poking around orgmode's info docs turned up the variable org-columns-default-format. Supposedly the variable can be customized, but M-x customize-apropos doesn't find it. In any case: (setq org-columns-default-format %45ITEM %18DEADLINE) in my .emacs forces the to-do column list to include the deadline, if available, with no #+COLUMNS line per file. That's good enough for now: C-a t C-c C-x C-c -- and I know sometime later, when I have a little more time, I can try to crack the custom-search syntax. Thanks! I doubt I would've found my way to column view so quickly on my own. James -- James Harkins /// dewdrop world jamshar...@dewdrop-world.net http://www.dewdrop-world.net Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal. -- Whitman blog: http://www.dewdrop-world.net/words audio clips: http://www.dewdrop-world.net/audio more audio: http://soundcloud.com/dewdrop_world/tracks
Re: [O] Org is awesome
On Mar 25, 2014 3:05 AM, chandan chandanrm...@gmail.com wrote: Can you please post a link to the sources? I would most probably use it as a reference for generating different parts of any documents that I would create. Not just yet. As I said in the email that you quoted, I'm working on a worg page to explain the project's implementation. That page will include a link to the sources. I would rather not publish the link just now, because then I would have to answer questions about it by email, and many of those questions are likely to be answered in the worg page -- redundant effort. So, just be patient -- it'll happen, but not until project documentation is ready. hjh
[O] How to test a draft of a new worg page?
Hi, I just searched worg for test a new worg file, but the results seemed irrelevant to my question, so... As promised, I'm writing up my workflow for the big workshop project. I've cloned worg, saved my (in progress) org file under exporters/beamer. Now I'd like to see what my page will look like *without* having to push anything. I assume I need to specify the worg CSS and perhaps some other export properties, but the details are not easy to find and I don't care to guess at the moment. Can somebody explain *really* how to contribute to worg? Thanks, hjh
Re: [O] org-babel, lilypond, tables
Steven Arntson steven at stevenarntson.com writes: I'm wondering if someone could tell me if this idea is impossible. I'm trying to find a way to leverage org-tables in a document containing lilypond markup for a piano part such that both staves occupy the same line, visually (instead of the lefthand notes occupying the top of the doc and the righthand notes occupying the bottom). Right now I'm accomplishing this with a vertical split in the buffer, which works, but is clunky. I'm quite sure you'll have to write custom emacs-lisp for this. I'd suggest not using tables, though. It looks fine when you have only notes, but as soon as you need an override (and, in piano music, you *will*, sooner or later), the table will become very wide and you'll lose the advantage of seeing both columns at once. I'd probably use plain lists, one item per staff. You could even nest lists for passages of temporary polyphony: ** Bar 1 - ... right hand notes... - Poly - ... left hand voice 1 notes... - ... left hand voice 2 notes... It'll take some extra lisp code to parse all this, but it could work. I have a sneaky feeling, though, that more complex notation requirements may become inconvenient. hjh
[O] Seeking advice on a worg contribution
I finally finished a draft (attached, and not carefully proofread yet) of a new worg page to outline what I had to do for a big Beamer publishing project. Could somebody look it over and advise of any formatting problems? I guess it should be basically OK; I copied the standard worg header, and I stuck to normal org markup throughout. A specific formatting question: I have several source code blocks with captions. The captions are formatted exactly the same as normal paragraphs. Will worg use a different CSS style for captions? If not, what do I have to do to make it do that? (At least, display the captions slightly smaller.) Thanks, hjh#+TITLE: Using Beamer export to produce slideshows and article-style handouts from the same org source #+AUTHOR:James Harkins #+EMAIL: #+DATE: #+LANGUAGE: en #+OPTIONS: H:2 num:nil toc:t \n:nil ::t |:t ^:t -:t f:t *:t #+OPTIONS: tex:t d:(HIDE) tags:not-in-toc #+STARTUP: fold #+CATEGORY: worg * Project overview The project is training material for a one-week intensive workshop in audio synthesis and live-performance control in the SuperCollider programming language. The workshop was commissioned by CHEARS, the China ElectroAcoustic Resource Survey, and will be given first in Shenyang, PRC. I wanted to have thorough presentation slides available, for some kinds of explanation that are difficult otherwise, and also give a PDF book to workshop attendees for their future reference. During the writing process, the book became more important, as a way to provide copyright-free tutorials for translation into Chinese. The book eventually grew to 237 pages (with, admittedly, more white space per page than a standard prose layout), rendered from 10849 lines of LaTeX code, all of which were generated directly by the org Beamer exporter with no manual edits to any of the =tex= files. Achieving that required some ingenuity in both org mode and LaTeX. This worg page documents the project's design and implementation. * Requirements - One org source to produce slideshows and printed material. - Beamer export for both formats. - Normal /beamer/ document class for slides. - Document class /article/ for the book, with =\usepackage{beamerarticle}= in the preamble. - Header files to determine PDF layout. - Additional explanatory text that will be omitted from slideshows. - Use the beamer class option /ignorenonframetext/ for slides. - Put notes under frame-level headings, with the beamer tag =B_ignoreheading=. - Indexed glossaries of terms, classes and methods, without writing cumbersome LaTeX syntax for the glossaries package. - Keep glossary definitions in org tables. - Convert to LaTeX syntax using emacs-lisp source blocks. - Convert only once in the book combining all chapters, but once per slideshow. - Extract captioned source blocks into plain-text files for SuperCollider. - =org-element-map= did all the hard work. * Implementation ** One source: File structure The LaTeX preamble controls the output format; so, to have different output from the same org source, the preamble must be separate from the content. Here, we have two headers: - =slidehead.org=, which specifies the document class /beamer/ with the /presentation/ option. - =printhead2.org=, which specifies the /article/ class and adds the /beamerarticle/ package so that the article class can interpret beamer formatting commands. Other formatting differences are implemented here. For instance, inline code fragments are colored green in the slides, but remain black in the article. Header files contain nothing specific to any chapter, and content files are strictly content, no formatting definitions. Neither of these are exported directly. The export files provide the title and author fields, and include (=#+INCLUDE:=) the appropriate header and content files. They also include the glossary file; details to follow. #+name: slidehead #+caption: Primary export options for slideshow format. #+begin_src org ,#+startup: beamer ,#+LaTeX_CLASS: beamer ,#+LaTeX_CLASS_OPTIONS: [ignorenonframetext,presentation] ,#+BEAMER_THEME: default #+end_src #+name: printhead #+caption: Primary export options for article format. #+begin_src org ,#+startup: beamer ,#+LaTeX_CLASS: article ,#+LaTeX_CLASS_OPTIONS: [a4paper,twoside,11pt] ,#+BEAMER_THEME: default ,#+LATEX_HEADER: \usepackage{beamerarticle} #+end_src #+name: contents #+caption: Beginning of one of the contents files. #+begin_src org ,#+startup: beamer ,* Workshop introduction ,** Workshop introduction ,*** Workshop goals , Teach synthesis techniques by experimentation - SC lets us take apart synthesizer components, and put them back together. - SC's /Just-In-Time library/ makes it easy to re-patch components interactively. , Teach techniques for live control and performance - Control by graphic interfaces
Re: [O] Seeking advice on a worg contribution
On Tuesday, May 6, 2014 1:04:38 AM HKT, Eric S Fraga wrote: On Sunday, 4 May 2014 at 09:38, James Harkins wrote: I finally finished a draft (attached, and not carefully proofread yet) of a new worg page to outline what I had to do for a big Beamer publishing project. Interesting and very useful document. Thanks! Thanks for taking a look. H:3 is a good idea -- I've done that, and the result looks much better. The HTML code produced by the normal HTML export, which is what I assume Worg uses, has the captions as special label classes (org-src-name) so CSS could easily be defined if not there already. Let's assume I'm an HTML idiot (which is true...). Is it really true, according to [1], that the only way to add this CSS class definition is to put it in a separate file and link it? It seems to be the only *documented* method. I apologize if this is too basic a question... it's just, I've had a bunch of extra computer problems to solve lately and by now, I've pretty much hit the limit of web searching and teaching myself technologies that are new to me. It would be very helpful to me if someone could provide a for-dummies example of the least intrusive way to add one CSS class style. (Otherwise, sorry to say -- this is a relatively low priority task for me, so I will just submit the document as is and leave it for someone else to beautify.) Thanks, hjh [1] http://orgmode.org/manual/CSS-support.html#CSS-support
Re: [O] Seeking advice on a worg contribution
On May 6, 2014 6:15:35 PM Bastien b...@gnu.org wrote: The formatting looks fine to me! Please go ahead and push it on Worg. Ok! I guess I should add some links to the new page too? Propose a diff against this CSS: http://orgmode.org/worg/style/worg.css adding text properties (like font-size, for example?) to a new .figure p {...} class. Ahh... The #+HTML_HEAD is good to know, but *this* is the droid I was looking for. Thanks! hjh Sent with AquaMail for Android http://www.aqua-mail.com
Re: [O] Seeking advice on a worg contribution
On Tuesday, May 6, 2014 6:08:10 PM HKT, Bastien wrote: If not, what do I have to do to make it do that? (At least, display the captions slightly smaller.) Propose a diff against this CSS: http://orgmode.org/worg/style/worg.css adding text properties (like font-size, for example?) to a new .figure p {...} class. Here's a patch for worg.css. Captions for source code blocks are rendered as label... in the HTML export, with the class name org-src-name. I checked in Firefox, and it does change the appearance of the captions. It's getting kind of late here and I'm running out of steam, so I'll deal with the links and pushing the text tomorrow. hjh From 67961f8baa13318e846c6b09f38f779ae8665c90 Mon Sep 17 00:00:00 2001 From: James Harkins jamshar...@dewdrop-world.net Date: Tue, 6 May 2014 22:35:10 +0800 Subject: [PATCH] Add class definition for label.org-src-name for source-block captions --- style/worg.css |5 + 1 file changed, 5 insertions(+) diff --git a/style/worg.css b/style/worg.css index 2553546..1807f28 100644 --- a/style/worg.css +++ b/style/worg.css @@ -926,6 +926,11 @@ content: *** .rss_item a:hover {} .rss_date {} +label.org-src-name { + font-size: 80%; + font-style: italic; +} + #show_source {margin: 0; padding: 0;} #postamble { -- 1.7.9.5
[O] New worg page: Publishing beamer slideshows and articles from one source
Hi all, Some weeks ago, I wrote here about a large project (training materials for the SuperCollider audio/music programming language), written entirely in org using the Beamer exporter to produce both slideshows and an article-format book for the students to use as a reference. I just put a page up on worg describing the implementation details: http://orgmode.org/worg/exporters/beamer/beamer-dual-format.html The project lives at https://github.com/jamshark70/scweek2014 -- note that the material itself is under a Creative Commons license, CC-BY-SA. As far as I'm concerned, if you want to use any of the Emacs or LaTeX code, knock yourself out, but please don't republish the written material in any way that's contrary to CC-BY-SA. Hope this is of use, hjh
Re: [O] New worg page: Publishing beamer slideshows and articles from one source
Suvayu Ali fatkasuvayu+linux at gmail.com writes: A couple of comments about formatting: the first two footnotes might be better as links from the text. I propose the attached patch. If you think this is fine, I'll push it. Sure, go ahead. hjh
[O] org-table: Reference *one* cell below a hline?
I have this: | Section | Seconds | |--+-| | Theme| 54 | | 12/8 | 80 | | 6/8 | 66 | | Clarinet | 116 | | Oboe | 89 | | Bassoon | 60 | |--+-| | | | #+TBLFM: @II+1$2=vsum(@I$2..@II$2) After calculation (C-u C-u C-c *), I expected: | Section | Seconds | |--+-| | Theme| 54 | | 12/8 | 80 | | 6/8 | 66 | | Clarinet | 116 | | Oboe | 89 | | Bassoon | 60 | |--+-| | | 465 | #+TBLFM: @II+1$2=vsum(@I$2..@II$2) I got: | Section | Seconds | |--+-| | Theme| 54 | | 12/8 | 80 | | 6/8 | 66 | | Clarinet | 116 | | Oboe | 89 | | Bassoon | 60 | |--+-| | 465 | 465 | #+TBLFM: @II+1$2=vsum(@I$2..@II$2) That is, @II+1$2 refers to the *entire row* beneath the second hline, rather than only the second column in that row. In other words, org-table discards the $2. That can't be right, can it? I'm going to add rows below 465, so I can't just use @$2. This table won't be public, so no big deal *in this case*. But I can imagine cases where this would be absolutely wrong behavior. hjh
Re: [O] DTD prohibited
Bastien bzg at gnu.org writes: Hi Alexander, AW alexander.willand at t-online.de writes: Now, Word no longer can open the html-documents produced by orgmode. The error message is (translated from German): DTD prohibited. You may want to customize `org-html-doctype' but you probably need to digg further to know what DTD is prohibited exactly. Apparently, all of them: http://en.m.wikipedia.org/wiki/Document_Type_Definition Under Security: ~~ An XML DTD can be used to create a denial of service (DoS) attack by defining nested entities that expand exponentially, or by sending the XML parser to an external resource that never returns.[10] For this reason, .NET Framework provides a property that allows prohibiting or skipping DTD parsing, [10] and recent versions of Microsoft Office applications (Microsoft Office 2010 and higher) refuse to open XML files that contain DTD declarations. ~~ So, if org ODT export now depends on a DTD, then we'd have to say that we don't support exported files that open in MS Word. hjh
Re: [O] org-table: Reference *one* cell below a hline?
On Friday, May 30, 2014 7:50:39 PM HKT, Bastien wrote: James Harkins jamshar...@gmail.com writes: I have this: | Section | Seconds | |--+-| | Theme| 54 | | 12/8 | 80 | | 6/8 | 66 | | Clarinet | 116 | | Oboe | 89 | | Bassoon | 60 | |--+-| | | | #+TBLFM: @II+1$2=vsum(@I$2..@II$2) When I run this from master, I get this user-error: Can't assign to hline relative reference which implies that hline relative references are not supported here. Don't you get this error? What version of Org and Emacs are you running? Org-version says Org-mode version 8.2.5f (release_8.2.5f-518-gd74205 @ /home/dlm/share/org-mode.git/lisp/) -- the latest commit in my working environment is af6f14d9. And, This is GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10). If assigning to an hline-relative reference is not supported, would it be a valid feature request? hjh
Re: [O] Do not export single newlines to latex
Alexander Baier alexander.baier at mailbox.org writes: I am writing a document for which my main export target is latex. To obtain reasonable diffs wrt version control systems, I use one line per sentence in addition to =visual-line-mode= as was mentioned in this post last November http://thread.gmane.org/gmane.emacs.orgmode/78332. The problem with this is that these newlines get translated to newlines in latex aka \\newline. I use the LaTeX exporter routinely, and I have never seen this behavior. For instance, ~~~ org input file * Headline The first sentence. The second sentence. ~~~ ~~~ LaTeX export (minus preamble) \begin{document} \maketitle \tableofcontents \section{Headline} \label{sec-1} The first sentence. The second sentence. % Emacs 23.3.1 (Org mode 8.2.5f) \end{document} ~~~ I also checked the customization variables in the org-export-latex group, and I didn't see anything immediately relevant to newline translation. So I can think of a couple of possibilities: - You might have some strange configuration lying around somewhere. (Additional evidence that you're seeing nonstandard behavior is that none of the .el files in the org distribution contain the string 'newline', let alone 'newline'.) - Or you might be using a newer org than I'm using, in which case you might be seeing a regression bug. (As far as I know, a single line break in the input should definitely not translate into \\newline!!) I want the export back end to ignore those single newlines and only insert \\newline into the latex document upon encountering two consecutive newlines in my org-mode file. Two consecutive line breaks in the input should be copied over directly into the .tex file. It's then up to LaTeX to interpret this -- per its own standards -- as a paragraph break. Again, \\newline would be quite exceptional. hjh
Re: [O] Selected export depending on back-end
Lars Tveito larstvei at ifi.uio.no writes: I am writing a compendium in org, and want to be able to generate slides from the same org file. I'd like to be able to mark some sections for exporting if I'm generating slides, and for other formats (like LaTeX and HTML) export everything as normal. It would also be nice if I could change the #+OPTIONS according to what I'm exporting to. This worg page doesn't cover exactly the same requirements, but it's closely related. Perhaps some of it might give you some hints. http://orgmode.org/worg/exporters/beamer/beamer-dual-format.html It doesn't go as far as selecting subtrees independently depending on backend. It does show how to include text in the article layout that is omitted from the slideshow layout. A caveat (in general, not only for my approach): the Beamer exporter uses org markup somewhat differently from the normal LaTeX exporter. I'd be surprised (or impressed!) if you found a way to use the same markup for both the LaTeX and Beamer exporters. Very simple markup may be OK; anything complicated may be rough. hjh
[O] [ox-latex] How to force ALL captions below their referents?
I'm struggling a bit with caption placement in LaTeX export. In the document I'm working on now, I have: - Image links, exported as floating figures (by inclusion of a caption). ox-latex places the caption at the end of the figure environment, so the caption appears below the image. #+name: fig1 #+caption: blah blah #+attr_latex: :width 0.75\textwidth [[./img/blahblah.png]] \begin{figure}[htb] \centering \includegraphics[width=0.75\textwidth]{./img/blahblah.png} \caption{\label{fig1}blah blah} \end{figure} - A figure block containing some figures. The entire block should be captioned. ox-latex places a caption first in the figure environment, so the caption is on top. #+name: product1 #+caption: blah blah #+begin_figure #+begin_latex \begin{subfigure}[b]{0.4\textwidth} \includegraphics[width=\textwidth]{./img/blah1.png} \end{subfigure} \hfill \begin{subfigure}[b]{0.4\textwidth} \includegraphics[width=\textwidth]{./img/blah2.png} \end{subfigure} #+end_latex #+end_figure \begin{figure} \caption{\label{product1}blah blah} \begin{subfigure}.. (omitted) \end{figure} I don't like the typographical inconsistency. It would be much better, I think, if I could specify in one place that I want *all* captions below or above the entity being captioned. It seems somebody recognized a while ago that this was a problem, and introduced org-latex-table-caption-above. But this applies only to tables, not to figure special blocks, nor to source code blocks, and probably some other cases that I can't think of. Well, I can customize org-latex-listings-options to include (captionpos b), but I think this is not quite ideal because: a/ image captions always go at the bottom; b/ table captions can be configured; c/ listings captions can be configured in a different variable; d/ many types of captions always go at the top, conflicting with a/. Is there a plan to deal with this, other than my hacking ox-latex locally? hjh
Re: [O] [ox-latex] How to force ALL captions below their referents?
On Thu, 02 Oct 2014 18:54:20 +0200 Nicolas Goaziou m...@nicolasgoaziou.fr wrote: You mean moving `org-latex-table-caption-above' to `org-latex-caption-above' and making sure every block complies to the variable? Sorry for the late reply. I wasn't feeling quite well yesterday. Something like that would do it, I think. I hesitate about breaking backward compatibility, but at the same time, I'm hard-pressed to imagine why one would want captions to be differently placed in the same document. I suppose, if somebody needs to move a caption to the top or bottom overriding the default, it could be an attribute, hypothetically: #+name: blah #+caption: blah blah #+attr_latex: :captionpos t #+begin_figure ... #+end_figure t would put it at the top, :captionpos b at the bottom and :captionpos nil (or not specified) would use the default from the configuration variable. Reasonable? hjh
[O] org-habit for multiple arbitrary days in a week
I have a task that I want to track using org-habit. I've spent about an hour looking through the manual and other sites, but so far the problem remains intractable. With org-habit, it's easy to track something that should be done on one particular day of the week: .+1w. It appears not to be easy to track something that should be done on two arbitrary days of the week. It's easy to schedule something for two specific days of the week using a sexp. But, org-habit (for sensible reasons) doesn't support sexps. I can also add multiple SCHEDULED lines. But org-habit doesn't work well with this either. ** TODO Update lesson gradesheet :Comp: SCHEDULED: 2014-10-13 Mon +1w SCHEDULED: 2014-10-17 Fri +1w :PROPERTIES: :STYLE:habit :LOGGING: TODO MAYBE INPROG MTG | DONE(!) POSTPONED :END: Now, if I mark this item DONE, org-habit moves *both* scheduled dates forward to next week, even though 10-17 is still in the future and it's neither needed nor desirable to advance it. That is, scheduled dates that are today or in the past should move up, while scheduled dates in the future should be left alone. I guess the issue with that would be that you couldn't set a task DONE earlier than scheduled. That's not an issue for this specific task, but maybe for others. I suppose the worst case is that I could create two Update lesson gradesheet entries, but that seems highly inelegant...? Thanks in advance for any advice. hjh
Re: [O] org-habit for multiple arbitrary days in a week
At Mon, 13 Oct 2014 17:56:04 +0200, Nicolas Goaziou wrote: ** TODO Update lesson gradesheet :Comp: SCHEDULED: 2014-10-13 Mon +1w SCHEDULED: 2014-10-17 Fri +1w You can't. This is invalid Org syntax (only one scheduled keyword per entry). I see... perhaps it should be filed under wish list to support an arbitrary days of week repeater style. One way might be something like 2014-10-13 Mon +4d +3d: First advance by 4 days, then by 3 days, then 4 again and so on. I would call it a low priority enhancement. There might actually be some benefit to tracking consistency on the two days separately. But the fact remains, if someone needed to treat it as one task that happens on two or three arbitrary days during the week (always the same days) and it wouldn't be useful for her to split them, org-habit currently does not support this as far as I can see. hjh
[O] Sharing: Agenda skip function to remove future-scheduled items
I often ask questions, or complain about things (or both at the same time), so it's nice to share something. I was making a block agenda, splitting up tasks by location (loosely inspired by GTD). But I realized that I didn't want to see items that are scheduled for the future, because this is my agenda view for what tasks are available right now. For example, if I have a task to update my grade sheet, it doesn't make sense to do that before I've taught the lessons -- so I don't want to see the task until it's actually due. I didn't find a straightforward way to use a property search such as scheduled is nil or scheduled today, but I did (with some false starts) hack up a skip function that seems to do the job. So, in the relevant blocks, I have (org-agenda-skip-function 'hjh-skip-future-scheduled), and... perfect. (I'm sure it's not the most efficient, but I found elisp's time comparisons to be confusing, and I didn't want to consider time-of-day either. Performance is OK for my use.) hjh ; agenda skip function to remove items scheduled for a future date (defun hjh-skip-future-scheduled () Skip trees that are scheduled in the future (let* ((subtree-end (save-excursion (org-end-of-subtree t))) (schedprop (cdr (assoc SCHEDULED (org-entry-properties (schedymd (if(stringp schedprop) (substring schedprop 0 10 (if schedymd (if (string (format-time-string %Y-%m-%d (current-time)) schedymd) subtree-end nil) nil)))
Re: [O] Sharing: Agenda skip function to remove future-scheduled items
Sebastien Vauban sva-news@... writes: I use the following (tricky) settings, which should do what you have in mind, if I'm not mistaken: #+begin_src emacs-lisp ;; Don't show scheduled entries in the global `todo' list. (setq org-agenda-todo-ignore-scheduled 'future) ;; Don't show entries scheduled in the future in the global ;; `todo' list (until they are within the warning period). (setq org-agenda-todo-ignore-deadlines 'near) ;; Honor `todo' list `org-agenda-todo-ignore...' options also ;; in the `tags-todo' list. (setq org-agenda-tags-todo-honor-ignore-options t) #+end_src Interesting. How would I apply those settings to only one custom agenda command, while leaving the others with the default behavior of showing future schedules? hjh
[O] after-todo-statistics hook for checkboxes
org-after-todo-statistics-hook allows you to do something to a node after its statistics cookie got updated. Unfortunately, it does this only for TODO subheadings and it doesn't work with checkboxes. Use case: Grading assignments. Each assignment is a subheading. Each student's work for that assignment is a plain list item with a checkbox. When I finish grading one of them, I tick off the checkbox. At this point, I want the heading's TODO status to change: - If all items are complete, change it to DONE. - If there exist both finished and unfinished list items, change it to INPROG. - If all items are still open, change it to TODO. (This could happen if I mistakenly ticked a checkbox and then un-ticked it.) This should then cascade upward to the parent's statistics, all the way to the top level, so I can see at a glance (even with all top-level trees folded) that there is something remaining to grade. I don't want to use subheadings for each student's work, because then my TODO agenda views will get cluttered with multiple entries per assignment. Actually... after a little more poking around, the problem seems to be that org-update-checkbox-count refers to no hooks whatsoever. Should it go toward the end, here? (Untested.) (mapc (lambda (cookie) (let* ((beg (car cookie)) (end (nth 1 cookie)) (percentp (nth 2 cookie)) (checked (car (nth 3 cookie))) (total (cdr (nth 3 cookie))) (new (if percentp (format [%d%%] (/ (* 100 checked) (max 1 total))) (format [%d/%d] checked total (goto-char beg) (insert new) (delete-region (point) (+ (point) (- end beg))) (run-hook-with-args 'org-after-todo-statistics-hook checked (- total checked)) (when org-auto-align-tags (org-fix-tags-on-the-fly cookies-list hjh
Re: [O] after-todo-statistics hook for checkboxes
On Wed, 15 Oct 2014 19:08:31 +0800 James Harkins jamshar...@qq.com wrote: org-after-todo-statistics-hook allows you to do something to a node after its statistics cookie got updated. Unfortunately, it does this only for TODO subheadings and it doesn't work with checkboxes. (snip) Actually... after a little more poking around, the problem seems to be that org-update-checkbox-count refers to no hooks whatsoever. Should it go toward the end, here? (Untested.) (mapc (lambda (cookie) (let* ((beg (car cookie)) (end (nth 1 cookie)) (percentp (nth 2 cookie)) (checked (car (nth 3 cookie))) (total (cdr (nth 3 cookie))) (new (if percentp (format [%d%%] (/ (* 100 checked) (max 1 total))) (format [%d/%d] checked total (goto-char beg) (insert new) (delete-region (point) (+ (point) (- end beg))) (run-hook-with-args 'org-after-todo-statistics-hook checked (- total checked)) (when org-auto-align-tags (org-fix-tags-on-the-fly cookies-list After dinner, I tested the change that I had speculated about, and... it works exactly correctly. * TODO Test A [0/2] ** TODO Test B [0/2] - [ ] 1 - [ ] 2 ** TODO Test C C-c C-c on 1 (with my hook function[1]): * TODO Test A [0/2] ** INPROG Test B [1/2] - [X] 1 - [ ] 2 ** TODO Test C C-c C-c on 2: * INPROG Test A [1/2] ** DONE Test B [2/2] - [X] 1 - [X] 2 ** TODO Test C So I'm submitting this as a TINYCHANGE patch. Do with it as you will, although I will keep using it locally until something better comes along. hjh [1] (defun hjh-org-summary-todo (n-done n-not-done) Switch entry to DONE when all subentries are done, to TODO otherwise. (let (org-log-done org-log-states) ; turn off logging (org-todo (if (= n-not-done 0) DONE (if (= n-done 0) TODO INPROG) (add-hook 'org-after-todo-statistics-hook 'hjh-org-summary-todo) From cbb4c589b1ed65152485ea2b687eb54ff7e2e478 Mon Sep 17 00:00:00 2001 From: James Harkins jamshar...@dewdrop-world.net Date: Wed, 15 Oct 2014 21:32:28 +0800 Subject: [PATCH] Run org-after-todo-statistics-hook when toggling a checkbox * org-list.el (org-update-checkbox-count): Run org-after-todo-statistics-hook for each affected cookie. TINYCHANGE --- lisp/org-list.el |2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org-list.el b/lisp/org-list.el index b1d47c9..2fdda6b 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2553,6 +2553,8 @@ With optional prefix argument ALL, do this for the whole buffer. (goto-char beg) (insert new) (delete-region (point) (+ (point) (- end beg))) + (run-hook-with-args 'org-after-todo-statistics-hook +checked (- total checked)) (when org-auto-align-tags (org-fix-tags-on-the-fly cookies-list -- 1.7.9.5
Re: [O] after-todo-statistics hook for checkboxes
On October 15, 2014 9:45:32 PM Nicolas Goaziou m...@nicolasgoaziou.fr wrote: See also org-checklist.el in contrib/. Ok, I'll have a look. Not at my computer now. I do think this issue qualifies as a bug (albeit minor). The real behavior deviates from the documentation (in a way that's difficult to justify logically). IMO it should be fixed, or the documentation should explain that the after todo statistics hook doesn't work for checkboxes without requireing org-checklist. hjh Sent with AquaMail for Android http://www.aqua-mail.com
Re: [O] after-todo-statistics hook for checkboxes
At Thu, 16 Oct 2014 18:39:46 +0200, Nicolas Goaziou wrote: `org-todo-statistics-hook' is used for TODO (i.e. headlines) and `org-checkbox-statistics-hook' is used for checkboxes (i.e. lists). I see no bug here (although they aren't called with the same arguments, but that's another story). I'm sorry to be a pest, but I did get sent on a wild goose chase by what is either a/ faulty behavior or b/ a faulty docstring. The docstring of org-after-todo-statistics-hook says: Hook that is called after a TODO statistics cookie has been updated. Well, that isn't true. Changing a checkbox updates a stats cookie, and the hook is *not* called. And it took more than an hour to figure that out. So, for the sake of users dealing with this in the future, let's at least fix the docstring then. It isn't clear to me how to use org-checkbox-statistics-hook or org-todo-statistics-hook for my use case. This isn't about alternative ways of collecting statistics (org-checkbox-statistics-hook's docstring). I'm willing to switch to that, but less willing to trawl through the org sources (again) to figure it out. At least, not today. hjh For reference, from http://orgmode.org/worg/doc.html#hooks: org-checkbox-statistics-hook nil Hook that is run whenever Org thinks checkbox statistics should be updated. This hook runs even if checkbox rule in `org-list-automatic-rules' does not apply, so it can be used to implement alternative ways of collecting statistics information. org-todo-statistics-hook nil Hook that is run whenever Org thinks TODO statistics should be updated. This hook runs even if there is no statistics cookie present, in which case `org-after-todo-statistics-hook' would not run. org-after-todo-statistics-hook nil Hook that is called after a TODO statistics cookie has been updated. Each function is called with two arguments: the number of not-done entries and the number of done entries. For example, the following function, when added to this hook, will switch an entry to DONE when all children are done, and back to TODO when new entries are set to a TODO status. Note that this hook is only called when there is a statistics cookie in the headline! (defun org-summary-todo (n-done n-not-done) Switch entry to DONE when all subentries are done, to TODO otherwise. (let (org-log-done org-log-states) ; turn off logging (org-todo (if (= n-not-done 0) DONE TODO
Re: [O] after-todo-statistics hook for checkboxes
At Fri, 17 Oct 2014 22:22:20 +0200, Nicolas Goaziou wrote: This is because checkboxes (plain lists) are not related to TODO keywords (headlines). There are TODO statistics cookies and checkbox statistics cookies. Only the former run a hook once updated. Thanks for clarifying. I hadn't understood that distinction. It occurred to me, after I sent my last e-mail, that someone might want one action after updating todo statistics and a different action after updating checkbox statistics. Using the same hook for both wouldn't be correct in that case. So let me update my issue report/feature request: -- If there is a hook to do something after updating todo statistics, then it would make sense to have a hook for updating checkbox statistics as well. That hook should be called with the same arguments (n-done n-not-done) so that the user could use one function for both, if desired. I can do this pretty easily and update the documentation. I don't have FSF papers signed, but I'm willing to get that ball rolling as well. But before spending any time on that, I want to ask if this is okay. I understand the objection against pressing org-after-todo-statistics-hook into service for checkboxes. If there's an objection against simply *having* a hook for checkboxes, I'm afraid I don't understand that. Thanks for your patience, hjh
Re: [O] Org Community
Scott Randby srandby at gmail.com writes: However, I am concerned about the future of org. There is one individual who is poisoning the atmosphere by engaging in unfair and unfounded name calling that simply should not be included in messages to this list. Now this person wants to take some of their contributions out of org. The developer of the talk I attended called this tactic hostage taking and said that it is better for the community to let hostage takers go their own way. The project and community are more important than the code. The code can be written by others, or the community can decide to go in a different direction. Giving in to hostage takers leads to more hostage taking and the decline of the project. I'm inclined to agree with this. I don't feel like hesitating to name names. Jambunathan: Whatever offense was done to you, it remains true that ego-validation often (perhaps even usually) does not go along with accomplishing goals. I would like to be sympathetic to the injustice you feel. This is difficult when your approach to the problem is to hold your ego to be more important than the goal. So what is the point here? If the point is to have well-functioning HTML, ODT and freemind exporters (and, secondarily, to enjoy knowing that you made, or helped to make, that happen), I think that's a worthy goal which the org community should support. If this is your goal, surely it can't be lost on you that your actions are impeding that goal. If, on the other hand, your goal is to prove that you are an Important Person (and secondarily to contribute to org), then your actions are consistent with that goal. However, I think the org community would not be well-served by catering to your ego demands. I contribute code and documentation to SuperCollider (an audio programming language). When I check in new content, I consider it a way to thank other developers who wrote code that I'm glad I didn't have to write myself. I don't expect credit and I don't expect my contributions to be inviolable entities that nobody should touch. It's not about ownership. It's about making a software environment that works better for people. The org community functions on the same principle, and I think it's correct that this community should not cave in to a diva's temper tantrums. hjh
Re: [O] [bug] new beamer exporter always adds default width to graphics
On Mar 12, 2013 10:38 PM, Jay Kerns gjkerns...@gmail.com wrote: Yes, the same thing happened to me too, and yes, there was a change recently, and here is a link to the discussion about it: http://comments.gmane.org/gmane.emacs.orgmode/68011 I believe you can do the following to get what you were expecting: #+ATTR_LaTeX: :width 6cm Even better :-) I wasn't crazy about adding :options every time. Thanks for clarifying. Even though the dust hasn't fully settled on the new exporter, I'm finding it's a big enough improvement that it's worth the occasional static. hjh
Re: [O] Bug: org-insert-heading-respect-content inserts at the wrong level if target heading is invisible [7.9.2 (release_7.9.2-883-g6fb36e.dirty @ /home/dlm/share/org-mode.git/lisp/)]
On Tue, Mar 5, 2013 at 1:41 AM, Bastien b...@gnu.org wrote: There is some obscure issues here... I fixed various things in `org-insert-heading' in master, but inserting in invisible parts of the subtree is still unstable. So I went and used the workaround you suggested (i.e. org-show-subtree) in the maint branch, so that it will be in 7.9.4. Apologies -- this seems to be the issue that wouldn't die -- but I have to report another failure with this. I just did org-mobile-pull with the following entry: ~~ * F(edit:addheading) [[olp:semester.org:Dates][Dates]] ** Old value ** New value Graduating exams the modern music Important Notice:. ** End of edit ~~ This means the new heading should be at the second level, underneath Dates. Instead, it was added as the topmost *first* level heading: ~~ BEFORE #+LAST_MOBILE_CHANGE: 2013-03-13 16:38:42 * Dates ** DONE Teachers' meeting ~~ ~~ AFTER * Graduating exams the modern music Important Notice:#+LAST_MOBILE_CHANGE: 2013-03-13 16:38:42 * Dates ** DONE Teachers' meeting ~~ ~~ EXPECTED #+LAST_MOBILE_CHANGE: 2013-03-13 16:38:42 * Dates ** DONE Teachers' meeting ** ... a few other level 2 headings ... ** Graduating exams the modern music Important Notice: ~~ Also, #+LAST_MOBILE_CHANGE: should be the first line in any org file that's being synced to MobileOrg, but (org-insert-heading-respect-content '(4) t) ignores this. BTW, I believe the arg '(4) is incorrect. In MobileOrg (at least in android -- actually, I think the iPhone doesn't support this feature yet), new nodes go to the bottom of the parent's children. They should not be inserted at the top in Emacs. This is slightly different from the earlier bug. * Dates *is* a top-level heading in the target file -- hence, it *can't* be invisible. Nonetheless, when inserting the new heading, it seems to be reading the level of the target node as level 0, rather than level 1. After that, the new node goes at the top of level 1 (which will also obliterate any #+ preamble the file might have). This may be a recent issue. I updated via git after you said that you had put my workaround in place, and I don't remember seeing this problem before. New second-level nodes did go into the right places. I saw this issue only today (git pull yesterday). Thanks... hjh
Re: [O] posting guide?
Jay Kerns gjkernsysu at gmail.com writes: Yes, I can add people to my SPAM filter (which I did, BTW), but that action protects only *me*. It does not protect the community. It also doesn't protect digest readers such as myself. I was quite annoyed by Jambunathan's suggestion that individual spam filters were the way to deal with his misbehavior, for this reason. hjh
[O] Visibility cycling bugs when an org file ends with a plain list
Hi, I don't remember if this was reported or not. I frequently get the following message in the mini-buffer, after trying to expand the last top-level node in a file. The behavior seems to depend on the last node containing a plain list. byte-code: Invalid search bound (wrong side of point) This issue occurs if org-cycle-include-plain-lists is set to 'integrate'. If I change it back to the default 't', then I get a different incorrect behavior. Example (with org-cycle-include-plain-lists = integrate): ~~ Contents * I ** A * II ** B - Plain list ~~ Hit shift-tab to collapse everything: ~~ Visible contents * I... * II... ~~ Now put the insertion point anywhere on * II and hit tab to expand the sub tree. Here's where I get that message. The normal behavior of TAB visibility cycling is: TAB once: Expand to show the node's immediate children, but the children are collapsed. TAB again: Expand everything underneath the current node. TAB again: Collapse, to show only the current node. When I get the message, I only get #1 and #3 behaviors. I can't hit TAB twice on the heading to see everything underneath. Now, if org-cycle-include-plain-lists = t, hitting TAB twice does expand the plain list, but unfortunately it will not display the last character: ~~ Result of TABx2 with the point on * II * I... * II ** B - Plain lis... ~~ I haven't found a keystroke that will make t of list reappear. t is actually still there (copy and paste will demonstrate that), but the visibility code seems to think that something at the end is supposed to be hidden, even if just one character. Org-mode version 8.0-pre (release_8.0-pre-215-g8ccbc7 @ /home/dlm/share/org-mode.git/lisp/) Thanks, hjh
Re: [O] Agenda in MobileOrg for Android
As it happens, one of the lead developers of mobileorg started a thread on the MobileOrg-Android mailing list asking for issues that need to be addressed, and features that are needed, before it's ready for 1.0. For instance, John Hendy said: ~~ Being able to edit is nice, but that doesn't take advantage of what I really have the phone with me for - I see my phone as mainly a reminder machine, not mainly an editing machine, and would love to see MobileOrg (or some new project) gain the ability to parse every possible agenda feature used in Org files, so that I can actually receive reminders for all the items in my Org-mode agenda. If it came with a better way of simple editing, that would be even better. ~~ Good idea (up to a point, as Marcin pointed out), but writing it here is of limited utility :) There's a chance of some of it being implemented if you take the comment to the mobileorg-android issue tracker. I'm using MobileOrg and enjoying it in general. I find it terribly useful and not especially cumbersome. The initial setup was a bit of a trek for me, because I don't have access to dropbox where I live (mainland China). Ultimately, because of unreliable connections to Ubuntu One, I ended up running my own WebDAV server locally and syncing at home over the WLAN. Otherwise, the only thing I had to adapt in my org/emacs usage was to schedule appointments (C-c C-s) instead of using timestamps for them (C-c .). I'm actually not crazy about that -- I'd rather use timestamps -- but it does work. (Come to think of it, I should propose that as one of the 1.0 issues... or check if it's changed since the last time I tried.) Items with scheduled or deadline timestamps appear in the Android calendar, and there is a preference in MobileOrg to attach reminders automatically. (One remaining point here -- another 1.0 issue -- is that creating a new node in MobileOrg with a schedule or deadline doesn't show up in the phone calendar until after syncing. I'll bring that up on the M/O mailing list.) I find that creating new nodes and minor editing of existing ones is not at all inconvenient. I don't see a big issue for the workflows that Marcin subsequently identified as being critical for this kind of app. They're already there. hjh
Re: [O] Agenda in MobileOrg for Android
Marcin Borkowski mbork at wmi.amu.edu.pl writes: 2. When I choose the menu and then Outline, I can see the outline. But when I choose menu and then Agenda, I see nothing but the title (Agenda) and a plus button in the upper right corner. (a) Shouldn't there be an agenda on the screen? No, not yet. This is a new feature, in which you define agenda views in MobileOrg, and MobileOrg will refresh those agendas dynamically based on its own database. You'll see your MobileOrg edits immediately, without syncing back to emacs. (This also means John's guess about choosing agenda views to push from emacs is not correct. Pushed agendas appear under the Agendas heading in the outline. Dynamic agendas are separate.) If you don't define dynamic agendas within MobileOrg, then the list of available dynamic agendas would be empty. What's missing is explanatory text onscreen. This feature indeed has some serious bugs in the currently released version (beta, btw -- pre-1.0) but I just saw a notice on the MobileOrg Android mailing list that a fix was just checked into the source repository. the key seems to be too hard to use efficiently... I am afraid that MobileOrg for Android) is indeed much more difficult to use than the Emacs version. The strength of Org is that it is easy to use (and efficient in terms of keystrokes etc.). It might be appropriate to discuss specific use cases that could be improved, instead of just stating it's not efficient. (That's more polite, but it conveys about the same amount of useful information as it sucks -- i.e., none at all). You did mention syncing. MobileOrg uses a database internally. Maybe that's easier to manage in java? I'm only speculating, don't know the reason for sure. It's a reasonable guess that parsing org files in java could be more difficult than in ELisp. Anyway, I haven't found the syncing requirement to be especially onerous. At least, the benefits of MobileOrg are significant enough for me that syncing does not negate them. E.g., my department sent a sms to my phone explaining upcoming holiday schedules. I copied the text into a new node (while away from the computer) and later, synced. When some students asked what was up with the schedule, it was just a couple of taps on my phone to navigate the headings and read it. The point being, MobileOrg is actually quite useful for capturing notes, adding calendar events etc on-the-go, and integrating that into the emacs org files. hjh
[O] TAB cycling doesn't work from end of line
I bet this has been asked before and I just didn't see it... anyway, I'm wondering if that was intentional that TAB visibility cycling doesn't do anything if the insertion point is after the ellipses indicating folded content. ** Example header... ^1 ^2 ^3 ^4 If the point is at locations 1, 2 or 3, TAB will reveal the next level of children. (The ^ locations will make sense if you format the e-mail using a monospace font. A proportional font will just look nonsensical.) ** Example header *** Child node If it's at location 4, TAB cycling does nothing. It's a minor point, but somehow when I'm moving the pointer around in Emacs, quite often it ends up at the end of a displayed line, and then I have to remember to take an extra step to make sure TAB does what it's supposed to do. I'll grant, there could be a good reason for the behavior, but I think it's reasonable to expect TAB to expand a heading if the point is anywhere on the line (including at the end). hjh
[O] Blocking one user while subscribed to the digest
This is a specific question for Jambunathan K. I am a casual user of org, i.e., I depend heavily on a subset of org's features, but that subset is rather small and does not touch on the most complex org features which are the subject of most of this list's traffic. So, I have subscribed to the digest. I like to get announcements and this allows me to skim over the rest, without the overhead of deleting several dozen messages by hand every day. You have argued in the past that users who do not wish to read your rants should block your address in the mail client, and you seem convinced that this excuses you from typical email list etiquette. If this does so excuse you, then I suppose you must have a solution for digest readers. Do you? If not, then please take the [expletive deleted] politics off list. That's between you and the org maintainers. hjh
[O] Beamer export ignoring org-beamer-environments-extra?
Hi, I'm trying to use the (new) beamer exporter with Chinese characters. I've installed the CJK package, and I can render a very simple article-class document with Chinese characters, no problem. But I haven't been able to replicate that successful result by exporting an org file to LaTeX/beamer. The problem may be a general one concerning org-beamer-environments-extra. Any portion of the document containing Chinese characters should be enclosed within a CJK environment. Reading ox-beamer.el, I see that I can customize Org Beamer Environments Extra. After customizing, C-h v org-beamer-environments-extra shows me: ((CJK Z \\begin{CJK}%a%h \\end{CJK})) But: * One section ** One frame *** One block :B_CJK: :PROPERTIES: :BEAMER_env: CJK :BEAMER_envargs: gbsn :END: - One list item -- \section[One section]{One section} \label{sec-1} \begin{frame}[label=sec-1-1]{One frame} \begin{itemize} \item One list item \end{itemize} \end{frame} % Generated by Org mode 8.0-pre in Emacs 23.3.1. \end{document} Whoa, wait a minute... it has completely omitted the CJK environment! It appears that I've followed the format for the extra environment correctly. It's possible that I've done something wrong, but it could also be a bug. ?? Org-mode version 8.0-pre (release_8.0-pre-215-g8ccbc7 @ /home/dlm/share/org-mode.git/lisp/) hjh
Re: [O] Beamer export ignoring org-beamer-environments-extra?
On Sat, Apr 20, 2013 at 12:25 PM, James Harkins jamshar...@gmail.com wrote: The problem may be a general one concerning org-beamer-environments-extra. Any portion of the document containing Chinese characters should be enclosed within a CJK environment. Reading ox-beamer.el, I see that I can customize Org Beamer Environments Extra. After customizing, C-h v org-beamer-environments-extra shows me: ((CJK Z \\begin{CJK}%a%h \\end{CJK})) ... snip Whoa, wait a minute... it has completely omitted the CJK environment! OK, after a bite for lunch, I see what the problem is. The CJK environment, in the LaTeX code, must be specified with all capital letters. (I tried changing the simple test file to say \begin{cjk} and LaTeX failed, complaining of an unknown environment. The test file does include \usepackage{CJK} and it works with \begin{CJK} so the lowercase definitely means misspelled here.) The Beamer exporter assumes that environment names will be all lowercase: ;; Use specified environment. (t (downcase env) I added my entry into org-beamer-environments-extra with the name CJK -- so, when org-beamer-- format-block looks up the environment's formatting spec according to the down-cased name cjk, it finds nothing and then does not render the environment. But, if I were to name the environment-extra as cjk, then the exporter would write \begin{cjk} which I've already found will break. I will temporarily work around the problem by removing downcase. That should get me going for the slides I need to prepare today and tomorrow. But there must be a more elegant solution. I'm not sure what that is, but I am certain that it is not safe to assume environments will always be named using only lowercase letters. One more reason to fix: There is one out-of-the-box environment, noteNH, which includes capital letters in the name. This one is also broken -- does not appear in the output. I.e., you can encounter the bug without customizing anything. hjh
Re: [O] Beamer export ignoring org-beamer-environments-extra?
On Apr 20, 2013 2:34 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: James Harkins jamshar...@gmail.com writes: The Beamer exporter assumes that environment names will be all lowercase: ;; Use specified environment. (t (downcase env) It should now be fixed. Thank you for the detailed report. I'm not able to test again right now, but in my earlier testing, simply removing downcase was ok for my CJK extra but the export failed for noteNH (something about stringp). It's worth testing that. This turns out to have been quite an adventure anyway. I've been using the Ubuntu packages for latex, which date back to 2009, and CJK itself isn't getting a lot of developer attention. Consensus online seemed to be to upgrade, so now I'm in the middle of 8-9 hours of downloads from texlive. If I'm lucky, I *might* be able to try another beamer export right around bedtime (7 pm now). :-| hjh
[O] [solution] Chinese characters in Beamer export
FWIW, this is what it took for me to get Chinese characters to export in beamer. (Adding a TODO to write this up for worg.) 1. Use texlive 2012. (The Ubuntu packages for 12.04 date back to 2009. I couldn't get them to work for this.) 2. In the preamble of your org document: #+LaTeX_HEADER: \usepackage{CJKutf8} #+BEGIN_LaTeX \AtBeginDocument{% \begin{CJK}{UTF8}{gbsn}} \AtEndDocument{% \end{CJK}} #+END_LaTeX These LaTeX snippets come from the documentation of the CJK package. gbsn is for simplified Chinese characters (used on the mainland). Other options for Chinese may be found at: http://en.wikibooks.org/wiki/LaTeX/Internationalization#Chinese That pretty much did it (although it took quite a bit of sleuthing to find this, thanks to a fair amount of out of date information that will never, ever die in the big search engines). Except for one problem. LaTeX inputenc will complain about the Chinese characters being not set up for use with LaTeX, but the document does render. I'll have to leave that question aside for the moment, but this isn't the last time I'll need Chinese characters in a presentation so I'll come back to that before posting anything on worg. (Or, maybe a sophisticated LaTeX user knows what is wrong?) hjh
[O] Buffer-local override of org-latex-title-command?
Hi, I've decided to write my next research article using org's LaTeX export. The first problem: the journal mandates one column for the title/author heading and the abstract, while the remainder of the text should be in two columns. TeX FAQ recommends the following [1]: \documentclass[twocolumn]{article} ... \begin{document} ... % \author, etc \twocolumn[ \begin{@twocolumnfalse} \maketitle \begin{abstract} ... \end{abstract} \end{@twocolumnfalse} ] I can get very near to that this way: #+LaTeX: \twocolumn[ \begin{@twocolumnfalse} \maketitle #+BEGIN_abstract This is my abstract. This is my abstract. This is my abstract. This is my abstract. #+END_abstract #+LaTeX: \end{@twocolumnfalse} ] ... followed by outline headings marking sections. The problem is that the org-latex-title-command variable places \maketitle before the \twocolumn[...] bit. I realize I can customize the variable and make it an empty string, but I'm not sure I want this to take effect for every document I export to LaTeX. Is there a way to clear this variable that is local to the buffer? hjh [1] http://www.tex.ac.uk/cgi-bin/texfaq2html?label=onecolabs
[O] Exporting an article to a (very) specific formatting template
Actually, let me take a few steps back from my specific question about the title command. There are some other workflow questions that might make that question redundant. This journal (for some reason unknown to me) has designed the publication format in MS Word, and there are some specific requirements. So I have a couple of choices: - Export to LaTeX, and try to reproduce their layout (likely with a new document class based on article). That's a chunk of work, but they also confirmed that I could send PDF as long as it follows the style guidelines. - Export to ODT. This is probably simpler for setup -- I'd probably just need to change some of the names of paragraph or character styles in their template so that org can find them for section headings, abstract etc. But... there is more risk of the formatting breaking. If I send .odt, MS Word might choke on it, or similar if I resave my .odt as .docx. (The word online is that LibreOffice does not do well saving docx.) Or, export to ODT and let LibreOffice turn that into a PDF. I hesitate to do this, when LaTeX is a far superior typesetter. (But, tweaking all the formatting details in LaTeX is quite likely to give me some more gray hairs...) Advice? Thanks -- hjh
Re: [O] Buffer-local override of org-latex-title-command?
On Apr 29, 2013 8:23 PM, Thomas S. Dye t...@tsdye.com wrote: James Harkins jamshar...@gmail.com writes: The problem is that the org-latex-title-command variable places \maketitle before the \twocolumn[...] bit. I realize I can customize the variable and make it an empty string, but I'm not sure I want this to take effect for every document I export to LaTeX. Does an empty #+TITLE: do what you want? No, because I do need the title, but inside the \twocolumn part. I wouldn't be able to submit the manuscript with no title. hjh
Re: [O] Buffer-local override of org-latex-title-command?
On Apr 29, 2013 10:08 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Try: #+BIND: org-latex-title-command This assumes `org-export-allow-bind-keywords' is non-nil. Oh, ok, I thought I'd tried something like that but I guess I didn't get all the moving parts in the right place. Thanks! hjh
Re: [O] Exporting an article to a (very) specific formatting template
mohamed mohamed.hibti at gmail.com writes: I used both aproaches : - Usually I customize the org options (latex templates) to meet the requirements of the final document. It is convenient for me to stay in emacs. For the gray hairs, you do it once and thus you have minor modifications. - But sometimes when I work with other colleagues I need to have something more common, odt seems fine but as you mentioned you may have to add a final manual toutch to be sure your document can be modified by the others. Ok, based on this and Marcin's comments, I'll do it the LaTeX way (which was my first choice anyway). Naturally, I'm using org to keep a TODO list of the formatting details I need to match... Thanks. hjh
Re: [O] Rationale for *text* - \alert{text} for Beamer export?
John Hendy jw.hendy at gmail.com writes: Just wondering about the rationale behind using *bold* markup for \textbf{} in LaTeX export and to \alert{} in Beamer. Was this a frequently voiced request? I'm sure I can dig into this somewhere and change it, but if the majority prefers bold (not saying they do!), should that be the default? I'd prefer bold, personally. I don't like red table column titles or in lists. I had asked the same question a while back, and I received some quite amusing replies about \alert being the Beamer way... which I promptly ignored and implemented my own hack to customize the LaTeX command for beamer to use for *bold text* (pasted as a git patch below). I'm reading Marcin's recommendations carefully, since now, for the first time, I need to learn more about tweaking LaTeX's output. I'm not sure I agree with all of that line of thought, though. ~~ * Keeping that in mind, \alert{...} is /better/ than \textbf{...}, just like \emph{...} is better than \textit{...}: it is semantic, not visual markup. ~~ I can understand this rationale if the use case is to export from org to a LaTeX file, and then continue to work with the LaTeX file. In that case, you would want the exported LaTeX code to follow best practices and be maintainable. I'd guess a more common use case for org export is to work exclusively with the org markup, and allow the exporter to use LaTeX as an intermediary, on the way to PDF. At least, this is how *I* use it; it doesn't really bother me if the LaTeX code produced by org uses semantic or visual markup. Where I need semantic markup (and I will, in my next article), I'll write the semantic markup in org. I guess I look at this in a way that FAUST [1] uses c++ as an intermediary. You write the signal-processing graph in FAUST's own purely-functional language, which the FAUST compiler translates into c++ (with a variety of headers and wrappers for VST, OSX audio units, SuperCollider plug-ins etc.). The resulting c++ is a mess, from the standpoint of reading and maintenance, but you're not supposed to maintain that code by hand. You're supposed to go back to the FAUST code to make changes. org -- LaTeX -- PDF FAUST -- c++ -- DSP plugin But, going a step further, if semantic markup is what you need, wouldn't it be better to define a \newcommand wrapper for \textbf, and then tell org to export *bold* using the wrapper? That would assume that you can customize the string org uses for *bold*, which you can't at present... so maybe my hack has some use after all. hjh [1] Functional AUdio STream language: http://faust.grame.fr/ From 8ccbc7cad43b520067b8b29d4660fc99587995fd Mon Sep 17 00:00:00 2001 From: James Harkins jamshar...@dewdrop-world.net Date: Thu, 21 Feb 2013 09:51:02 +0800 Subject: [PATCH] hjh temp: add customize variable for bold/alert style --- lisp/ox-beamer.el |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index dc427de..44c1c68 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -206,6 +206,12 @@ You might want to put e.g. \allowframebreaks=0.9\ here. :group 'org-export-beamer :type '(string :tag Outline frame options)) +(defcustom org-beamer-bold-macro alert + LaTeX macro to insert for bold text (delimited by asterisks in the org source file). +The default \alert\ renders as red text, normal weight. +Substitute \textbf\ to obtain boldface. + :group 'org-export-beamer + :type '(string :tag Bold macro)) ;;; Internal Variables @@ -334,7 +340,8 @@ Return overlay specification, as a string, or nil. Transcode BLOCK object into Beamer code. CONTENTS is the text being bold. INFO is a plist used as a communication channel. - (format \\alert%s{%s} + (format \\%s%s{%s} + org-beamer-bold-macro (or (org-beamer--element-has-overlay-p bold) ) contents)) -- 1.7.9.5
Re: [O] Rationale for *text* - \alert{text} for Beamer export?
On May 2, 2013 4:20 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: James Harkins jamshar...@gmail.com writes: That would assume that you can customize the string org uses for *bold*, which you can't at present... so maybe my hack has some use after all. This has already been discussed, and there's a solution provided at: http://orgmode.org/worg/exporters/beamer/ox-beamer.html No need to add another customize for that. Thank you for your patch, though. Fair enough -- that's far more flexible than what I did. I did the hack months ago, when the documentation of the new exporter hadn't been written. I never would have guessed that solution, based on the docstrings available at the time. FWIW, I wasn't submitting the patch for inclusion. It's only that a patch was the easiest way to show the change. I guess I should have said so specifically, since it's natural to assume that a patch posted to the list is a proposal for a (permanent) change. Not my intent here. hjh
[O] Worg: Links to parent nodes?
Apologies if this has been asked already. I just noticed that, e.g., the ox-beamer.html page [1] has no links to its parent nodes. So for fun, I hacked the url to go back up a couple of levels, and that page didn't have any parent links either. It would be very useful to have the standard breadcrumb trail at the top and bottom of each page. hjh
Re: [O] [mobileorg-android] Re: Agenda in MobileOrg for Android
OK, so I'm reviving this old thread. I tried to set up MobileOrg again and failed completely - again. Sorry for my post being a bit harsh, but I'm really frustrated with this situation, especially that I hear people claiming it works for them... For the sake of completion, and so that MobileOrg doesn't get too bad a rap, discussion of the MobileOrg/Android config issue continued on the MobileOrg/Android mailing list. One main point: Any versions of MobileOrg (for android) with the new interface (I think 0.9.5+, but I don't remember the exact version number) depend on some new code in org-mode itself to handle pulling. Marcin was using an older org version, which doesn't include the new stuff. This is almost certainly the cause of the pull failures reported here. I think it's only within the last 4-6 weeks that some org-mobile-pull bugs were fixed in org, so in general, the newer the org version, the better. For myself, with those bug fixes, pulling from mobile is just working. I'll leave off any discussion of the interface issues, except to note that the MobileOrg/Android developers are more than willing to listen to user experiences. (I'm not one of those developers, just a generally satisfied user.) hjh
[O] BMCOL column width as absolute?
Hi, in the new beamer exporter, are there any plans to support an absolute width for columns, rather than a fraction of \textwidth? hjh
Re: [O] BMCOL column width as absolute?
On May 15, 2013 12:41 AM, Nicolas Goaziou n.goaz...@gmail.com wrote: James Harkins jamshar...@gmail.com writes: Hi, in the new beamer exporter, are there any plans to support an absolute width for columns, rather than a fraction of \textwidth? None that I know of, but it could be of some use. Do you want to provide a patch? I could try, but not in the near future. Hm, now what is that thing that reminds me to do something, even weeks or months later? Oh right, org-mode ;-) Oddly enough, absolute lengths achieve the desired effect: If I write a column width as 5cm, it appears in LaTeX as 5cm\textwidth. LaTeX processes it as 5cm, but puts a confusing error in the log (confusing = the error's line number is at the end of the frame containing the columns environment with this odd width spec). So the patch would only correct the syntax and remove the error, but I expect it wouldn't change the PDF result. hjh
[O] Exporting source code blocks as LaTeX figures
Couple of questions about exporting LaTeX figures that are neither tables nor images -- specifically, source code blocks using the listings package. 1. Is there any way to use #+CAPTION with a #+BEGIN_figure block, so that the caption will be rendered underneath the text in the figure? It seems (from reading the org manual and some experimentation on my own) that the answer is no. That's rather inconvenient; the journal specifies that captions should appear below their respective figures, but as it is: #+CAPTION: Some code #+NAME: code1 #+BEGIN_figure #+BEGIN_SRC {} // blah blah -- \begin{figure} \caption{\label{code1}Some code} \lstset{language={},numbers=none} \begin{lstlisting} // blah blah -- Figure 1. Some code. // blah blah . I can work around it by not using #+CAPTION, and writing \caption{...}\label{...}. That shouldn't be a problem for this project, unless for some reason I should have to re-export as, say, ODT or HTML. 2. Is the customize variable Org Latex Default Figure Position only used for tables and images? It would be nice if it applied to BEGIN_figure as well (unless :options override that). #+ATTR_LaTeX: :options [htb] is a mite inconvenient to replicate for every code example. Certainly possible, but it would save a little effort if the default were used here too. hjh
Re: [O] Exporting source code blocks as LaTeX figures
On Sat, May 18, 2013 at 3:39 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: instead? I.e., why don't you apply caption to src block? You can tweak the position of the caption with captionpos option in listings environment. Wow, I hadn't thought of that. Actually that works better in a lot of ways. Then the next problem... I'm going to have some figures that need to span two columns. According to [1], I should use \begin{figure*} ... \end{figure*}. Is there a way to do that using a special block? (First guess, #+BEGIN_figure* causes the special block not to be recognized.) Or do I need to write the literal LaTeX code for that? hjh [1] http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wide_figures_in_two_column_documents
Re: [O] Exporting source code blocks as LaTeX figures
On Mon, May 20, 2013 at 2:30 PM, Thomas S. Dye t...@tsdye.com wrote: Then the next problem... I'm going to have some figures that need to span two columns. According to [1], I should use \begin{figure*} ... \end{figure*}. Is there a way to do that using a special block? (First guess, #+BEGIN_figure* causes the special block not to be recognized.) Or do I need to write the literal LaTeX code for that? No, you don't need to write literal LaTeX code. See Section 12.7.4 of the manual, which describes setting the :float attribute to 'multicolumn'. That section of the manual seems to describe the behavior for images. I did try: #+ATTR_LaTeX: :multicolumn :options [htb] #+BEGIN_figure ... #+END_figure ... and :multicolumn had no effect on the output LaTeX code (either with or without the preceding : -- I tried both): \begin{figure}[htb] \lstset{language={},label=code1,caption={Some code},numbers=none} \begin{lstlisting} // SuperCollider code here . \end{lstlisting} \end{figure} Nor does this make a difference: #+ATTR_LaTeX: :float multicolumn :options [htb] #+BEGIN_figure And if I omit BEGIN_figure altogether, and try to apply :float directly to the source code block, then the floating environment doesn't appear in the LaTeX code at all. The other reference to multicolumn is for table export, and this isn't a table either. So I think, as currently designed, :multicolumn simply doesn't apply. I'm aware that BEGIN_figure delimits a special block which translates into LaTeX as an arbitrary environment, and not all environments can be floated safely... but perhaps one approach for the future would be to consider BEGIN_figure to be an extra-special special block where we know that the properties of LaTeX floating bodies are valid. Or relax the restriction so that BEGIN_figure* no longer tries to treat _ as a subscript marker. hjh
Re: [O] Exporting source code blocks as LaTeX figures
On May 20, 2013 4:54 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, James Harkins jamshar...@gmail.com writes: The other reference to multicolumn is for table export, and this isn't a table either. So I think, as currently designed, :multicolumn simply doesn't apply. Correct. The first attached patch implements :float multicolumn and :float figure handling for source blocks. Would you mind to test it? Sure, I can try both... but not until later today or maybe tomorrow. Thanks! hjh
[O] How to prevent tabs from turning into spaces in source-code export?
I have (where TAB is a tab character): #+BEGIN_SRC {} // SuperCollider code here ( r = p.chan.play(Pspawner { |sp| TABvar num, subdiv, ... }); ) #+END_SRC The exported .tex file contains: \begin{lstlisting} // SuperCollider code here ( r = p.chan.play(Pspawner { |sp| spcspcspcspcspcspcspcspcvar num, subdiv, ... }); ) \end{lstlisting} I do not want this conversion to happen. If it doesn't happen, then I can use listings' tabsize property to control the tab width. Failing that, how do I tell org to use fewer than 8 spaces? The tabs are much much too wide in the resulting pdf. hjh
[O] Italics + footnote in latex export
I have: Western notation supports a type of /polyphony/[fn:1] I get: Western notation supports a type of /polyphony/\footnote{ ... blah blah ... } Or, I can have: Western notation supports a type of /polyphony/ [fn:1] And then I get: \emph{polyphony} \footnote{ ... blah blah ... } And LaTeX puts a space between the word and the footnote number, which is poor typesetting. I also tried writing the \emph{} directly, but then org-export doesn't recognize the footnote tag: \emph{polyphony}[fn:1] appears in the .tex file. How do I keep the footnote text in the * Footnotes node and get proper typesetting in the main text? hjh
[O] Beamer handouts, pgfpages, no love
Hi, Today I was playing around with exporting a beamer presentation for handouts, following the advice online to use pgfpages for saving dead trees. I'm not sure if it's an org problem or a LaTeX problem. Exporting to a presentation is no problem: #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [presentation] #+BEAMER_THEME: default For handouts, I tried changing it like this: #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [handout] #+BEAMER_THEME: default #+LATEX_HEADER: \usepackage{pgfpages} #+LATEX_HEADER: \pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm] One problem: if I use any :BMCOL: tags, I get strange errors like this: ! LaTeX Error: \begin{minipage} on input line 117 ended by \end{altenv}. ... where the entity that is \ended could be several different things. So I tried :noexport:ing all the sections that have columns, and now the export completes without fatal errors, but pgfpages then ends up making each frame about twice as large, instead of half. As far as I can see, it is actually trying to put two slides on each page (I can see only every other one), but each frame is so much larger than it's supposed to be that I can only see part of one of the two. I'm using xelatex, if that makes any difference. I could find list messages from about a year ago where somebody was successfully using pgfpages. I have no idea why it was working for him but not for me. His latex_header stuff was pretty similar to what I have above. Thanks, hjh PS Belated thanks to Nick for answering the question of mine about emphasis markup and footnote tags. I haven't had a chance to try yet, but I did see the reply.
Re: [O] Beamer handouts, pgfpages, no love
On Jun 30, 2013 7:22 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: James Harkins jamshar...@gmail.com writes: This example does reproduce the issue where the slides are rendered at twice their normal size, instead of half. (I installed TexLive 2012 -- I'm not using the outdated tex packages from Ubuntu.) The generated LaTeX code looks correct. Why do you think it isn't? I never said that. I was only reporting some testing results. And if there's a problem, couldn't it be related to pgf instead of Org? Yes, that's quite likely. Just reporting some testing results. hjh
[O] Use babel to import table data from OpenDocument spreadsheets?
Just wondering if anyone out there has some magic code snippets that will automatically bring in data from a LibreOffice spreadsheet during HTML export. I think I could save, by hand, the required worksheets out of the ods file into separate CSVs, and then write an emacs-lisp Babel block to import the table from file -- presumably this would run the lisp function at export time. But it would be so much slicker if something could go into the ods file directly and return the results in org table format. If somebody has already done something like this, it would save me quite a bit of time. If not, I would have to weigh my available time (not much), the time it would take to implement (maybe not extremely difficult, but not trivial either, especially if it involves digging through LibreOffice library documentation) and the weekly time I would save by just hitting C-e h h, instead of doing another manual process before C-e h h. (Or possibly an alternative would be to write a macro in LibreOffice to write the CSV files and run that from the commandline as part of the org export process.) Thanks -- this is just, no harm in asking. Otherwise I'll deal with it some other way. hjh
Re: [O] Use babel to import table data from OpenDocument spreadsheets?
At Tue, 02 Jul 2013 19:49:43 +0530, Jambunathan K wrote: M-x org-odt-convert RET or (org-odt-convert ..) Is this valid for .ods, or only .odt? The file is from LibreOffice Calc, not Writer. I made a quick test and got only failed. From the Messages, I can see it's using a headless soffice, so maybe it needs some other command line parameters. That will have to wait for another day... busy with other things now. Debug (ox-odt): Searching for OpenDocument styles files... Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... Debug (ox-odt): Using styles under /usr/share/emacs/etc/org/styles/ Debug (ox-odt): Searching for OpenDocument schema files... Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... Debug (ox-odt): Using schema files under /usr/share/emacs/etc/org/schema/ Making completion list... Executing soffice --headless --convert-to csv --outdir /home/dlm/Documents/xinghai/12-13-spring/ /home/dlm/Documents/xinghai/12-13-spring/gradesheet.ods Export to /home/dlm/Documents/xinghai/12-13-spring/gradesheet.csv failed hjh
Re: [O] Use babel to import table data from OpenDocument spreadsheets?
At Tue, 02 Jul 2013 20:40:40 +0530, Jambunathan K wrote: Works here for simple files. M-: (org-odt-convert file.ods csv) Executing libreoffice4.0 --headless --convert-to csv --outdir /home/kjambunathan/ /home/kjambunathan/file.ods convert /home/kjambunathan/file.ods - /home/kjambunathan//file.csv using Text - txt - csv (StarCalc) Exported to /home/kjambunathan/file.csv /home/kjambunathan/file.csv AFAIK, if you can save as CSV from LO UI, then it should work from the command line. Famous last words: It should work :) Okay, I've just tested with two very simple files at the command line. LibreOffice fails to write any output file at all. Apparently this is a common problem. Bing finds [1], but ask.libreoffice.org is down. Here is the transcript for a simple Writer file containing only the word test: $ soffice --headless --convert-to html --outdir /home/dlm/Documents/orgtests/ /home/dlm/Documents/orgtests/html-table-test-word.odt $ ls ht* html-table.html html-table.ods html-table.org~ html-table.html~ html-table.org html-table-test-word.odt Anyway, I'm not convinced that org-odt-convert would meet my needs anyway. It will have to be a multi-worksheet file, and I'll have to extract just one or two of the worksheets. The macro might be the way to go. hjh [1] http://ask.libreoffice.org/en/question/2641/convert-to-command-line-parameter/
Re: [O] Use babel to import table data from OpenDocument spreadsheets?
At Wed, 03 Jul 2013 10:35:51 +0800, James Harkins wrote: Anyway, I'm not convinced that org-odt-convert would meet my needs anyway. It will have to be a multi-worksheet file, and I'll have to extract just one or two of the worksheets. The macro might be the way to go. I've made a bit more progress with this. I found a utility, unoconv[1], which I can persuade to produce a tab-separated export of the first worksheet of an ODS document. That much should work for my needs -- I can reserve the first worksheet for the data to be published, and put all the calculations in other sheets. I'm not sure how to import this as an org table. I found org-table-import, but it seems that this must insert a table into a buffer and then convert to org-table format in the buffer. I don't know how to integrate that with babel. If I set :exports results, should I assume then that the code block should return a string consisting of the org-formatted table? - Or, do I have to say :exports none and do some save-excursion magic with moving the point to the right place before calling org-table-import? (That's probably okay for this small-scale usage, but it would be slicker to put a #+CALL in the right location.) - Or, do I have to write my own lisp function to format the table as a string? The goal is that I should be able to do C-c C-e h h from the org document, and babel will run a short emacs-lisp block to invoke unoconv (producing a CSV file on disk) and then insert the table under the right heading. Thanks, hjh [1] http://linux.die.net/man/1/unoconv
Re: [O] Use babel to import table data from OpenDocument spreadsheets?
At Wed, 10 Jul 2013 09:20:25 +0530, Jambunathan K wrote: James Harkins jamshar...@gmail.com writes: I found a utility, unoconv[1], which I can persuade to produce a tab-separated export of the first worksheet of an ODS document. FYI, unoconv is an option provided by `org-odt-convert-processes'. Thanks. Okay... I finally had some time to come back to this task. While I do appreciate all the suggestions so far, unfortunately I have to admit that I'm still stuck. What I'd like to do now is run down what I know about it so far and put questions in the middle of that. 1. I have a LibreOffice ODS file, where the table to obtain will be in the first worksheet. 1a. I can use unoconv to get a tab-separated text table out of it, in a file on disk. 1b. I will need to invoke this synchronously in an emacs-lisp block. (shell-command ...) I guess, right? 2. I want the tab-separated text to be converted into an org-table, so that HTML export will turn it into an HTML table. This is where it becomes completely baffling to the novice. 2a. There's a function, org-table-import, which looks like it will do the job. It inserts the table contents at the point. I just can't find any examples online of the correct way to do this. I assume I will have to run an emacs-lisp source block. I had been thinking I could use :exports results with a #+call, supposing that I could write out the table text as a stream and those results would be put in place of the #+call in the export. But of course that doesn't make sense if org-table-import is significant for its side effect (modifying the buffer) rather than its result. 2b. So (I guess) I would have to use emacs-lisp to move the point to a specific location in the file before calling org-table-import (obviously not by character index, since I can't assume previous text will not change). QUESTION: What is the best way to do that? ^^ This is the point where I'm stuck. I really have no idea. Say I put in an org comment # raw data here -- how do I get the point to go to the line after that? How do I delete the entire old table before importing the new one? Working example, perhaps? Anyway, I'll be happy to write this up as a worg page after I get it working, as it seems to me this would be a fairly common need but the information is not easy to find. Thanks, hjh
Re: [O] Use babel to import table data from OpenDocument spreadsheets?
At Thu, 18 Jul 2013 14:49:16 +0530, Jambunathan K wrote: 1. Give me a sample worksheet. Attached. 2. Give me the specific unoconv command that you used for converting the worksheet. unoconv -f csv -i 9,34,system,1,1/5/2/1/3/1/4/1 html-table.ods Maybe the filename needs a full path, not sure. I can supply that later. If you do (1) and (2), I will post a recipe. Really appreciate that! hjh #+OPTIONS: html-postamble:auto html-preamble:t tex:t #+CREATOR: a href=http://www.gnu.org/software/emacs/;Emacs/a 23.3.1 (a href=http://orgmode.org;Org/a mode 8.0.2) #+HTML_CONTAINER: div #+HTML_DOCTYPE: xhtml-strict #+EXCLUDE_TAGS: noexport * Table test After running the script, I expect the existing table (with 1, 2, 3 in the second column) to be replaced by the new table data (10, 20, 30). #+name: gettable1 #+begin_src emacs-lisp :exports none (... don't know what to write in here...) #+end_src #+name: table1 #+ATTR_HTML: :border 2 :rules all :frame border | Simple | Table | |+---| | 1 | 1 | | 2 | 2 | | 3 | 3 | html-table.ods Description: application/vnd.oasis.opendocument.spreadsheet
Re: [O] Use babel to import table data from OpenDocument spreadsheets?
At Fri, 19 Jul 2013 00:32:44 +0530, Jambunathan K wrote: I don't want to venture in to Babel. I don't want to experiment with unoconv either. I have a non-official libreoffice installed. Pulling in official unoconv will interfere with my working installation. Fair enough. For your purposes, just soffice will do. Except that I tried using soffice --headless, but I could never get it to write any output file. (defun org-table-import-ods (optional file-name) (interactive fFile: ) (let ((csv-file (org-odt-convert file-name csv)) (pos (point))) (save-excursion (insert (with-temp-buffer (insert-file-contents csv-file) (org-table-convert-region (point-min) (point-max) '(4)) (buffer-string)) Wow, thanks, this is great! I never would have guessed the stuff about with-temp-buffer. This snippet didn't handle the part about deleting the old table contents, but I was actually able to figure that out on my own (below). And... using it in a src block as below... works! I don't see the change in table contents in the original org buffer, but the new contents definitely show up in the HTML export. That's all I need, and I'd agree that this behavior -- protecting the org file from side effects -- is safer. Next, parameterize the file name and table name. So this is really pretty f'''... sweet. I'm thrilled! Thanks to Jambunathan for the crucial info that got me over the part I just couldn't figure out on my own. hjh #+name: gettable1 #+begin_src emacs-lisp :exports results (defun org-table-import-ods (optional file-name) (interactive fFile: ) (let ((csv-path (concat (file-name-sans-extension file-name) .csv)) (pos (point))) (shell-command (concat unoconv -f csv -i 9,34,system,1,1/5/2/1/3/1/4/1 file-name)) (save-excursion (let ((table-begin (funcall (lambda () (search-forward #+name: table1) (search-forward-regexp ^|) (beginning-of-line) (point (table-end (funcall (lambda () (search-forward # end table) (beginning-of-line) (point) (delete-region table-begin table-end) (goto-char table-begin) (insert (with-temp-buffer (insert-file-contents csv-path) (org-table-convert-region (point-min) (point-max) '(16)) (buffer-string))) (goto-char table-begin) (org-table-insert-hline) (org-table-import-ods html-table.ods) #+end_src
[O] [bug?] org-latex-table-caption-above has no effect
Not entirely sure if this is a bug or not, but it seems to be a regression. According to [1], the customization variable org-latex-table-caption-above was added to allow table captions to come underneath the table. I can't see any indication that the variable has been deprecated, but in my environment, it has no effect at all. I've set the variable to nil: org-latex-table-caption-above is a variable defined in `ox-latex.el'. Its value is nil However, when I use the following minimal example, the exported LaTeX code places the \caption{} before the tabular environment. ~~ #+DATE: 2013-07-23 Tue #+OPTIONS: texht:t #+LATEX_CLASS: article * Heading #+CAPTION: A table #+NAME: table1 #+ATTR_LaTeX: :starred t :options [htb] #+BEGIN_table | Row 1 | Something | | Row 2 | Something else | #+END_table ~~ Actual exported LaTeX (excluding preamble, with comment added by hand): ~~ \section{Heading} \label{sec-1} \begin{table*}[htb] % Why is this at the beginning? \caption{\label{table1}A table} \begin{center} \begin{tabular}{ll} Row 1 Something\\ Row 2 Something else\\ \end{tabular} \end{center} \end{table*} ~~ Expected: ~~ \section{Heading} \label{sec-1} \begin{table*}[htb] \begin{center} \begin{tabular}{ll} Row 1 Something\\ Row 2 Something else\\ \end{tabular} \end{center} \caption{\label{table1}A table} \end{table*} ~~ Org-mode version 8.0.2 (release_8.0.2-122-gcbf956 @ /home/*/share/org-mode.git/lisp/) Thanks, hjh [1] http://comments.gmane.org/gmane.emacs.orgmode/47227
Re: [O] [bug?] org-latex-table-caption-above has no effect
At Tue, 23 Jul 2013 18:44:04 +0200, Nicolas Goaziou wrote: James Harkins jamshar...@gmail.com writes: According to [1], the customization variable org-latex-table-caption-above was added to allow table captions to come underneath the table. I can't see any indication that the variable has been deprecated, but in my environment, it has no effect at all. This variable, as its name suggests, only applies to tables. You're captioning a special block (begin_table) here. Therefore it is ignored. Okay, I can understand that. (Actually, I kind of guessed this sometime after getting up from the computer). It took a minute to play with it, and another visit to the org manual, but this seems to do what I wanted. Posting for the benefit of future archive searches. (The multicolumn is necessary for this article, where the conference specifies a two-column format. Maybe optional in other settings.) #+CAPTION: A table #+NAME: table1 #+ATTR_LaTeX: :float multicolumn | Row 1 | Something | | Row 2 | Something else | Thanks -- hjh
[O] ignoreheading for non-beamer export
Hi, I found an inventive solution by Suvayu to discard headlines from export here [1], but the 8.0+ solution throws an error in my environment. (defun sa-ignore-headline (contents backend info) Ignore headlines with tag `ignoreheading'. (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii) (string-match \\`.*ignoreheading.*\n (downcase headline))) (replace-match nil nil headline))) (add-to-list 'org-export-filter-headline-functions 'sa-ignore-headline) -- string-match: Symbol's value as variable is void: headline It seems it should actually be: (defun sa-ignore-headline (contents backend info) Ignore headlines with tag `ignoreheading'. (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii) (string-match \\`.*ignoreheading.*\n (downcase contents))) (replace-match nil nil contents))) (add-to-list 'org-export-filter-headline-functions 'sa-ignore-headline) I'm not allowed to reply to the answer on stackexchange, so I'm posting here. Thanks. hjh [1] http://stackoverflow.com/questions/10295177/is-there-an-equivalent-of-org-modes-b-ignoreheading-for-non-beamer-documents
[O] LaTeX export: {} on separate lines are escaped, why?
Just wondering if there's a better way to handle LaTeX commands written inline, when the command arguments span a line break. Currently, LaTeX export preserves curly braces as is if a pair of them is on a single line, but it escapes them if there's a line break in between: ~~ org Sections may be created as subpatches, using \inpcode{[route go stop]} to start or stop the section, as in the very simple example in Figure \ref{pd_comp}a. ~~ ~~ Exported LaTeX: Sections may be created as subpatches, using \codeident\{[route go stop]\} to start or stop the section, as in the very simple example in Figure \ref{pd_comp}a. ~~ (\codeident is a custom command I defined in the preamble, as semantic markup for \texttt.) In the PDF, \ref{pd_comp} turns into a figure number, as I would expect, but \codeident\{...\} sets the enclosed string in the normal font rather than fixed-width (with visible {}, which shouldn't be in the printed output). I do have a workaround: ~~ org Sections may be created as subpatches, using #+LaTeX: \inpcode{[route go stop]} to start or stop the section, as in the very simple example in Figure \ref{pd_comp}a. ~~ ... where #+LaTeX: prevents M-q from breaking the braces onto separate lines, but -- this has tripped me up a few dozen times working on this article, so I thought it would be worth asking if this is really the ideal behavior. hjh
[O] orgmode.org is missing a link to the split HTML manual
Is there a reason why the org-manual's index is not linked from the head orgmode.org page? Under orgmode.org/#docs, the link to the HTML manual is http://orgmode.org/org.html, which downloads the entire contents of the manual into the browser. This is perhaps tolerable on a full-size computer, but if I want to check something using the browser on my tablet, the huge/immense/massive page grinds my tablet to a halt. This index works beautifully, though: http://orgmode.org/manual/index.html I think it might be helpful if the main org page gave users the choice whether they want to download the whole manual as one page, or browse separate pages for the various sections and subsections. hjh
Re: [O] Worg: Links to parent nodes?
On Aug 12, 2013 1:39 PM, Carsten Dominik carsten.domi...@gmail.com wrote: On 2.5.2013, at 13:56, James Harkins jamshar...@gmail.com wrote: Apologies if this has been asked already. I just noticed that, e.g., the ox-beamer.html page [1] has no links to its parent nodes. So for fun, I hacked the url to go back up a couple of levels, and that page didn't have any parent links either. It would be very useful to have the standard breadcrumb trail at the top and bottom of each page. Would you like to implement these links? Ah, ok, they are community pages after all. I could do some, time permitting. I think that's why org mode has [#C]... Thanks also for the browse manual link (answering here rather than add clutter to the mailing list). hjh
[O] Buffer-specific export filter?
Is it possible to apply a specific filter during export for one org document, but not others? Basically, a buffer-specific export filter. It appears in the org manual that the hook needs to be added into e.g. org-export-filter-plain-text-functions, where it remains globally for the duration of the session. But I have a case here where I need a filter to work around a specific problem I'm having in one document, which isn't a problem in other documents, and I don't want the filter to interfere with the other documents. Possible? I don't see any mention of it in the manual. hjh
Re: [O] Buffer-specific export filter?
Suvayu Ali fatkasuvayu+linux at gmail.com writes: 1. Is it possible to set filters as buffer local? Okay the help string says: This variable may be risky if used as a file-local variable., so I guess the answer is no. 2. Otherwise you could have used a lisp source block in the buffer. You could still do that, just add a conditional that checks for the buffer name. This way modifying a global filter would still affect current buffer export. I see... that seems awkward. Maybe a valid feature request. But maybe there's a better solution for my specific case. The problem is that I'm using the colloquial 'em for them. The preceding space causes org to export this as `em. Normally a single quote after a space would correctly be an opening single quote, but here it's for a contraction and should be an apostrophe. Possible solutions: - Use a LaTeX \specialCharName, if it exists. I couldn't find anything like this. All the LaTeX documentation says to use '. - Hacky approach which I tried last night: Define a filter to turn into a non-breaking space ~; then org doesn't treat it as an opening single quote. - Better approach which I just thought of: Define a filter recognizing 'em as a special case, which I could also extend for other special cases later. Related question: If I wanted to force a non-breaking space in LaTeX export, how would I do that without a filter? ~ exports, reasonably, as \textasciitilde. hjh
[O] Problem writing my first export filter
Referring to [1]: I just tried the following, so that I could maintain a list of special cases where org's default latex export doesn't do what I want. (setq hjh-org-latex-macros '((`em 'em))) (defun hjh-latex-filter-macros (text backend info) hjh: Replace special cases listed in hjh-org-latex-macros. (when (org-export-derived-backend-p backend 'latex) (dolist (element hjh-org-latex-macros) (replace-regexp-in-string (car element) (car (cdr element)) text First I tried (setq org-export-filter-plain-text-functions '(hjh-latex-filter-macros)) -- no result: `em passes through unchanged. So then I tried clearing plain-text-functions and using final-output-functions instead. Same thing: the filter didn't do anything. I suppose I'm missing something simple. Thanks in advance for advice, hjh [1] http://article.gmane.org/gmane.emacs.orgmode/75607
Re: [O] Buffer-specific export filter?
On Aug 21, 2013 3:41 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: In that case, you should disable smart quotes, which are not smart enough for your use case. Note that they are not enabled by default. That's reasonable, but irritating while I'm still editing. I'm certain I'll leave some ASCII double quotes in there by mistake. Should be easy enough to handle as the last thing, using regexp replace. Related question: If I wanted to force a non-breaking space in LaTeX export, how would I do that without a filter? ~ exports, reasonably, as \textasciitilde. Use \nbsp{} macro. Ok, thanks. And thanks also for the hint on the filter. I'm fairly new to lisp (obviously). I know about functions' return values, just forgot here... hjh
Re: [O] from Android to org's calendar in a painless way?
Renato rennabh at gmail.com writes: I know MobileOrg for Android, but I currently only use it to sync things from the computer to the phone (i.e. I just use it to have my .org files with me all the time, for consulting) - the other way around I find clumsy, because I have to remember, when on the computer, to open a specific file and refile entries. Check your settings and verify that Advanced capture is enabled. (In the most recent mobileorg version, this is under Settings Synchronization.) This shows you to add new nodes underneath existing nodes, so that org-mobile-pull will put them under the right heading in emacs. If the existing heading has no sub-headings, the way to add a new heading under it is to tap+hold on the heading. Then you'll see options to view, edit and add -- (+). I just realized that from MobileOrg you can add only TODO entries, you can't put an active date on it (and thus it won't show in the android calendar). So that really doesn't work the way I'd like. Not true -- the menu key (in android 4, the three dots at top right) reveals Add tag, Add scheduled, Add deadline and Add timestamp. One quirk is that these options aren't available if you're editing the payload (free text belonging to the heading). This makes sense because properties like dates are part of the payload too. Unfortunately, new dated nodes in mobileorg don't appear in the calendar until after you sync to the computer and then resync to android. I filed a bug report about that. Also, calendar sync is not working on my Android 4 tablet after the most recent OS update from Asus. I've filed a bug report about that too, and asked on the mobileorg mailing list, but so far, no response. (This surprises me -- usually the list is pretty responsive.) So, is there a painless way of adding events into my org-mode calendar from my Android phone? By painless I mean as easy as adding something into Android's built-in calendar, or as close to that as possible Mobileorg is not quite *that* painless at it, but it generally works well enough for my needs. Also, the latest mobileorg (0.9.13) has a dynamic agenda feature, where it can present agenda-like views based on new nodes in the phone without resyncing. I haven't figured out how to get that to make a this week at a glance view, though. hjh hjh
Re: [O] from Android to org's calendar in a painless way?
Charles Philip Chan writes: James Harkins writes: Also, calendar sync is not working on my Android 4 tablet after the most recent OS update from Asus. I've filed a bug report about that too, and asked on the mobileorg mailing list, but so far, no response. (This surprises me -- usually the list is pretty responsive.) Work find on my Nexus 7 with the latest Jelly Bean. I presume your tablet does not use vanilla Android. From https://github.com/matburt/mobileorg-android/issues/409 -- ~~ My tablet is an ASUS transformer pad TF300T. Android 4.2.1 Kernel version 3.1.10-g890b05a android@Taurus #1 Thu Jul 11 17:55:00 CST 2013 Build number JOP40D.US_epad-10.6.1.27.1-20130711 Calendar app version 4.2.1-US_epad-10.6.1.27.1-20130711 ~~ If you were asking if I've rooted my tablet, no, I haven't. It might be worth it if you checked your build number, to see if you're on the same base version (JOP40D) or earlier or later. Probably should also move this to the mobileorg mailing list, as this isn't strictly an org/emacs issue. Thanks for confirming that isn't a universal problem. hjh
Re: [O] [export] Easy way to make children of Beamer frames generate list items?
Suvayu Ali fatkasuvayu+linux at gmail.com writes: 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. FWIW, I hit this issue about half a year ago, and argued pretty strenuously that breaking backward compatibility was a Terrible Terrible Thing. But, having adapted to the new markup spec, I find it's more logically consistent *and* easier to read while editing. I still have a semester's worth of class slides to convert from the old format, week by week, but it's worth it -- do it once per presentation, and that's the end of it. The new way really is better (I say this as someone who was horrified six months ago to find that my old presentations were broken). hjh
Re: [O] Bug: Wrong type argument: arrayp, nil when exporting to beamer [8.2 (8.2-elpa at /Users/jason/.emacs.d/elpa/org-20130919/)]
Jason Lewis jason at dickson.st writes: Nicolas Goaziou wrote, On 23/09/2013 7:56 AM: The syntax is wrong: you cannot have two frames within the same tree. Hi Nocolas, Thanks. The error message is not very clear and this is an easy mistake for a beginner to make. FWIW, I've been using the new beamer exporter for at least half a year, and I'm convinced the simplest way to handle frames is to set the H: export option to the heading level that you want to turn into frames. That is, typically I use top-level headings for sections, and my slideshows haven't been long enough yet to need subsections, so I set H:2 in one of the #+OPTIONS strings at the top. Then all ** Second level headings become frames. No need to specify the beamer_env in the properties drawer. It isn't always the case, but it does seem often to be true that simpler input avoids problems. Hope that helps. hjh
[O] Habit display in agenda, scheduled day only?
I just started using habits. A question: With the default settings, habits appear in the agenda if they are TODO for today. If they are TODO on a future day, they are hidden. (This is basically okay, except that marking a habit DONE makes the consistency graph disappear from the agenda, until you actually get to the next scheduled day.) With org-habit-show-habits-only-for-today = nil, you see the consistency graph on every future scheduled day. Seems redundant. With org-habit-show-all-today = non-nil, I can still see the consistency graph after marking it DONE, but on today's agenda. Not quite what I'm after. The behavior that I would *really* like is to see the habit appear on the next scheduled day only -- that is, like org-habit-show-habits-only-for-today = nil except that I don't want to see all future repeats in the agenda. More specifically: When I mark the habit DONE, the scheduled time stamp goes forward by the repeat interval. Now it's 2013-09-23 Mon +1d; later today, when I mark it DONE, it will be 2013-09-24 Tue +1d. I would like the entry to move in the agenda to Tuesday, but I don't have any need to display it on Wednesday, Thursday, Friday etc. Is this possible at present? (I recently upgraded to 8.2, btw.) Thanks, hjh
[O] Beamer export with \only overlays - how?
Question: How does one use Beamer's \only command with blocks? (Successfully, with org-mode's beamer export, I mean.) I found in the manual that you can give an overlay specification using the BEAMER_ACT property... ok... but that's not the same as \only because, when a latex chunk is marked \only1, it takes *no space* on 2-. Using 1 and 2 causes the 2 to appear lower than the 1. That's not what I want. Hacking it with #+latex: lines is even worse, as explained in the example below. I suppose there must be a way to do it, albeit undocumented. Or maybe it's simply not supported, in which case I would have to write the LaTeX directly. Annoying, but I'll do that if there's no alternative. hjh #+LANGUAGE: en #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t ':t #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [presentation] #+BEAMER_THEME: default #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) %8BEAMER_opt(Opt) #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC * Section ** Frame (beamer_act, not quite right) *** The problem on this frame I want Block 1 and Block 2 to occupy the same space on successive slides. *** Block 1 :B_block: :PROPERTIES: :BEAMER_env: block :BEAMER_ACT: 1 :END: *** Block 2 :B_block: :PROPERTIES: :BEAMER_env: block :BEAMER_ACT: 2 :END: ** Frame (using #+latex and \only) *** This is a complete bloody hash. There is no way to make \verb|\only2| come after \verb|\end{block}|. #+latex: \only1 { *** Block 1 #+latex: } \only2 { *** Block 2 #+latex: }
Re: [O] Beamer export with \only overlays - how?
Suvayu Ali fatkasuvayu+linux at gmail.com writes: On Tue, Oct 08, 2013 at 11:41:36PM +0800, James Harkins wrote: Question: How does one use Beamer's \only command with blocks? (Successfully, with org-mode's beamer export, I mean.) I found in the manual that you can give an overlay specification using the BEAMER_ACT property... ok... but that's not the same as \only because, when a latex chunk is marked \only1, it takes *no space* on 2-. Using 1 and 2 causes the 2 to appear lower than the 1. That's not what I want. Did you try this: http://orgmode.org/worg/exporters/beamer/ox-beamer.html#environments-overlay My example file uses BEAMER_ACT, so yes, I did try that. Here's what happens if I try it with \only1. #+LANGUAGE: en #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t ':t #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [presentation] #+BEAMER_THEME: default #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) %8BEAMER_opt(Opt) #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC * Section ** Frame (beamer_act, not quite right) *** The problem on this frame I want Block 1 and Block 2 to occupy the same space on successive slides. *** Block 1 :B_block: :PROPERTIES: :BEAMER_env: block :BEAMER_ACT: \only1 :END: *** Block 2 :B_block: :PROPERTIES: :BEAMER_env: block :BEAMER_ACT: \only2 :END: -- \begin{block}\only1{Block 1} \end{block} Where the correct syntax would be: \only1{ \begin{block}{Block 1} \end{block} } So in short, no, that doesn't help. I'm getting the uncomfortable feeling that this is a use case that org just doesn't support as yet. Actually, reading further in the beamer user guide, I noticed last night that what I really want is \overlayarea, e.g.: \begin{overlayarea}{\textwidth}{3cm} \only1{Some text for the first slide.\\Possibly several lines long.} \only2{Replacement on the second slide.} \end{overlayarea} Unfortunately \overlayarea is not supported as a BEAMER_env: *** dummy :B_overlayarea: :PROPERTIES: :BEAMER_env: overlayarea :BEAMER_envargs: {\textwidth}{3cm} :END: There's no \begin{overlayarea} or \end{overlayarea} anywhere in the exported code. Oh, forgot: org-version says Org-mode version 8.2 (release_8.2-1-g025bb7 @ /home/dlm/share/org-mode.git/lisp/). hjh
Re: [O] Beamer export with \only overlays - how?
Suvayu Ali fatkasuvayu+linux at gmail.com writes: Look a bit more carefully ;). The following paragraph has an example suggesting the onlyenv environment. As far as I understand, environments are prefered over commands with arguments or macros when translating headlines. You can nest your block in such an environment. I realise this is a little less flexible than \only{}, but it seems to work. I have not tried any of this personally in a long time though. Indeed, this does the job. Thanks for the extra pointer. For future readers, now I have this in my .emacs: (add-to-list 'org-beamer-environments-extra '(onlyenv O \\begin{onlyenv}%a \\end{onlyenv})) And then I can export: ** Frame (beamer_act, not quite right) *** The problem on this frame I want Block 1 and Block 2 to occupy the same space on successive slides. *** OnlyEnv 1 :B_onlyenv: :PROPERTIES: :BEAMER_env: onlyenv :BEAMER_ACT: 1 :END: Block 1 Text *** OnlyEnv 2 :B_onlyenv: :PROPERTIES: :BEAMER_env: onlyenv :BEAMER_ACT: 2 :END: Block 2 Text 2 -- \begin{frame}[label=sec-1-1]{Frame (beamer$_{\text{act}}$, not quite right)} \begin{block}{The problem on this frame} I want Block 1 and Block 2 to occupy the same space on successive slides. \end{block} \begin{onlyenv}1 \begin{block}{Block 1} Text \end{block} \end{onlyenv} \begin{onlyenv}2 \begin{block}{Block 2} Text 2 \end{block} \end{onlyenv} \end{frame} ~~~ I think I overlooked this in the manual because the overlay section is not organized around (what I think are) the most important user questions: - Which overlays does org beamer export support? - How to use them? Instead, onlyenv appears in a paragraph whose topic sentence is You can add your own environments by... In other words, the information is there, but organized in a way that would make your middle school English teacher break out the red pen. I'll add a TODO for myself to rewrite this section. I don't know when I can get to it, though. ~~~ Why is onlyenv not supported out of the box? hjh
Re: [O] org-grep, and problems
R. Michael Weylandt michael.weylandt at gmail.com michael.weylandt at gmail.com writes: On Oct 10, 2013, at 11:50, François Pinard pinard at iro.umontreal.ca wrote: P.S. What is proper English: nobody remember or nobody remembers? Remembers. 'Nobody' counts as singular, as does 'no one'. English isn't totally consistent on this matter, however, as 'none' takes a plural verb. No one is brave enough to skip the meeting, even though none of the bosses are going to attend. Actually, I think the latter clause is incorrect usage. The verb's subject is none, not bosses; since the subject is singular, the verb form should be singular as well. It feels wrong to have a singular verb immediately after a plural noun, but that noun properly belongs to the preposition, not the verb. I'm voting for none of the bosses is going to attend. hjh
Re: [O] org-grep, and problems
On Oct 15, 2013 2:19 AM, Jonathan Leech-Pepin jonathan.leechpe...@gmail.com wrote:. I'm voting for none of the bosses is going to attend. None is a bit of an odd case, since it reflects the plurality of the associated noun. I don't want to drag it out much further as it's well off topic, but... I did some checking and found (for the most part) that what I said *used* to be true, but that the usage has been shifting for a good century or two (to allow none to be plural). So I concede that point (and learned something today, which I like). From the few grammar sites I checked, it seems that a plural none is definitely accepted in speech and informal writing. One site mentioned that formal writing may more often call for none to take a singular verb, regardless of the associated noun. But Facebook, twitter and texting have basically killed formal writing already, so, soon even that caveat will be gone. I did not find any sites claiming that it's mandatory to give none a plural verb if it appears with a plural noun. All of those sites at least gave lip service to its origin as not one of -- e.g. not one of the groups is going -- so my preference for the singular verb is justified, though not my claim that the other is flat-out incorrect. Thanks... Glad to learn I can cross that one off my grammar police list. hjh
[O] Beamer export: How to handle overlayarea
Per the beamer user guide, the syntax of the overlayarea environment is: \begin{overlayarea}{area width}{area height} environment contents \end{overlayarea} I can't figure out how to get the width and height in properly. From the customize interface, I added overlayarea as follows: '(org-beamer-environments-extra (quote ((CJK Z \\begin{CJK}%a%H \\end{CJK}) (onlyenv O \\begin{onlyenv}%a \\end{onlyenv}) (overlayarea Y \\begin{overlayarea}%o%a \\end{overlayarea} And I can plug text into %o using the BEAMER_OPT property: *** Overlays :B_overlayarea: :PROPERTIES: :BEAMER_env: overlayarea :BEAMER_OPT: {0.9\textwidth}{0.7\textheight} :END: -- \begin{overlayarea}[{0.9\textwidth}{0.7\textheight}] Oh, hello, BEAMER_OPT automatically adds square brackets, how charming. I guess I can hack up a filter to remove the brackets after overlayarea. .. 45 minutes after I started writing this email... I copied someone else's ignoreheading filter and modified it for this purpose: (defun hjh-overlayarea (contents backend info) Remove brackets from options for overlayarea. (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii) (string-match begin{overlayarea}\\[\\(.*\\)\\] (downcase contents))) (replace-match begin{overlayarea}\\1 nil nil contents))) Replace-match's handling of backslashes threw me at first, but this appears to work. Still, I wonder if there shouldn't be, e.g., %O for options-without-brackets. Because that was 45 minutes I spent NOT writing my slides :-| Also, side note, [1] seems not to document BEAMER_OPT for environments within a frame. Reading this page, you would think you could only use it for frames. I had to dig into the source code to find how to populate %o. hjh [1] http://orgmode.org/worg/exporters/beamer/ox-beamer.html
Re: [O] Beamer export: How to handle overlayarea
On Oct 21, 2013 6:12 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Optional arguments are in square brackets in LaTeX. Try %r instead, so you can write: *** {0.9\textwidth}{0.7\textheight} :B_overlayarea: :PROPERTIES: :BEAMER_env: overlayarea :END: Ah, OK, that's better. It's not easy to grasp the correct terminology and structure from the available documentation. I do appreciate the excellent help from the list in such cases! This part of the documentation might benefit from some examples of generating different types of beamer syntax -- when to use properties, when to use headline text, etc. I wouldn't have guessed to use the headline text because I was thinking of parameters or arguments. Also, side note, [1] seems not to document BEAMER_OPT for environments within a frame. Reading this page, you would think you could only use it for frames. I had to dig into the source code to find how to populate %o. Would you mind suggesting a better phrasing? Under Block environments and overlay specifications, where it discusses custom environments, I would add: ~~ - Environment options may be given using the BEAMER_opt property. They will be enclosed in square brackets and inserted where %o appears in the environment definition. (with an example, but I can't think of one now) - Additional arguments may be written into the environment's headline, and inserted into the LaTeX string using %r (raw headline text, no processing). ~~ I think it's important to mention it in the section where it can be used. My faulty conclusion was based on the fact that the only mention of _opt is in a section about frames. hjh hjh
Re: [O] Beamer export: How to handle overlayarea
On Oct 24, 2013 12:58 AM, Nicolas Goaziou n.goaz...@gmail.com wrote: There are two things to consider: what belongs to the manual, and what belongs to `org-beamer-environments-extra' docstring. I think it is reasonable for the manual not to talk about %o, %r... but, instead, simply point to the variable name. OK. Headlines also support 'BEAMER_ACT' and 'BEAMER_OPT' properties. The former is translated as an overlay/action specification, or a default overlay specification when enclosed within square brackets. The latter specifies options for the current frame or block, and will automatically be enclosed within square brackets. That would help. I'd still like to see something more like a for-dummies explanation of passing options and arguments to LaTeX entities. I'm not saying the documentation is woefully inadequate (hardly that -- Suvayu's page got me rather far, and I got stuck on a couple of details). My experience was: it never would have occurred to me on my own to use the headline text for LaTeX code, and if there was a hint anywhere in the docs to suggest that this would be the way to go, I didn't find it. That's a conceptual leap that passed me by. FWIW, I often raise a similar point among SuperCollider devs, noting that we generally do a decent job of documenting class interfaces, but not such a great job of explaining to people who don't eat, breathe and sleep SC how to put the pieces together. That leads to questions such as [1] on the mailing list. Really basic use case, but this competent user is confused... meaning, the collective docs aren't doing a thorough job. This sort of doc would be appropriate for worg, but probably not the manual. If I have time while traveling, I'll draft up a few paragraphs -- but I don't know all the implementation details so I'd certainly need another pair of eyes. hjh [1] http://article.gmane.org/gmane.comp.audio.supercollider.user/102850
[O] Temp files are not deleted after beamer export with source code blocks
I've set org-latex-listings to Use listings (not minted), and then run this minimal example. #+BIND: org-latex-listings-options ((basicstyle \\ttfamily) (captionpos b) (tabsize 3)) #+LANGUAGE: en #+OPTIONS: H:1 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t :t ':t #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [presentation] #+BEAMER_THEME: default #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) %8BEAMER_opt(Opt) #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC #+LATEX_HEADER: \usepackage{listings} #+TITLE: Test #+AUTHOR:hjh * A frame ** You can write some code like this. #+begin_src {} -i :exports code some code here #+end_src Now there is a file beamer-listings-2.vrb containing the LaTeX code for the second frame. This file never gets deleted. As I'm developing the presentation, chances are that frame will end up becoming a different frame number, so I keep getting more and more vrb files on disk. Shouldn't org clean these up after LaTeX is finished? It already cleans up other temporary LaTeX files. hjh
Re: [O] Temp files are not deleted after beamer export with source code blocks
On Tuesday, October 29, 2013 5:06:29 PM KST, Nicolas Goaziou wrote: It should clean them up. Though, the -2 suffix implies that a regexp is needed to find temporary files. Does the following patch work? Will have to try later... some time pressure right now. An aside: in the last few weeks, I've been doing some more complex things in org/beamer with overlays and column layouts, and I have to say, the new beamer exporter makes A WHOLE LOT of sense. The outline structure reflects the structure of the beamer environments. Really clean. I like it. hjh
[O] Beamer and org-language source blocks?
Maybe there is something obvious I'm missing, but I'm having considerable trouble using org-language source code blocks in Beamer export. The objective is to show a little of the org code that made the presentation. This means including some headers. I had thought that declaring the source code block to be in org mode would cause it to ignore headings inside, but I haven't found the incantation to make it do that. I've customized org-babel-load-languages to include Org. ** What I mean and what I see #+begin_src org :exports code ** Overview *** This talk will cover: - bla bla #+end_src -- And in the output, you can see that it takes ** Overview as a new frame and treats the #+begin/end_src markers as regular text. Huh? \begin{frame}[label=sec-2-3]{What I mean and what I see} \#+begin$_{\text{src}}$ org :exports code \end{frame} \begin{frame}[label=sec-2-4]{Overview} \begin{block}{This talk will cover:} \begin{itemize} \item bla bla \end{itemize} \#+end$_{\text{src}}$ \end{block} \end{frame} I hope there's a way to do this. Or, do I have to use a screenshot from Emacs? (Screenshot? Of source code?) hjh
Re: [O] Beamer and org-language source blocks?
On Nov 1, 2013 4:35 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Blocks cannot contain headlines. You need to protect offending lines with a comma. See section 11.3 from the manual. I see it now... I was looking in the manual for info on source blocks, and didn't realize I needed to go up a conceptual level, to blocks-in-general. Thanks. hjh
[O] Fwd: ob-lilypond: pre- and post-processing of source blocks
Apologies for resending -- I sent this a few hours ago but I don't see it on gmane, or in the gnu.org archive either. Actually the manual answers question #1 -- I should be able to use the prologue header argument for that. And I can already do #2 (included just to outline the desired behavior completely). I haven't found anything in the manual explaining how to run a shell command on the output file from LilyPond execution. That's really the crucial one -- it makes no sense to embed an A4 sized image into a beamer frame... hjh -- Forwarded message -- From: James Harkins jamshar...@dewdrop-world.net Date: Nov 4, 2013 1:44 PM Subject: ob-lilypond: pre- and post-processing of source blocks To: orgmode emacs-orgmode@gnu.org Cc: I would like to be able to do the following with ob-lilypond (basic mode): 1. Wrap the source block in pre- and/or post-strings (specifically to add \header { tagline = ##f } before the music expressions). 2. Have lilypond compile the block. 3. Run convert -trim on the resulting png. (Haven't figured out how to use eps output with xelatex.) Is this at all feasible? If not, where would I stick this stuff into the orgmode source? hjh
Re: [O] Fwd: ob-lilypond: pre- and post-processing of source blocks
On Nov 4, 2013 10:08 PM, Eric Schulte schulte.e...@gmail.com wrote: Look in lisp/ob-lilypond.el. Specifically (1) would be done in `org-babel-expand-body:lilypond', and both (2) and (3) in `org-babel-execute:lilypond'. Thanks. I'm not much of a LISPer so I have no idea when I might get around to that. In the meantime, I was just advised that lilypond has a command-line switch -dpreview that should eliminate the need to run convert -trim. I'll try that first. hjh
Re: [O] Fwd: ob-lilypond: pre- and post-processing of source blocks
On Tuesday, November 5, 2013 12:24:44 PM HKT, James Harkins wrote: On Nov 4, 2013 10:08 PM, Eric Schulte schulte.e...@gmail.com wrote: Look in lisp/ob-lilypond.el. Specifically (1) would be done in `org-babel-expand-body:lilypond', and both (2) and (3) in `org-babel-execute:lilypond'. Thanks. I'm not much of a LISPer so I have no idea when I might get around to that. In the meantime, I was just advised that lilypond has a command-line switch -dpreview that should eliminate the need to run convert -trim. I'll try that first. I have managed to get this working, by adding this to .emacs (unfortunately, this is not exposed as a defcustom). (setq ly-nix-ly-path /usr/bin/lilypond -dpreview) Incidentally, it would be very useful if babel offered a header argument for commandline switches. If there is one, it was not obvious at [1] which one it should be. Then, this actually compiles and displays well enough: #+name: pitches #+begin_src lilypond -i :exports both :file pitches.png :prologue \header{tagline=##f} \include english.ly { c' e' g' fs' a' c'' ef'' d' } #+end_src Next up: I would like :prologue \header{tagline=##f} to be buffer wide. I tried this: #+PROPERTY: header-args:lilypond :prologue \header{tagline=##f} .. but it didn't work at first. [5 minutes] OK, I had to refresh the buffer setup. That wasn't obvious in the documentation. So it all seems to be working now. hjh [1] http://orgmode.org/manual/Specific-header-arguments.html#Specific-header-arguments
Re: [O] Temp files are not deleted after beamer export with source code blocks
On Tuesday, October 29, 2013 4:06:29 PM HKT, Nicolas Goaziou wrote: It should clean them up. Though, the -2 suffix implies that a regexp is needed to find temporary files. Does the following patch work? It seems not to have any effect. Here's what I did to try it: 1. cd ~/share/org-mode.git 2. git am ~/tmp/0001-ox-latex-Remove-all-temporary-files-when-compiling.patch - No git errors or conflicts here 3. make - No compilation errors 4. Quit and relaunch emacs. - I have the following in ~/.emacs, so I should be loading org from my local git directory. (add-to-list 'load-path /home/dlm/share/org-mode.git/lisp) (add-to-list 'load-path /home/dlm/share/org-mode.git/contrib/lisp t) 5. Open and export the document in question. No ***-**.vrb files were deleted. hjh
Re: [O] Temp files are not deleted after beamer export with source code blocks
On Wednesday, November 6, 2013 10:15:44 PM HKT, Nicolas Goaziou wrote: No ***-**.vrb files were deleted. Out of curiosity: in my case vrb files follow the template ***.**.vrb not ***-**.vrb. Are you sure about the hyphen? Hm, you're right -- I was sure they are hyphens, but I just looked again and they are indeed dots. As a final test, I deleted all the .vrb files manually and exported my document again. Then, after the export process finished, I refreshed a dired buffer for the directory in question: -rw-rw-r-- 1 dlm dlm 504 Nov 7 09:28 lp-slides.5.vrb -rw-rw-r-- 1 dlm dlm 667 Nov 7 09:28 lp-slides.6.vrb -rw-rw-r-- 1 dlm dlm 563 Nov 7 09:28 lp-slides.7.vrb -rw-rw-r-- 1 dlm dlm 662 Nov 7 09:28 lp-slides.8.vrb These were all created during the last export cycle, and not deleted by that cycle. hjh
Re: [O] Temp files are not deleted after beamer export with source code blocks
On Friday, November 8, 2013 12:21:21 AM HKT, Nicolas Goaziou wrote: Here's an update which should properly remove these files. Could you confirm it? Yes, working fine. Thanks. hjh