Re: [O] How to analyze clocking reports (e. g. with spreadsheet application)?
Gesendet:Sonntag, 28. April 2013 um 01:27 Uhr Von:Richard Lawrence richard.lawre...@berkeley.edu An:emacs-orgmode@gnu.org Betreff:Re: [O] How to analyze clocking reports (e. g. with spreadsheet application)? Hi Martin, Martin elwood...@web.de writes: Im using the org-mode clocking features (in org-mode 7.9.4) extensively to document how much time I spent with which task and when. I wonder how I can export the data (e. g. to MS Excel) for further analysis; * time consumed by different projects * interruptions and jumping from task to task * time consumed by tasks with a special tag etc. Have you looked at this section in the manual? I dont use many of these features myself, but I think Org itself can tell you many of these things without exporting the data to a separate tool: http://orgmode.org/org.html#The-clock-table Hi Richard, thanks for the pointer to the manual page. I had seen that, but for the beginning (as my structure of tasks, projects and tags is not very well designed yet, I need some more sophisticated way to find out how my working time is spent. (Im not yet familiar with elisp and org-tables, so the easiest way for me would be to export all data to e. g. csv andthen analyze them with MS Excel (e. g. a pivot table and maybe some self-made VBA intelligence to sort or group them...) What is great in org-mode is the hierarchichal structure of tasks and sub-tasks. The drawback is however, that as long as all hierarchies of sub-tasks are listed in the clocking table, the time is counted manyfold in the real value and in all tasks which contain that value. I wonder if anybody else already has put some thoughts in how to export and analyze those data.. Kind regards Martin
Re: [O] M-RET slow
Hi Samuel, Samuel Wales samolog...@gmail.com writes: If I run it using M-:, it is fast. If I run it using a key binding, it is a bit slow (about 1s). Then this is about `org-meta-return', not `org-insert-heading'. What is the value of `org-catch-invisible-edits' in your config? -- Bastien
Re: [O] Mobileorg- Automatic pushing and pulling
Hello Thomas, On Apr 28 2013, t...@tsdye.com (Thomas S. Dye) wrote: Aloha Feng Shu, Hmm. The links to an mobileorg FAQ here http://mobileorg.ncogni.to/support/ and here https://github.com/richard/mobileorg/wiki/frequently-asked-questions are I think https://github.com/ksexton/mobileorg/wiki/_pages is the updated link although I don't see exact answer to your question. Thanks., -- ఎందరో మహానుభావులు అందరికి వందనములు. YYR
[O] Call for volunteer -- managing the publication setup wrt orgmode.org/worg and orgmode.org
Hi all, next week, I will publish the version of Worg Jay and others have been working on. I will also try to clean up the server configuration to make it stable and to have errors reported accurately. Then it would be good to have someone in charge of this. This should not take too much time, because the goal is to let the system work automatically. But some occasional monitoring and fixing is always needed---e.g., when someone pushes a change that the server does not process correctly, etc. The person needs to be able to connect through SSH, to know Org-mode, to edit a crontab and an .emacs.el file. Let me know if someone is willing to help for this! -- Bastien
Re: [O] [BUG] New exporter exports TOC twice
Hello, Carsten Dominik carsten.domi...@gmail.com writes: I am not saying multiple tocs should not be allowed. I am all for that. However, I think that by inserting a #+TOC line, the user indicates desire for local control. Therefore, org-export-with-toc should be ignored, and, by extension, also #+OPTIONS: toc (because this is really a local way to set org-export-with-toc). The problem is that #+TOC cannot be a strict equivalent to `org-export-with-toc', since the former cannot be introduced in the document template. Also, this change would require each user back-end developer to check for the presence of a TOC keyword with headlines value in the parse tree when handling :with-toc property. This is not complicated, but there are already many uncomplicated issues to think about when writing a back-end. In a nutshell, I don't think we should try to outsmart the user by ignoring his setup here. I suggest to improve the manual, if needed, instead. Regards, -- Nicolas Goaziou
Re: [O] [RFC] Org version of the Org manual
Hello, Achim Gratz strom...@nexgo.de writes: the change in org-macro.el to use a literal replacement string is still missing in mainline Org. Is there something wrong with that patch or should I apply it? IIRC I had told you that you could apply it. If that's not the case, you can apply it anyway ;) Thanks. Regards, -- Nicolas Goaziou
Re: [O] bug in latex export?
Hello, renato renn...@gmail.com writes: this in the .org file \begin{theoremwithname}[hei] theorem \begin{align*} 2+2 \end{align*} \end{theoremwithname} gets latex-exported to this (note that after \endtheoremwithname everything is replicated with escape characters): This should be fixed. Thank you for reporting it. Regards, -- Nicolas Goaziou
Re: [O] [RFC] Org version of the Org manual
Nicolas Goaziou writes: IIRC I had told you that you could apply it. If that's not the case, you can apply it anyway ;) Done in maint and master. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables
Re: [O] [PATCH] fix appointment warn time
April, 27 at 14:02 Bastien wrote: It works great and it looks less expensive. Thank you! Great -- thanks for testing this. Still, I need to really understand what real problem it fixes... is it because some of your functions needs to check the property or is it during regular use of Org? Sorry if I missed this in one of your previous message... and thanks in advance! I am doing regular use of Org. Put the attached foo.org in your home directory. Eval the progn. Pick agenda for the day. Go to the test entry and do M-x describe-text-properties Without your patch you should see that warntime is nil. ** TPIT with Jean-Philippe at San Francisco 2013-01-19 Fri 15:00 +1w :PROPERTIES: :APPT_WARNTIME: 5 :END: (progn (setq org-agenda-files '(~/foo.org)) (org-agenda))
Re: [O] Problem in org-capture-templates
Hi Igor, Igor Sosa Mayor joseleopoldo1...@gmail.com writes: i'm experiencing since some weeks a very strange bug (maybe). I have this simple template: (setq org-capture-templates '((e email (persönlich) entry (file+headline ~/Documents/org/privat.org Emails) * TODO %^{Wem} schreiben SCHEDULED: %t :PROPERTIES: :Effort: 0:02 :END: %?))) I get asked for the pesron I want write to, but the problem is that I can not write a name with a blank space (say: `Barack Obama') because I get an error `no match'. This was working without problems for years. I have org 8.0.2 (but this happened also with the last 7.9 version). Emacs: 24.3.1. I cannot reproduce this. Does anyone can? -- Bastien
Re: [O] [PATCH] fix appointment warn time
Ivan Kanis ban...@kanis.fr writes: April, 27 at 14:02 Bastien wrote: It works great and it looks less expensive. Thank you! Great -- thanks for testing this. Still, I need to really understand what real problem it fixes... is it because some of your functions needs to check the property or is it during regular use of Org? Sorry if I missed this in one of your previous message... and thanks in advance! I am doing regular use of Org. Put the attached foo.org in your home directory. Eval the progn. Pick agenda for the day. Go to the test entry and do M-x describe-text-properties Without your patch you should see that warntime is nil. Mhh... I don't see this. The call to (org-agenda) in your (progn...) will refresh the text-properties in foo.org and C-u C-x = show the property in both the agenda and foo.org. I clearly miss something here :/ -- Bastien
Re: [O] Mobileorg- Automatic pushing and pulling
Hi Marvin, Maybe you can take a look at the last two FAQs[1] from the android-mobileorg project. Regards, Alex __ [1] https://github.com/matburt/mobileorg-android/wiki/FAQ Marvin Doyley marvin...@gmail.com writes: Hi there, Does anybody knows how to configure emacs to push and pull notes automatically. Thanks M
[O] About indentation when the src block is under a list
--text follows this line-- Here is an example: * array ** search - example #+BEGIN_SRC c /* find score in scores ,* return the index if found or -1 */ int search(int scores[], int n, int score){ int i = 0; for(; in; ++i) if(scores[i]==score) return i; return -1; } #+END_SRC point - test The indentation of the src block is OK, but it is relative to the second-level headline (**search), rather than the list - example. In this way, I can not create another list item (- test) at the point (illustrated by point) by Alt+Enter. I tried the variable org-indent-indentation-per-level, org-adapt-indentation and so on, but failed to indent the src block relative to the list item. So anyone please give me some hint.
Re: [O] Problem in org-capture-templates
Hi Bastien, Am Sun, Apr 28, 2013 at 10:49:01AM +0200, Bastien wrote: I cannot reproduce this. Does anyone can? thnaks for your answer. With 8.0.2 it still happens. How could I debug what is going on? I thought maybe is ido-mode the problem, but if i disable it, it still happens... Many thanks in advance! -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido ::::
Re: [O] How to analyze clocking reports (e. g. with spreadsheet application)?
On Sun, Apr 28, 2013 at 08:29:05AM +0200, Martin Beck wrote: thanks for the pointer to the manual page. I had seen that, but for the beginning (as my structure of tasks, projects and tags is not very well designed yet, I need some more sophisticated way to find out how my working time is spent. (I'm not yet familiar with elisp and org-tables, so the easiest way for me would be to export all data to e. g. csv and then analyze them with MS Excel (e. g. a pivot table and maybe some self-made VBA intelligence to sort or group them...) Have you looked at orgtbl-to-csv? -- Suvayu Open source is the future. It sets us free.
Re: [O] How to analyze clocking reports (e. g. with spreadsheet application)?
El sáb, 27 abr 2013, Martin decía: I'm using the org-mode clocking features (in org-mode 7.9.4) extensively to document how much time I spent with which task and when. I wonder how I can export the data (e. g. to MS Excel) for further analysis; * time consumed by different projects * interruptions and jumping from task to task * time consumed by tasks with a special tag etc. I searched the internet and this list, but I did not find any description from someone who has already done that (however I'm quite sure that I'm not the first one with this idea). Any hints on how to do it or tutorials/reports from others are welcome. Martin is possible to obtain statistics using a bash script and plot by gnuplot, an article about it in Spanish: http://www.osiux.com/visualizando-org-mode-con-gnuplot.html and a graph of each month regarding the same color for each task over a year http://www.osiux.com/img/org-task-by-day-2012.png soon publish a new article in English... recently created a public repository with some bash scripts: https://github.com/osiris/org-bash-utils -- :: Osiris Alejandro Gomez (OSiUX) os...@osiux.com.ar DC44 95D2 0D5D D544 FC1A F00F B308 A671 9237 D36C http://www.osiux.com.ar http://www.altermundi.net signature.asc Description: Digital signature
Re: [O] Call for volunteer -- managing the publication setup wrt orgmode.org/worg and orgmode.org
Hi, would this be enough ? : - Monitor the list for problems with worg several times a week - Run the export process once a week to explicitly look for problems - Contact the authors of any problematic files - Not really be able to greatly improve the exporting process itself, because of a lack of deeper exporter-knowledge :-) If yes, then I would like to be counted among the volunteers. best regards, Marc Am 28.04.2013 09:01, schrieb Bastien: Hi all, next week, I will publish the version of Worg Jay and others have been working on. I will also try to clean up the server configuration to make it stable and to have errors reported accurately. Then it would be good to have someone in charge of this. This should not take too much time, because the goal is to let the system work automatically. But some occasional monitoring and fixing is always needed---e.g., when someone pushes a change that the server does not process correctly, etc. The person needs to be able to connect through SSH, to know Org-mode, to edit a crontab and an .emacs.el file. Let me know if someone is willing to help for this!
Re: [O] :session question
Eric Schulte writes: If you mean that there should be new syntax for setting header arguments on a file or sub-tree basis w/o using file local variables, I'd be happy to apply a patch. I'm thinking that something like #+PROPERTY: header-args:R :session *R* :exports none should work. I've checked that the property interface returns the data as expected, but I haven't implemented anything yet. It does not seem to be an overly difficult endeavour, however. But importantly, there should be no way to set a default session name without also specifying the language, regardless of which way one tries to set this up. If you can think of a clean way to implement this then we should go for it. I doubt many existing configurations rely on this behavior. General settings for all languages should be effected by #+PROPERTY: header-args :results value :exports none and there'd be a list of header arguments (or specific values) that are either ignored or warned about when not associated with a particular language. BTW, I think the current property syntax for header arguments should be deprecated since it is the only place where the leading : is missing for those. Comments, thoughts? Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] About indentation when the src block is under a list
zwz zhangweize at gmail.com writes: Here is an example: * array ** search - example #+BEGIN_SRC c /* find score in scores ,* return the index if found or -1 */ int search(int scores[], int n, int score){ int i = 0; for(; in; ++i) if(scores[i]==score) return i; return -1; } #+END_SRC point - test If you want a manual fix, put point in the begin_src line then use M-right down C-c ' C-c ' that's org-metaright, next-line, org-edit-special, org-edit-src-exit HTH,
[O] [PATCH] Minor docfix
Hi, as of 8.0 org-html uses org-html-head as a prefix for everything related to the HTML head. In one line the documentation is still referring to an old variable. AFAICT setting HTML_INCLUDE_STYLE also doesn't have any effect, but I haven't really confirmed that. Cheers, Philipp diff --git a/doc/org.texi b/doc/org.texi index a4a12ef..9f830fd 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -11249,7 +11249,7 @@ Each exported file contains a compact default style that defines these classes in a basic way@footnote{This style is defined in the constant @code{org-html-style-default}, which you should not modify. To turn inclusion of these defaults off, customize -@code{org-html-head-include-default-style} or set @code{#+HTML_INCLUDE_STYLE} +@code{org-html-head-include-default-style} or set @code{#+ORG-HTML-HEAD-INCLUDE-DEFAULT-STYLE} to @code{nil} on a per-file basis.}. You may overwrite these settings, or add to them by using the variables @code{org-html-head} and @code{org-html-head-extra}. You can override the global values of these
Re: [O] [PATCH] Minor docfix
Philipp Moeller writes: as of 8.0 org-html uses org-html-head as a prefix for everything related to the HTML head. In one line the documentation is still referring to an old variable. AFAICT setting HTML_INCLUDE_STYLE also doesn't have any effect, but I haven't really confirmed that. The documentation is correct, only the variable names, but not the property name has changed (see ox-html.el in line 126). Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] worg-new-exporter successful publish locally
Dear Achim, On Sat, Apr 27, 2013 at 11:43 AM, Achim Gratz strom...@nexgo.de wrote: [snip] Thank you for looking into this. The worg-local-init.el is a great idea! Thanks, also, for confirming successful publish - that's great news. I have a question, a comment, and some information to add to my earlier message. 1. I set up worg-local-init.el as you recommended and everything goes smoothly until here: , | Publishing file /home/jay/git/worg/org-hacks.org using `org-html-publish-to-html' | Loading cc-langs... | Symbol's function definition is void: nil ` Now, I have opened org-hacks.org (with the same emacs -Q as above but without batch) and it exports successfully to HTML from the interactive dispatcher. Do you have any idea what the problem might be? 2. If I don't do batch but instead publish interactively with M-x publish-worg, the org-hacks.org error doesn't appear but then near the end I get org-publish-get-base-files: Wrong type argument: stringp, (concat worg-base org-contrib/bibtex/) I haven't had time to look deeper into this to see what's going on, but I thought you might like to know. 3. I've been working on that invalid time format problem we've been having and I think I might have identified where the problem is. I will write about it in another message. Thanks again. -- Jay
[O] [Worg] [New Exporter] invalid time specification
Hello there, I've noticed people mentioning on the list that there is a problem with Worg not publishing, something about an invalid time specification. Having been publishing Worg locally myself, I noticed that I was getting a similar error when it came time to construct the sitemap.org. My workaround at the time was to set autositemap nil in the emacs.el related to Worg, but with Achim's recent improvements to emacs.el I thought I'd try to track down what's going on. Here is what I found: If I reset autositemap t in worg-init.el (presumably the same setting as the Worg server) then near the beginning of interactive publish I get the following: , | Generating tree-style sitemap for Sitemap for project worg-pages [11 times] | org-publish-format-file-entry: Invalid time specification ` Doing `toggle-debug-on-error' yields (I'm deleting most of it) , | Debugger entered--Lisp error: (error Invalid time specification) | format-time-string(%Y-%m-%d 2010-04-24 Sat) | org-publish-format-file-entry(%t /home/jay/git/worg/org-tutorials/org-latex-export.org ` If I fix the #+DATE: in org-latex-export.org to 2010-04-24 and republish, then I don't get an error until the next file with the same problem. :-) Here are the files that generate these errors: - exporters/beamer/presentation.org [2013-03-13 Wed] - org-tutorials/non-beamer-presentations.org 2011-06-02 Thu - org-tutorials/org-google-sync.org 2011-02-28 Mon - org-tutorials/org-outside-org.org 2013-03-12 Di - org-tutorials/org-latex-export.org 2010-04-24 Sat - org-tutorials/org-meeting-tasks.org 2011-03-30 - worgmap.org 2013-04-22 Mon I have modified the dates on each of those files in the worg-new-exporter branch and am able to publish successfully even with autositemap t. I am not 100% sure that this is the same problem Worg is having, but if not then it's one heck of a coincidence. Rather than push my changes to worg-new-exporter, though, maybe this is something to be fixed somewhere else? What I mean is, the default #+DATE: inserted by `C-c C-e # default RET' is a date that looks like -YY-ZZ Foo, and that's the same kind of date which looks to be tripping up Worg. I hope this helps with tracking down the problem, -- Jay P.S. It looks like I can fix the date with even 2013-03-13 Wed, so maybe it's the which is causing the problem.
[O] Collaborating with TODO lists and clocks.
Hi all, Does anyone use org to collaborate on task lists? It seems to me that it would be very natural to put a tasks.org file into a VCS repo, claim a task by changing its status from TODO to IN_PROGRESS (and committing that change), work, then mark as DONE at the end. That's all awesome - but what if you're also using org to clock your working time? I /think/ what I want might be some way of syncing a $VCS_PATH/tasks.org with $HOME/orgs/project_1_tasks.org such that all non-clock data is synced, but clock data is ignored by the sync. That way several of us can keep our own private clock data, and share only what we care about - the data on what needs doing. Does such a thing exist? Alternatively, am I wrong about what I think I want? Is there a better workflow I should be thinking about adopting? Thanks! Gareth.
Re: [O] worg-new-exporter successful publish locally
Jay Kerns writes: 1. I set up worg-local-init.el as you recommended and everything goes smoothly until here: , | Publishing file /home/jay/git/worg/org-hacks.org using `org-html-publish-to-html' | Loading cc-langs... | Symbol's function definition is void: nil ` Yes, I get that, too. Now, I have opened org-hacks.org (with the same emacs -Q as above but without batch) and it exports successfully to HTML from the interactive dispatcher. Do you have any idea what the problem might be? Something in cc-langs that doe not work correctly in batch mode, it fails to define or select the correct fontification function for gawk. In any case, it doesn't happen when you don't export in batch mode and Emacs 23 does not have that problem, interestingly enough… 2. If I don't do batch but instead publish interactively with M-x publish-worg, the org-hacks.org error doesn't appear but then near the end I get org-publish-get-base-files: Wrong type argument: stringp, (concat worg-base org-contrib/bibtex/) I haven't had time to look deeper into this to see what's going on, but I thought you might like to know. That's a bug in my code. This is used inside a backquoted list in some places and should have a , prepended there to be evaluated when defining the list. I've fixed it on Worg. 3. I've been working on that invalid time format problem we've been having and I think I might have identified where the problem is. I will write about it in another message. Great, thanks. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] Mobileorg- Automatic pushing and pulling
Thanks for the link everybody, here is what I end up doing, i.e., I added these to my .emacs file (which worked like a charm) (add-hook 'after-init-hook 'org-mobile-pull) (add-hook 'kill-emacs-hook 'org-mobile-push) cheers M
Re: [O] Collaborating with TODO lists and clocks.
Hi Gareth, Gareth Smith gar...@totherme.org writes: Does anyone use org to collaborate on task lists? It seems to me that it would be very natural to put a tasks.org file into a VCS repo, claim a task by changing its status from TODO to IN_PROGRESS (and committing that change), work, then mark as DONE at the end. That's all awesome - but what if you're also using org to clock your working time? ... Alternatively, am I wrong about what I think I want? Is there a better workflow I should be thinking about adopting? Is there a reason you don't want any clock data to end up in the shared tasks.org? If not, one thing you could do is: 1) When claiming a task, each person uses a tag for their name (in addition to, or instead of, just changing the TODO state). Then that person owns the clock data for that task. 2) Then use the :tags option on a clock table to filter the clock data for just the tasks you personally have worked on; each person can have their own table (in tasks.org). For example, suppose you have a task like: * TODO Frobnicate something You claim it by changing that to: * IN_PROGRESS Frobnicate something :gareth: Check that in, then start your clock in this tree. Somewhere else in the file, you have a clock table like: #+BEGIN: clocktable :maxlevel 3 :scope file :tags +gareth #+CAPTION: Gareth's working time on all tasks # ... #+END: which will show you the clock data for just the tasks you've worked on (i.e., are tagged in). -- Best, Richard
Re: [O] worg-new-exporter successful publish locally
On Sun, Apr 28, 2013 at 3:12 PM, Achim Gratz strom...@nexgo.de wrote: [snip] I've fixed it on Worg. Confirmed - thanks! -- Jay
Re: [O] [PATCH] fix appointment warn time
April, 28 at 10:59 Bastien wrote: Without your patch you should see that warntime is nil. Mhh... I don't see this. The call to (org-agenda) in your (progn...) will refresh the text-properties in foo.org and C-u C-x = show the property in both the agenda and foo.org. I clearly miss something here :/ I tried it again on a more recent emacs (bzr from two weeks ago). Same result. Are you sure you removed your patch? :D I have attached a screen shot. attachment: org-bug.png
Re: [O] [Worg] [New Exporter] invalid time specification
Jay Kerns writes: Doing `toggle-debug-on-error' yields (I'm deleting most of it) , | Debugger entered--Lisp error: (error Invalid time specification) | format-time-string(%Y-%m-%d 2010-04-24 Sat) | org-publish-format-file-entry(%t Uh-oh. That function should never get an uninterpreted value from #+DATE, it really wants a proper time value (a list, not a string). The question is how it gets there, since emacs -batch -Q -l worgtest-local-init.el -l worgtest-init.el worgmap.org -l org-publish \ --eval '(message (format-time-string %Y-%m-%d (org-publish-find-date (buffer-file-name' 2013-04-22 yields the correct value. Also, the calling function doesn't appear to be asking for a date value at all. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] worg-new-exporter successful publish locally
Achim Gratz writes: Something in cc-langs that doe not work correctly in batch mode, it fails to define or select the correct fontification function for gawk. In any case, it doesn't happen when you don't export in batch mode and Emacs 23 does not have that problem, interestingly enough… I've fixed this, not that I would know exactly how… :-) Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Waldorf MIDI Implementation additional documentation: http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
Re: [O] worg-new-exporter successful publish locally
On Sun, Apr 28, 2013 at 4:21 PM, Achim Gratz strom...@nexgo.de wrote: Achim Gratz writes: I've fixed this, not that I would know exactly how… :-) Confirmed again, and thanks again! I'm really starting to warm up to this batch publishing approach, it's quite handy. -- Jay
Re: [O] [PATCH] export to various flavors of (X)HTML
Rick Frankel r...@rickster.com writes: On Fri, Apr 26, 2013 at 10:14:17AM -0700, Eric Abrahamsen wrote: Rick Frankel r...@rickster.com writes: Therefore, `org-html-close-tag' should check that the doctype is not a flavor of html4 rather than a flavor of xhtml. An alternative would be to add (xhtml5 . !DOCTYPE html) to the doctype alist, and the appropriate testing for being html5 and xhtml. See the discussions of polyglot markup @ http://en.wikipedia.org/wiki/Polyglot_markup and http://www.w3.org/TR/2011/WD-html-polyglot-20110405/#dfn-polyglot-markup for the rationale. Ah, those were interesting links, I hadn't considered those issues. Luckily, your second option was a three-line change to the existing patch: using xhtml5 now produces the same output as html5, except that self-closing tags are self-closed, and there's a xmlns declaration in the html element. Best of all worlds, I hope. Brilliant! I will apply the patch and try it later this weekend... So here's the fun part -- using the new bits of HTML5. The attached patch builds on the last one (and corrects a couple of documentation formatting errors), and touches on the following: 1. There's a new export option, org-html-html5-fancy/HTML_HTML5_FANCY, which defaults to 'nil, making most of the following opt-in only. 2. The meat of the change is in `org-html-special-block'. If it comes across a special block #+BEGIN_FOO where foo is a member of `org-html-html5-elements', it will format it as foo rather than div class=foo. So #+BEGIN_ASIDE will create an aside element. Attributes are now parsed (this change applies to all HTML flavors), so this: #+ATTR_HTML :controls controls :width 350 #+BEGIN_VIDEO #+HTML: source src=movie.mp4 type=video/mp4 #+END_VIDEO becomes: video controls=controls width=350 source src=movie.mp4 type=video/mp4 /video 3. Standalone images are formatted as figure with figcaption. 4. Things like timestamps could be expressed as time elements, but I haven't done that here. The relevant attributes still seem to be up in the air, and it would be complicated. 5. It's generally accepted that one should use some variety of the html5shiv[1] to make IE 9 render new HTML5 elements correctly. I've dropped a note to this effect in the docstring of `org-html-html5-fancy', but I suppose it's possible we could take a more interventionist stance, perhaps including hosting a version of the shiv on orgmode.org, and linking to it automatically. I guess I'm in favor of leaving it to the user, though. Tangential coding question: I've noticed that setting HTML_HTML5_FANCY to nil at the top of the export file results in `(plist-get info :html-html5-fancy)' returning the string nil, ie true. Not right, obviously, and it makes it impossible to set it to 'nil per-file if the global value is 't. Am I handling this wrong? EFrom 636720ca8444a4767a44170b6ed29cf471f1aee7 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen e...@ericabrahamsen.net Date: Sun, 28 Apr 2013 23:00:26 -0700 Subject: [PATCH 10/10] ox-html.el: Give access to new elements in HTML5 * lisp/ox-html.el (org-html-html5-fancy): New variable, determining whether or not to use new elements. (org-html-html5-elements): New variable, new HTML5 elements. (org-html-special-block): Export special blocks to new HTML5 elements. (org-html-format-inline-image): Use figure and figcaption for standalone images. * doc/org.texi: Document the above. --- doc/org.texi| 64 - lisp/ox-html.el | 61 -- 2 files changed, 114 insertions(+), 11 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 40f5216..ad438f4 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -11007,11 +11007,11 @@ Export to a temporary buffer. Do not create a file. Org can export to various (X)HTML flavors. -Setting the variable @var{org-html-doctype} allows you to export to different -(X)HTML variants. The exported HTML will be adjusted according to the sytax -requirements of that variant. You can either set this variable to a doctype +Setting the variable @code{org-html-doctype} allows you to export to different +(X)HTML variants. The exported HTML will be adjusted according to the sytax +requirements of that variant. You can either set this variable to a doctype string directly, in which case the exporter will try to adjust the syntax -automatically, or you can use a ready-made doctype. The ready-made options +automatically, or you can use a ready-made doctype. The ready-made options are: @itemize @@ -11035,7 +11035,61 @@ are: ``xhtml5'' @end itemize -See the variable @var{org-html-doctype-alist} for details. The default is ``xhtml-strict''. +See the variable @code{org-html-doctype-alist} for details. The default is