Re: [O] Org-toggle-checkbox broken in 7.5?
"Wikström, Gustav" writes: > The command C-c C-x C-b has stopped working for me and I quietly blame > 7.5 for it. Anyone who can attest or reject this statement? I can't do either or both since you don't tell what exactly isn't working, but there had been extensive changes to the list stuff before the 7.5 release and there have been fixes and enhancements to it after that release. At least one of those fixes involved the toggle boxes (it had to do with drawers IIRC), so maybe you should try the newest version of org and see if that fixes your problem. Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] Literate Programming - Continue a Source Block?
Eric Schulte writes: > Hi Neeum, > > Thanks for your feedback. Your point is well taken about the > flexibility of header arguments, and the ability of a header argument > based solution to overwrite blocks. > > I would mention that variables such as the newly introduced > `org-babel-tangle-named-block-combination' may be easily set on a > per-file bases using file local variables---basically adding a line like > the following to the top of your Org-mode file. Somehow I couldn't get your new function to work. The variable is set to append, and I removed all org-modes from my system except the latest from git. I even ensured that this code gets executed: (append (mapconcat #'identity named "\n")) However, the output I get is the same as before - it just uses the first source block. Incidentally, why do we need "\n" as a separator? What if I wanted to do (in Python) def func(a, b, <>): stuff In other words, I want to add more arguments later on. Wouldn't a \n mess things up here? Thanks.
Re: [O] custom IDs not exported
Daniel Clemente wrote: > > Commit 438536f6157794101ce0957e39cad6bf70580751 (=E2=80=9EChange undersco= > res to hyphens in section labels=E2=80=9C) broke the export of CUSTOM_IDs. > > Take for instance this file: > > --- > #+TITLE: Cosas por hacer > > * Programas > :PROPERTIES: > :CUSTOM_ID: programas > :END: > > ** emacs >:PROPERTIES: >:CUSTOM_ID: emacs >:END: > Editor de textos > > > > > When exporting (C-c C-e H) you get this table of contents: > > > > > 1 Programas > > 1.1 emacs > > > > > > - > > The first one is correct because it is first-level. All non-first-level g= > et #sec-NUMBERS instead of the custom ID. > > Not only the table of contents; the header's ID is also wrong: > ction-number-3">1.1 emacs > > > Tested with current org-mode.=20 > I was afraid that other exporters might break because of this. Apologies for the inconvenience. And, btw, thanks for the test case. I have a minimal patch that I think fixes this problem, but there are other underscores used in various places in org-html.el so there might be additional problems. I'd appreciate it if you (and/or others) test it and report not only on this problem but on any other problems you find. Thanks, Nick diff --git a/lisp/org-html.el b/lisp/org-html.el index afc6a77..b5d371f 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1395,7 +1395,7 @@ lang=\"%s\" xml:lang=\"%s\"> (setq txt (replace-match "" t t txt))) (setq href (replace-regexp-in-string - "\\." "_" (format "sec-%s" snumber))) + "\\." "-" (format "sec-%s" snumber))) (setq href (org-solidify-link-text (or (cdr (assoc href org-export-preferred-target-alist)) href))) (push (format @@ -2412,7 +2412,7 @@ When TITLE is nil, just close all open levels." (insert "\n" title "\n" (aset org-levels-open (1- level) t) (setq snumber (org-section-number level) - snu (replace-regexp-in-string "\\." "_" snumber)) + snu (replace-regexp-in-string "\\." "-" snumber)) (setq level (+ level org-export-html-toplevel-hlevel -1)) (if (and num (not body-only)) (setq title (concat
[O] [babel] variable org-babel-function-def-export-keyword not respected?
Hello, At some point in the distant org past, I seem to recall that named source code blocks were exported with their names in tact. Now (latest git pull, Org-mode version 7.5 (release_7.5.367.gc4737)) the code is only exported, and not the name of the block. For example, export the following to HTML. * a block here's a named block #+source: rand(n) #+begin_src R runif(n) #+end_src") This seems in conflict with the doc-string for the following variable. (defvar org-babel-function-def-export-keyword "function" "The keyword to substitute for the source name line on export. When exporting a source block function, this keyword will appear in the exported version in the place of source name line. A source block is considered to be a source block function if the source name is present and is followed by a parenthesized argument list. The parentheses may be empty or contain whitespace. An example is the following which generates n random \(uniform) numbers. #+source: rand(n) #+begin_src R runif(n) #+end_src") Am I interpreting this correctly? Thanks! --e
Re: [O] "No definition for class" error in export to latex
On Jun 11, 2011, at 4:37 PM, Nick Dokos wrote: > Levy, Roger wrote: > >> and no .tex file output. From within Aquamacs, I don't get this error, pre= >> sumably because I have the following in my .emacs file: >> >> (add-to-list 'org-export-latex-classes >> '("apa" >> "\\documentclass{apa} >> [NO-DEFAULT-PACKAGES] >> \\usepackage{graphicx} >> \\usepackage{apacite}" >> ("\\section{%s}" . "\\section*{%s}") >> ("\\subsection{%s}" . "\\subsection*{%s}") >> ("\\subsubsection{%s}" . "\\subsubsection*{%s}") >> )) >> >> How can I make this modification of org-export-latex-classes from the comma= >> nd line? I have tried putting the above content in a file ("$HOME/tmp/add.= >> el") and making the call >> >> /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ >>--load $HOME/tmp/add.el \ >>--visit=3Dtest-file.org \ >>--funcall org-export-as-latex-batch >> >> but this gives me the error >> >> Symbol's value as variable is void: org-export-latex-classes >> >> I would be very grateful for any suggestions! This is GNU Emacs 23.3.1 (Aq= >> uamacs 2.2) and Org mode 7.5. > > You should add to add.el some more initialization: you probably need to > set the load-path and require the org-latex package - something like > this, but you should more or less mimic the way you initialize org mode > in your .emacs: > > --8<---cut here---start->8--- > (add-to-list 'load-path (expand-file-name "~/src/emacs/org/org-mode/lisp")) > ;maybe > (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . > org-mode)) > (require 'org-install) ; maybe > > (require 'org-latex) > ...apa stuff from above... > --8<---cut here---end--->8--- > > Remember: -batch implies -q so your .emacs file is completely ignored: > you have to do any initialization you need in the add.el file. Many thanks, Nick. I have managed to get things to work with the following add.el file contents: --8<---cut here---start->8--- (setq load-path (cons "/Users/rlevy/tmp/org-7.5/contrib/lisp" load-path)) (setq load-path (cons "/Users/rlevy/tmp/org-7.5/lisp" load-path)) (require 'org-install) (require 'org-latex) (require 'org-exp-bibtex) (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (add-to-list 'org-export-latex-classes '("apa" "\\documentclass{apa} [NO-DEFAULT-PACKAGES] \\usepackage{graphicx} \\usepackage{apacite}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") )) --8<---cut here---start->8--- Probably some of that may be unnecessary too, but (require 'org-latex) was definitely needed. > >> Incidentally, trying to export to HTML with >> >> /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ >>--visit=3Dtest-file.org \ >>--funcall org-export-as-html-batch >> >> complains differently:=20 >> >> OVERVIEW >> Exporting... >> File mode specification error: (file-error "Cannot open load file" "html-he= >> lper-mode") >> Exporting... >> Exporting... >> File mode specification error: (file-error "Cannot open load file" "html-he= >> lper-mode") > > I don't know who tries to load html-helper-mode but that's not even > present in my setup. > >> Saving file /tmp/test-file.html... >> Wrote /tmp/test-file.html >> HTML export done, pushed to kill ring and clipboard >> >> but it actually does produce a sensible html file. >> > > Probably because the autoload for org-export-as-html-batch is > in the default path of your emacs. OK -- I will not worry about this for now. Thanks again. Best Roger
Re: [O] "No definition for class" error in export to latex
Levy, Roger wrote: > and no .tex file output. From within Aquamacs, I don't get this error, pre= > sumably because I have the following in my .emacs file: > > (add-to-list 'org-export-latex-classes >'("apa" > "\\documentclass{apa} >[NO-DEFAULT-PACKAGES] >\\usepackage{graphicx} >\\usepackage{apacite}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > )) > > How can I make this modification of org-export-latex-classes from the comma= > nd line? I have tried putting the above content in a file ("$HOME/tmp/add.= > el") and making the call > > /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ > --load $HOME/tmp/add.el \ > --visit=3Dtest-file.org \ > --funcall org-export-as-latex-batch > > but this gives me the error > > Symbol's value as variable is void: org-export-latex-classes > > I would be very grateful for any suggestions! This is GNU Emacs 23.3.1 (Aq= > uamacs 2.2) and Org mode 7.5. You should add to add.el some more initialization: you probably need to set the load-path and require the org-latex package - something like this, but you should more or less mimic the way you initialize org mode in your .emacs: --8<---cut here---start->8--- (add-to-list 'load-path (expand-file-name "~/src/emacs/org/org-mode/lisp")) ;maybe (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) (require 'org-install) ; maybe (require 'org-latex) ...apa stuff from above... --8<---cut here---end--->8--- Remember: -batch implies -q so your .emacs file is completely ignored: you have to do any initialization you need in the add.el file. > Incidentally, trying to export to HTML with > > /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ > --visit=3Dtest-file.org \ > --funcall org-export-as-html-batch > > complains differently:=20 > > OVERVIEW > Exporting... > File mode specification error: (file-error "Cannot open load file" "html-he= > lper-mode") > Exporting... > Exporting... > File mode specification error: (file-error "Cannot open load file" "html-he= > lper-mode") I don't know who tries to load html-helper-mode but that's not even present in my setup. > Saving file /tmp/test-file.html... > Wrote /tmp/test-file.html > HTML export done, pushed to kill ring and clipboard > > but it actually does produce a sensible html file. > Probably because the autoload for org-export-as-html-batch is in the default path of your emacs. Nick
Re: [O] Audio/video file playback in org mode
I'll jump in and mention a solution to an at least similar problem I hacked, albeit incompletely, some time ago. I baldly stole code from "dired-mplayer" at http://www.emacswiki.org/cgi-bin/wiki/EMMS#toc10 , and have been using the result, "dired-vlc" ever since. The main point of this was to play videos asynchronously, so I could continue editing, taking notes using the relative timer of org-mode. Two more things would make this process work better, at least for me: 1. write a few lines into this that would open another buffer, possibly through capture, starting the relative timer automagically. 2. figure out how to pause the video and the timer simultaneously. Here is the code to dired-vlc. I am not interested in making this work for windows, have no idea whether it would, or how to make it do so. #+BEGIN_EXAMPLE ;; -*- mode: elisp -*- ;; Time-stamp: <2009-01-13 14:27:47 orm> ;; AED 05 January 2009 ; (require 'org) (defvar dired-vlc-program "/usr/bin/vlc") (defun dired-vlc (&optional timer) "Asynchronously start vlc on file through dired. If an optional argument is given (C-u), the org relative timer is started. This function purports to start vlc in rc mode, to leave open the possibility of remote control." (interactive "P") (let ((file (expand-file-name (dired-get-filename))) ext files basename dir curr-file ;idx-file sub-file srt-file command options) (setq basename (file-name-nondirectory (file-name-sans-extension file))) (setq dir (file-name-directory file)) (setq files (directory-files dir t basename)) (delete file files) (setq command (format "\"%s\" \"%s" dired-vlc-program "--intf rc")) (if (y-or-n-p (format "Run command %s?" command)) (start-process "junk" nil dired-vlc-program file))) (if (equal timer '(4)) (org-timer-start)) ) ;; end dired-vlc.el #+END_EXAMPLE I am interested in what you are doing, also, and I will try it out in a month or two, after I retire and relocate. Alan Davis On Sun, Jun 12, 2011 at 12:00 AM, Memnon Anon < gegendosenflei...@googlemail.com> wrote: > Paul Sexton writes: > > > brian powell gmail.com> writes: > > > > > >> * Something like this; respectively!?: > >> > >> [[shell:mplayer -ss 00:03:21 -endpos 00:06:54 ~/some_podcast.mp3 &]] > >> [[shell:mplayer -ss 00:03:21 ~/some_podcast.mp3 &]] > >> [[shell:mplayer ~/some_podcast.mp3 &]] > > > > The troubles with using shell commands in hyperlinks: > > 1. Only works in the operating system and directory structure where > >you were when you wrote the link; > > 2. No ability to stop playback, pause, etc, unless you run the > >program as a GUI, which means (horror!) doing something outside > >Emacs. > > If you are using different setups on different operating systems, 1) > should probably be solved in some general fashion, like setting some > vars to important locations depending on environmentearly in your .emacs. > > 2.) >[[elisp:(emms-play-file "~/tmp/video/magit.flv")]] > or >[[elisp:(emms-play-file (concat MYSCREENCASTSDIR "magit.flv"))]] > or > [[elisp:(emms-play-file (concat MYSCREENCASTSDIR "magit.flv"))][View magit > demo]] > > Of course, there is no problem with setting up org to treat file links to > mediafiles special. But given the power of org hyperlinks, I think using > "elisp:" solves your 1.) and 2.) sufficiently. > > Memnon > > >
[O] custom IDs not exported
Commit 438536f6157794101ce0957e39cad6bf70580751 („Change underscores to hyphens in section labels“) broke the export of CUSTOM_IDs. Take for instance this file: --- #+TITLE: Cosas por hacer * Programas :PROPERTIES: :CUSTOM_ID: programas :END: ** emacs :PROPERTIES: :CUSTOM_ID: emacs :END: Editor de textos When exporting (C-c C-e H) you get this table of contents: 1 Programas 1.1 emacs - The first one is correct because it is first-level. All non-first-level get #sec-NUMBERS instead of the custom ID. Not only the table of contents; the header's ID is also wrong: 1.1 emacs Tested with current org-mode. Greetings, Daniel
Re: [O] PATCH: New options for latex src code export
Bastien writes: > Hi Dan, > > Dan Davison writes: > >> My questions are >> >> 1. It would be nice if users didn't have to worry about step 4. Can >>anyone suggest a sensible way to have the "-shell-escape" option >>passed to pdflatex under the appropriate circumstances? These >>conditions include: >>1. minted is being used for export >>2. pdflatex is being used, a.o.t. e.g. rubber or some other latex >> make tool. > > A bit hackish, but maybe the attached patch would do? This patch has been applied. So now with the pygments package installed [1] (providing the `pygmentize` executable), minted pdf export of source code requires only #+begin_src emacs-lisp (require 'org-latex) (setq org-export-latex-listings 'minted) (add-to-list 'org-export-latex-packages-alist '("" "minted")) #+end_src Dan Footnotes: [1] - linux :: apt-get install python-pygments - OSX / linux :: 'pip install pygments' or 'easy_install pygments' > > diff --git a/lisp/org-latex.el b/lisp/org-latex.el > index c558043..f9b2c1c 100644 > --- a/lisp/org-latex.el > +++ b/lisp/org-latex.el > @@ -984,7 +984,13 @@ when PUB-DIR is set, use this as the publishing > directory." >(file (buffer-file-name lbuf)) >(base (file-name-sans-extension (buffer-file-name lbuf))) >(pdffile (concat base ".pdf")) > - (cmds org-latex-to-pdf-process) > + (cmds (if (eq org-export-latex-listings 'minted) > +;; automatically add -shell-escape when needed > +(mapcar (lambda (cmd) > + (replace-regexp-in-string > + "pdflatex " "pdflatex -shell-escape" cmd)) > +org-latex-to-pdf-process) > + org-latex-to-pdf-process)) >(outbuf (get-buffer-create "*Org PDF LaTeX Output*")) >(bibtex-p (with-current-buffer lbuf >(save-excursion
[O] "No definition for class" error in export to latex
Hi, I am an org-mode newbie and trying to learn how to export to latex and html from the command line, and have encountered a difficulty when I include a custom class in the latex header. Here's a sample file ("test-file.org") I'm using: *** #+TITLE: Test #+LaTeX_CLASS: apa file contents *** and here is the command I'm using: /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ --visit=test-file.org \ --funcall org-export-as-latex-batch which gives me the output OVERVIEW Exporting to LaTeX... No definition for class `apa' in `org-export-latex-classes' and no .tex file output. From within Aquamacs, I don't get this error, presumably because I have the following in my .emacs file: (add-to-list 'org-export-latex-classes '("apa" "\\documentclass{apa} [NO-DEFAULT-PACKAGES] \\usepackage{graphicx} \\usepackage{apacite}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") )) How can I make this modification of org-export-latex-classes from the command line? I have tried putting the above content in a file ("$HOME/tmp/add.el") and making the call /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ --load $HOME/tmp/add.el \ --visit=test-file.org \ --funcall org-export-as-latex-batch but this gives me the error Symbol's value as variable is void: org-export-latex-classes I would be very grateful for any suggestions! This is GNU Emacs 23.3.1 (Aquamacs 2.2) and Org mode 7.5. Incidentally, trying to export to HTML with /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \ --visit=test-file.org \ --funcall org-export-as-html-batch complains differently: OVERVIEW Exporting... File mode specification error: (file-error "Cannot open load file" "html-helper-mode") Exporting... Exporting... File mode specification error: (file-error "Cannot open load file" "html-helper-mode") Saving file /tmp/test-file.html... Wrote /tmp/test-file.html HTML export done, pushed to kill ring and clipboard but it actually does produce a sensible html file. Many thanks in advance for patience with my newbie question. Best Roger
Re: [O] Literate Programming - Continue a Source Block?
Hi Neeum, Thanks for your feedback. Your point is well taken about the flexibility of header arguments, and the ability of a header argument based solution to overwrite blocks. I would mention that variables such as the newly introduced `org-babel-tangle-named-block-combination' may be easily set on a per-file bases using file local variables---basically adding a line like the following to the top of your Org-mode file. # -*- org-babel-tangle-named-block-combination:append -*- While there is no way to specify this on the block level, I would tend to think that specifications such as ":tangle no" or simply renaming the block would suffice in most cases. This still does not address the subtree level. I think that a general solution for setting variable values at the subtree level might be widely useful and could be something worth pursuing Org-wide. Moving forward from here, my proposal would be that we all try out the current support using noweb references and the new named-block behavior and discover experientially if and what new features would be desirable. On a related note I hereby declare that the newly implemented named-block behavior should be considered experimental, and support for it may be removed if a better solution presents itself. Cheers -- Eric Neeum Zawan writes: > Eric Schulte writes: I like the concision of the "=original-name" syntax used by noweb, but I would lean towards the use of a ":noweb-append" type header argument as suggested above because currently the names of blocks in Babel carry no semantic content and I'd prefer to leave it this way. >>> >>> I suppose it may also break compatibility in case someone out there >>> uses >>> the =symbol. >>> >>> Had it been thought of earlier, I would have preferred the default >>> behavior being append if you have multiple blocks of the same name, >>> and an explicit option *not* to append but to overwrite, but your >>> idea makes the most sense with respect to preserving backward >>> compatibility. >>> >>> In addition to append, there probably should be another option for >>> overwriting instead of appending (neither is possible right now). >>> >> >> I've just pushed up a patch which implements optional block >> combination during tangling. Specifically a new customization >> variable named `org-babel-tangle-named-block-combination' is >> introduced which can take the following values > > This does solve the problems I have, but I think the noweb-append header > option discussed earlier is much more flexible. The potential problems > with a custom variable is that it can't be set at a per-buffer or > per-document level. I was thinking along the lines of: > > :noweb-append option > > where option is one of: > > - nil (the default) > > - append (appends to the block of the same name as it is up to that > point in the document - acts as nil if this is the first block of that > name). > > - overwrite (overwrites the block as it is up to that point - acts as > nil if this is the first block). > > I think these three provide all the abilities of what you proposed, but > allows for much more. Some additional benefits: > > 1. Can be set at a per-buffer level or a per-block level. > > 2. Can selectively append/overwrite. One scenario where this would be >useful is where you may have had some source blocks that had been >appended, but then later on as the project evolves, you decide to >rewrite much of that code. You can then just do an overwrite >(i.e. erases all that you had up to that point), and then again allow >for the new code to be evolved with possible future appends (so >multiple appends/overwrites in one document). You may have reason to >keep the old code in the document for some reason or other. If that >didn't make sense I can explain in more detail. > >> Hopefully this gets at the behavior you're after. I'd be interested >> to hear any thought you have on this new functionality. > > I don't want to make it sound like I'm complaining above. What you've > proposed probably takes care of my current needs (and I imagine is a > bit easier to code than what I've proposed) - but I just think having > a new header for the source block would make it much more flexible. > > I haven't yet tried the new patch - I'll have to figure out how to do a > custom babel install (at the moment I get it via orgmode which is > installed system-wide). Is it possible for me to just install babel in > my custom emacs directory and not have it impact other aspects of > org-mode? > > Thanks for the quick commit! -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Org-toggle-checkbox broken in 7.5?
Wikström, Gustav wrote: > Hello! > > The command C-c C-x C-b has stopped working for me and I quietly blame 7.5 > for it. Anyone who can > attest or reject this statement? > Works here: Org-mode version 7.5 (baseline.273.g889a48) Before blaming org, please do your due diligence: Execute the function by hand, with M-x org-toggle-checkbox RET, and *report the results*: "it does not work" is just not specific enough, because it depends on your expectations which may or may not match reality. If it does nothing, then say so explicitly. Is the key still bound to the correct function? C-h c C-c C-x C-b will tell you whether the key is still bound to what it is supposed to be bound to (org-toggle-checkbox in this case). If not, then you are probably using some minor mode that hijacks the key. Check the mode line for what minor modes you are running, eliminate them one by one and see if you can get the functionality back. If this doesn't resolve it, next start up emacs without your customizations, just a minimal .emacs file that initializes org-mode, visit the file and do the things above again. I keep a very short minimal.emacs file for exactly this purpose, start up emacs with emacs -q -l ~/minimal.emacs and try to reproduce the problem. In 99% of problems, these are enough to identify the culprit. If you feel a bit adventurous and have the time, you can learn a bit about debugging (see section 18.2, "Edebug", of the Elisp manual) and trace the execution of the function. If you don't know elisp, you may feel somewhat apprehensive about this, but it's a good way to dig deeper into emacs. Nick
Re: [O] Status google calendar sync
Philipp Haselwarter wrote: > Unfortunately, both the awk script and the org-export-icalendar seem to > have quite a hard time with repeating entries. > ical2org does not honor RRULE at all, the export has some very basic and > very fragile support, but anything like > <%%(org-diary-class 16 02 2011 18 05 2011 3)> > or > SCHEDULED: <2011-02-20 Sun +1w -2d> > already fails it. > > I think this is an important topic, especially wrt mobile devices. > Better interoperability with other calendering systems would greatly > benefit the org user experience. > I agree - I have been thinking (unfortunately mostly only thinking) about it and it seems to me that many of the pieces are there, but there is a non-trivial amount of work to do this and do it right: o icalendar.el should be the basis of this, but unfortunately, it is too closely tied to the diary (and is incomplete or buggy in various ways). o It should be refactored to convert between an iCalendar file and a generic in-memory representation of a calendar: basically an attributed tree where the root is the VCALENDAR element, with VEVENTs, VTODOs, VALARMs etc. i.e. all the other elements underneath, each decorated with the various parameters that apply to it. The representation should make it easy to do the next step. o Converters between the generic in-memory representation and various other formats (diary, org) are then needed. o The refactoring of the original icalendar.el will essentially do this for a diary representation. An org converter along these lines can then be fairly easily written I think. o These converters are ripe for what Kernighan and Plauger call a "left-corner" development approach: just bite the smallest useful subset and add features as needed, deliberately and carefully. Both the current implementation of org-icalendar and Eric F.'s awk script would be useful in this respect: they basically cover the basic functionality needed (but perhaps not completely, as Philipp points out). I've been working on this along these lines, but time constraints have made progress almost imperceptibly slow. BTW, the reason I've become interested in this is that recently I started being bombarded with meeting invitations generated from (what else?) M$ Outlook. My former method of adding the invitations to my Org appointment book by hand is just not sufficient any longer. So I have mercilessly hacked icalendar.el to invoke an org-capture with the details, so I can just look it over and file it quickly. At the other end, I modify the mh-e show hook to scan the message for text/calendar attachments and kick off the icalendar stuff. But it's not working very well yet, the hacked icalendar implementation is ugly (think Medusa- turns-you-to-stone-if-you-look-at-it-ugly) and there are bugs (the most serious of which is the icalendar timezone stuff that I referred to in a recent thread). I'm trying to fixg the bugs and am working on the back-end usability stuff in order to survive the onslaught - but the icalendar stuff in the middle is likely to remain unspeakably ugly in the foreseeable future - I just have no time for it. So if anybody is interested, I hope this is useful as a starting point. Nick
[O] MobileOrg Android
I just joined the 21st century and got a smart phone. I downloaded the MobileOrg for Android application, and have some questions, most of them are probably dumb, because I have only played with the phone for a bit. 1) Is there documentation regarding the various setups/syncing modes? I would like to know how to get data off my phone, put .org files on my phone. I know how to use Dropsend, etc, but I would probably rather just use rsync or git to sync the phone's data. 2) The menu for MobileOrg Android has an "Outline" button, but it doesn't do anything. 3) In "Configure Synchronization Settings" there's a setting where you specify where index.org is. What do I put in there? Is this setting affected by the other Synchronization settings? 4) What does "Sync" actually mean? Is it like rsync where it copies the latest file, or does it attempt a merge? What happens if you have new stuff in each file? Does DropSend asking you which one you want, or provide a diff tool? As you can see, I'm very new to Android and have no idea what I'm doing :-) I do plan (within the next few months) to start learning how to develop on Android platform, and I think that Mobile Org Android would be a good "Scratch your own itch" program to start with. I'd be more than willing to start a FAQ on the Github Wiki with any answers that I get from this post. Thanks, --Nate
Re: [O] Status google calendar sync
> When going from org -> google, do I need to do anything about using > org-icalendar-store-UID? I'd rather not have to populate my org files > with :ID: entries. You do not strictly need to, but this is the only way you do not create double events when exporting an org file to .ics and importing it into google calendar. If you do use them, a change in a date in org-mode will be reflected as such in google calendar. Note that if you /do/ want to store uids for the reason I just wrote, /and/ if you use diary sexps, you'll need an up-to-date Emacs (from bazaar) and below patch to org-icalendar.el (this has not been applied yet to org-mode, alas). Otherwise icalendar.el creates a new uid every time you export anyway. --- a/lisp/org-icalendar.el +++ b/lisp/org-icalendar.el @@ -412,7 +412,10 @@ When COMBINE is non nil, add the category to each line." (if scheduledp (setq summary (concat "S: " summary))) (if (string-match "\\`<%%" ts) (with-current-buffer sexp-buffer - (insert (substring ts 1 -1) " " summary "\n")) + (let ((entry (substring ts 1 -1))) + (put-text-property 0 1 'uid +(concat " " prefix uid) entry) + (insert entry " " summary "\n"))) (princ (format "BEGIN:VEVENT UID: %s %s -- http://pft.github.com
Re: [O] Org-toggle-checkbox broken in 7.5?
"Wikström, Gustav" writes: > The command C-c C-x C-b has stopped working for me and I quietly blame > 7.5 for it. Anyone who can attest or reject this statement? Mhh, I am on , | ELISP> (emacs-version) | "GNU Emacs 23.3.1 (i486-pc-linux-gnu, GTK+ Version 2.24.3) | of 2011-04-10 on raven, modified by Debian" | ELISP> (org-version) | "Org-mode version 7.5" ` i.e. current stable released "2011-03-07 Iun. Release 7.5.". Of course, I can not reject the statement that it "has stopped working for" you, but it works here. What version did you use before it stopped working? Did anything else change in your setup? I guess you are not using the development version, i.e. git or one of the snapshots (http://orgmode.org/org-latest.tar.gz or org-latest.zip)?! Memnon
[O] Org-toggle-checkbox broken in 7.5?
Hello! The command C-c C-x C-b has stopped working for me and I quietly blame 7.5 for it. Anyone who can attest or reject this statement? Best regards Gustav
Re: [O] Audio/video file playback in org mode
Paul Sexton writes: > brian powell gmail.com> writes: > > >> * Something like this; respectively!?: >> >> [[shell:mplayer -ss 00:03:21 -endpos 00:06:54 ~/some_podcast.mp3 &]] >> [[shell:mplayer -ss 00:03:21 ~/some_podcast.mp3 &]] >> [[shell:mplayer ~/some_podcast.mp3 &]] > > The troubles with using shell commands in hyperlinks: > 1. Only works in the operating system and directory structure where >you were when you wrote the link; > 2. No ability to stop playback, pause, etc, unless you run the >program as a GUI, which means (horror!) doing something outside >Emacs. If you are using different setups on different operating systems, 1) should probably be solved in some general fashion, like setting some vars to important locations depending on environmentearly in your .emacs. 2.) [[elisp:(emms-play-file "~/tmp/video/magit.flv")]] or [[elisp:(emms-play-file (concat MYSCREENCASTSDIR "magit.flv"))]] or [[elisp:(emms-play-file (concat MYSCREENCASTSDIR "magit.flv"))][View magit demo]] Of course, there is no problem with setting up org to treat file links to mediafiles special. But given the power of org hyperlinks, I think using "elisp:" solves your 1.) and 2.) sufficiently. Memnon
Re: [O] Status google calendar sync
Unfortunately, both the awk script and the org-export-icalendar seem to have quite a hard time with repeating entries. ical2org does not honor RRULE at all, the export has some very basic and very fragile support, but anything like <%%(org-diary-class 16 02 2011 18 05 2011 3)> or SCHEDULED: <2011-02-20 Sun +1w -2d> already fails it. I think this is an important topic, especially wrt mobile devices. Better interoperability with other calendering systems would greatly benefit the org user experience. -- Philipp Haselwarter
[O] Bug: org-agenda-custom-commands bugs [7.5]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. 1. first open org-agenda use `F12' key, command (org-agenda) 2. open customize todo-list use `t' key 3. move point on certain heading, press `RET',open remote org files. (org-agenda-switch-to) 4. edit context,and save,use f2 kill this org buffer. (kill-this-buffer) 5. return previous org-agenda-view,move my point on other heading,minibuffer show a error tips "Wrong type argument: stringp,nil",if reenter remote org file, unpredictable happen. 6. unless retype 'g' key,otherwise can not work. Emacs : GNU Emacs 23.3.1 (i386-mingw-nt5.2.3790) of 2011-03-10 on 3249CTO Package: Org-mode version 7.5 current state: == (setq org-log-done 'time org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . system) ("\\.x?html?\\'" . system) ("\\.pdf\\'" . system)) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-todo-keyword-faces '(("TODO" :foreground "red" :weight bold) ("NEXT" :foreground "blue" :weight bold) ("STARTED" :foreground "blue" :weight bold) ("DONE" :foreground "forest green" :weight bold) ("WAITING" :foreground "orange" :weight bold) ("SOMEDAY" :foreground "magenta" :weight bold) ("CANCELLED" :foreground "forest green" :weight bold)) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-agenda-custom-commands '(("t" "TODO LIST!" tags "LEVEL=1+@TASKS|@HABIT/-DONE" ((orgo-agenda-overriding-header "TODO TASKS"))) ("p" "Problem -> solve now!" tags-todo "-@TASKS-@HABIT/-CANCELLED-WAITING-SOMEDAY" ((org-agenda-overriding-header "Waiting to be solved problem") (org-agenda-todo-ignore-with-date nil) (org-agenda-todo-ignore-scheduled nil) (org-agenda-todo-ignore-deadlines nil) (org-agenda-todo-ignore-timestamp nil) (org-agenda-todo-list-sublevels t) (org-tags-match-list-sublevels (quote indented))) ) ("S" "Problem -> Postponed" todo "SOMEDAY|WAITING" ((org-agenda-overriding-header "Postponed problem"))) ("n" "Note" tags "LEVEL>1+@NOTE/-TODO-SOMEDAY" ((orgo-agenda-overriding-header "Organized NOTE"))) ("r" "Refile files" tags "LEVEL=2+@REFILE" ((org-agenda-todo-ignore-with-date nil) (org-agenda-todo-ignore-deadlines nil) (org-agenda-todo-ignore-scheduled nil) (org-agenda-todo-ignore-timestamp nil) (org-agenda-overriding-header "Refile files")) ) ("l" "Live_log" tags "LEVEL=4+@LIVE_LOG" ((orgo-agenda-overriding-header "live_log"))) ("d" "Diary" tags "LEVEL=4+@DIARY" ((orgo-agenda-overriding-header "Diary"))) ("P" "Projects" tags-todo "LEVEL=1/!-DONE-CANCELLED-WAITING-SOMEDAY" ((org-agenda-skip-function (quote bh/skip-non-projects)) (org-agenda-overriding-header "Projects")) ) ("A" "Tasks to be Archived" tags "LEVEL=2-@REFILE/DONE|CANCELLED" ((org-agenda-overriding-header "Tasks to Archive") (org-agenda-skip-function (quote bh/skip-non-archivable-tasks))) ) ) org-agenda-files '("~/.emacs.d/org/Emacs-shortcut.org" "d:/emacs/zw963/.emacs.d/org/gtd/capture.org" "d:/emacs/zw963/.emacs.d/org/gtd/diary.org" "d:/emacs/zw963/.emacs.d/org/gtd/habit.org" "d:/emacs/zw963/.emacs.d/org/gtd/live-log.org" "d:/emacs/zw963/.emacs.d/org/gtd/organized.org" "d:/emacs/zw963/.emacs.d/org/gtd/task.org") org-list-demote-modify-bullet '(("+" . "-") ("*" . "-") ("1." . "-") ("1)" . "-")) org-plantuml-jar-path "~/.emacs.d/plugins/java/plantuml.jar" org-agenda-show-inherited-tags nil org-babel-load-languages '((emacs-lisp . t) (dot . t) (ditaa . t) (R . t) (python . t) (ruby . t) (gnuplot . t) (clojure . t) (sh . t) (ledger . t) (org . t) (plantuml . t) (latex . t)) org-completion-use-ido t org-metaup-hook '(org-babel-load-in-session-maybe) org-capture-templates '(("t" "Task->to do" entry (file "~/.emacs.d/org/gtd
Re: [O] Agenda Bulk Scatter bug
G'day Carsten (and the others who've latched onto this issue), When I first saw the thread dealing with decode-time ... I frankly had no idea how this related to the issue I'd reported. However, a few things have become clearer to me and perhaps what I see may help. Here is what I see on: GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0) of 2009-09-27 on crested, modified by Debian when evaluating in the scratch buffer: (decode-time (days-to-time (time-to-days (current-time (0 0 8 11 6 3980 3 nil 28800) and when I use BS on my orgmode (git commit c4737ae48b84308e1ac201531aca392a81529974) agenda in this system and item is rescheduled as such: SCHEDULED: <3980-06-17 Tue> Eureka! This seems to relate to what Carsten has picked up on. in ANOTHER Emacs GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9) of 2009-08-02 on radon, modified by Debian I see this from the scratch buffer: (decode-time (days-to-time (time-to-days (current-time [NOTHING RETURNED] with the following backtrace Debugger entered--Lisp error: (error "Invalid time specification") decode-time((968069 63616)) eval((decode-time (days-to-time (time-to-days ... eval-last-sexp-1(t) eval-last-sexp(t) eval-print-last-sexp() call-interactively(eval-print-last-sexp nil nil) The NOTHING returned here seems consistent with my originally reported rescheduling with a lost date. The main difference between these two Emacs here is one is running on a 64 bit (40C date), the other a 32 bit machine (no date). I can also report that in orgmode 7.5 (release version) there is no problem. My uneducated wild guess here would be that some code that somehow "patched" the date calculations in 7.5 has been removed or changed so as not to work. Hope this of some help. I'm not quite in a position to do the git-bisect Christian suggested. Cheers, RJ Cunningham On Friday 10 June 2011 16:20:42 Carsten Dominik wrote: > Hi, I need a few testers: Something very strange is going on here. > > When I evaluate this form > > (decode-time (days-to-time (time-to-days (current-time > > > I get a date in the year 3980. I think this used to work. > Is there anyone who has an idea what is going on here? > > Thanks > > - Carsten > > On Jun 4, 2011, at 6:54 AM, Robert Cunningham wrote: > > for a few weeks now, and including the git commit > > af677f6d0667bacba72defeaee7e76557e68f8c8 that I last tested, the Agenda > > Bulk Scatter (BS) has had a bug whereby items it reschedules have the > > DATE lost. > > > > As an example > > SCHEDULED 2011-12-12 > > > > ends up as > > > > SCHEDULED > > > > after BS > > > > > > org-mode 7.5 did not have the problem > > > > > > Cheers, > > > > RJ Cunningham > > - Carsten
Re: [O] Define capture template with dynamic id target
Hi Darlan, On Fri, Jun 10, 2011 at 21:20, Darlan Cavalcante Moreira wrote: > Thanks David, > > I tried to follow your suggestion, but I found two problems (maybe because > I know little about lisp). > > For instance, suppose I have a test.org file with the follow content > --8<---cut here---start->8--- > * 2011 > Every headline has an ID, but I have omitted here for brevity > *** May > * Sub-headline > bla bla bla > *** June > * Sub-headline > bla bla bla > --8<---cut here---end--->8--- > > I want the capture process to add an entry to the Sub-headline of June. If > I just use the file+headline and specify "Sub-headline" then it will add to > the Sub-headline in May. That's why I tried using IDs in the first > place. Also, every month I create a new month headline with the > Sub-headline and the capture process should add an entry to that > instead. That is the reason I wanted to get the ID from a function, instead > of just writing it in the capture template. > > > As far as I understand if I use the file+function target then the function > must return the headline name, but how can I say that I want the > Sub-headline of June and not of May? [first problem] > > I found an org-id-find function that returns something like > "(filename . characterPosition)". Therefore, If there is a way to specify a > position where org should start looking for the headline then I could use > that to go to the correct Sub-headline. > > > Also, the file+headline target will add the entry as a child of the > specified headline, but file+function seems to add the entry as a sibling > of the headline returned by the function. [second problem] Is this intended > behaviour or is it a bug? > [snip] Looking at the code, the function doesn’t need to return anything; it just needs to place point where you want the new headline to appear. Therefore, you can use ‘org-find-olp’ to locate the entry: ,[ C-h f org-find-olp RET ] | org-find-olp is a compiled Lisp function in `org.el'. | | (org-find-olp PATH &optional THIS-BUFFER) | | Return a marker pointing to the entry at outline path OLP. | If anything goes wrong, throw an error. | You can wrap this call to catch the error like this: | | (condition-case msg | (org-mobile-locate-entry (match-string 4)) | (error (nth 1 msg))) | | The return value will then be either a string with the error message, | or a marker if everything is OK. | | If THIS-BUFFER is set, the outline path does not contain a file, | only headings. ` So the code would look something like this: , | (org-find-olp '("2011" "May" "Sub-headline") t) ` Aankhen