Re: [O] slow agenda view and scrolling through headlines
On Nov 15, 2011, at 7:45 AM, Viktor Rosenfeld wrote: Hi Susan, swapping on OS X is usually accompanied by the spinning beach ball (from hell). Have you tried upgrading Emacs? I use Aquamacs (http://aquamacs.org/), there's also Cocoa Emacs (http://emacsformacosx.com/). Both are based on Emacs 23.3. Upgrading is certainly worth trying. Any obstacles agains doing that? It should be no need to reformat the files. If it can be fast, it should be fast, and if it get slow, this must mean that something is wrong - either in Emacs or in Org. Sometimes too many overlays can cause these problems. Maybe you can try these when it is slow: 1. Try to close all org-buffers before making the agenda. Does this help, maybe already on the first creation of the agenda, but certainly on the second? 2. Another try could be to cycle all Org buffer through visibility (three times S-TAB in each buffer). Does that make a difference? Mind you, this is not for everyday operations, but to help us find out what is wrong. - Carsten Cheers, Viktor Susan Addy wrote: Also - it does not usually get faster right after it gets slower. It will stay slow for a while and sometimes get faster again later, but I haven't noticed a definite pattern. On Mon, Nov 14, 2011 at 7:44 PM, Susan Addy susan.e.a...@gmail.com wrote: Hi Nick, I'm not sure if the machine swaps - in fact I'm not sure what you mean. However, I am on a macbook air running OSX 10.6.8, emacs 22.3.1, org 7.7. I am the only user. I have 4GB ram, 2.13 GHz intel core 2 duo. Thanks for your help, Susan On Sun, Nov 13, 2011 at 9:41 PM, Nick Dokos nicholas.do...@hp.com wrote: Susan Addy susan.e.a...@gmail.com wrote: Ok - I tried adding (setq font-lock-verbose nil), but there was no change. It is still fast when I open emacs, and then some time later (after I switch to another program for some time and back) it is slow. Sometimes it will become fast again, and sometimes I recall (I think) it has been slow right when I open it. Also, to clarify, the slow scrolling through headlines is in normal view, not agenda view. It tends to be correlated with the agenda being slow. Could it be that emacs is swapped out after you leave it for a while and it takes a long time to get swapped back in? But if so, it would get faster soon thereafter. Does the machine swap at all? OS and version? org version? emacs version? do you share the machine or are you the only user on it? how much memory? CPUs? Nick - Carsten
[O] org-mode using 100 CPU, weird note, or just too many of them?
I almost daily, and most certainly weekly, store notes in org-mode. Bin doin' that since somewhere in 2007. The file is now a measly 184k. Org-mode's weekly task list works fine. And storing notes works fine too. However, actually using these notes, is not. Every time I even look at the file, CPU utilisation jumps to 101 percent (two cores), according to 'Top'. It takes a while too, before it settles down. I can search (C-a s) fine, but when jumping to the resulting note, this will lock emacs for a while. And opening the note (tab) will lock it up again. I wonder, did I store some note that does something weird, like asking Org-Mode to calculate something from day 0 (4.54 billion years ago) to 'Judgement Day'? So, yesterday I decided to cut the file in parts. I threw aside all the notes stored before 2010. Made no difference. I threw aside all the notes that were made before 2011. That helped, now emacs' CPU utilisations is not above 50 percent and it is ok like that. So maybe the error is in a note from 2010? However, stripping all 2010 notes, the CPU is blocked once more.. so maybe it is not the 2010 notes? I'm not sure how to debug this. I've switched on the debugger, and tried hitting C-g when the CPU is at 100%, but the debugger comes up empty. Now what? Should I simply move all notes to the archive? That is fine with me, if search still works. But I bet then I simply will have moved the problem *there*?
Re: [O] org-mode using 100 CPU, weird note, or just too many of them?
Catching the hints from the current thread on the org-mode list, slow agenda view and scrolling through headlines, here is the result of M-x elp-instrument-package RET org RET and opening the org file M-x elp-results RET And, using Org-mode version 7.7 on GNU Emacs 24.0.91.1 (debian snapshot) org-cycle 5 0.081748 0.0163497999 org-cycle-internal-local 4 0.068494 0.0171235 org-mode 1 0.023933 0.023933 org-end-of-subtree11 0.021776 0.0019796363 org-optimize-window-after-visibility-change 3 0.02153 0.007176 org-subtree-end-visible-p 2 0.021485 0.010742 org-set-startup-visibility1 0.016646 0.016646 org-cycle-internal-global 1 0.011137 0.011137 org-cycle-show-empty-lines4 0.009353 0.00233825 org-overview 1 0.008841 0.008841 org-outline-level 1003 0.003750 3.739...e-06 org-cycle-hide-archived-subtrees 4 0.003287 0.00082175 org-update-radio-target-regexp1 0.002786 0.002786 org-all-targets 1 0.002765 0.002765 org-activate-footnote-links 16 0.002545 0.0001591249 org-footnote-next-reference-or-definition 16 0.002381 0.0001488125 org-cycle-hide-drawers5 0.002227 0.0004454000 org-footnote-at-reference-p 2 0.002026 0.001013 org-set-regexps-and-options 1 0.001967 0.001967 org-footnote-in-valid-context-p 2 0.001715 0.0008575 org-babel-hide-all-hashes 1 0.001583 0.001583 org-set-visibility-according-to-property 1 0.001479 0.001479 org-activate-dates46 0.001455 3.163...e-05 org-in-block-p2 0.00145 0.000725 org-in-regexps-block-p18 0.001324 7.355...e-05 org-activate-plain-links 20 0.001147 5.735e-05 org-install-agenda-files-menu 1 0.000676 0.000676 org-do-emphasis-faces 15 0.000629 4.193...e-05 org-fontify-meta-lines-and-blocks 15 0.000491 3.273...e-05 org-at-regexp-p 18 0.000469 2.605...e-05 org-hide-block-toggle-maybe 5 0.000414 8.280...e-05 org-back-to-heading 16 0.000403 2.518...e-05 org-fontify-meta-lines-and-blocks-1 15 0.000382 2.546...e-05 org-at-item-p 14 0.000355 2.535...e-05 org-agenda-files 1 0.000328 0.000328 org-activate-bracket-links17 0.000303 1.782...e-05 org-activate-tags 15 0.000288 1.92e-05 org-in-regexp 8 0.000245 3.0625e-05 org-unfontify-region 14 0.000242 1.728...e-05 org-hide-archived-subtrees3 0.000210 7.033...e-05 org-cycle-item-indentation5 0.000207 4.140...e-05 org-get-level-face102 0.000198 1.950...e-06 org-babel-hide-result-toggle-maybe5 0.000184 3.68e-05 org-flag-drawer 7 0.000180 2.585...e-05 org-activate-angle-links 14 0.000173 1.242...e-05 org-remove-flyspell-overlays-in 44 0.000158 3.613...e-06 org-list-search-forward 3
[O] [bug] latex export of link in footnotes
Hi, The below org file in 7.7 and today's git, when exported through LaTeX, results in an invalid link in the footnote, pointing to an undefined label named Foo. The link in the body is correctly exported to the automatically-generated sec-1 label; HTML output seems correct in both cases. * Foo Here is some text * Bar Here is some more text[fn:1]; see section [[Foo]]. * Footnotes [fn:1] see section [[Foo]]. Thanks, Christophe
Re: [O] [bug] latex export of link in footnotes
Hello, Christophe Rhodes cs...@cantab.net writes: The below org file in 7.7 and today's git, when exported through LaTeX, results in an invalid link in the footnote, pointing to an undefined label named Foo. The link in the body is correctly exported to the automatically-generated sec-1 label; HTML output seems correct in both cases. * Foo Here is some text * Bar Here is some more text[fn:1]; see section [[Foo]]. * Footnotes [fn:1] see section [[Foo]]. Yes, this is a known bug, which has been discussed a few weeks ago in this ML. For now, I simply suggest to avoid using fuzzy links in footnotes definitions. You can still use other mechanisms for internal links, like custom id. Regards, -- Nicolas Goaziou
Re: [O] About commit named Allow multi-line properties to be specified in property blocks
Is that patch on git yet? i.e. if can I switch back to HEAD and change my files accordingly? Cheers, Rainer On Wed, Nov 9, 2011 at 11:31 PM, Sebastien Vauban wxhgmqzgw...@spammotel.com wrote: Hi Eric, Eric Schulte wrote: Rainer M Krug r.m.k...@gmail.com writes: On Tue, Nov 8, 2011 at 11:53 PM, Eric Schulte schulte.e...@gmail.com wrote: Perhaps inserting an assumed space separator would be more intuitive? If we were to go that way it may be possible to allow variable specifications such as #+PROPERTY: var foo=1 bar=2 in which case properties could be easily specified on multiple lines using a default space separator. If this seems like a good way to go I can try to update my previous patch. I've updated the patch, the newest version is attached. It results in the following behavior. Looks good to me - that leaves just the question, what would hppen when doing the following: #+property: var foo=1 #+property: var+ 2 The above is equivalent to, #+header: :var foo=1 2 which due to interaction with some logic put in place to allow the specification of un-named variables in call lines results in the following. #+property: var foo=1 #+property: var+ 2 #+begin_src emacs-lisp foo #+end_src #+results: : 2 #+begin_src emacs-lisp :var bar=1 2 bar #+end_src #+results: : 2 Although generally I would say that both #+header: :var foo=1 2 and #+property: var foo=1 #+property: var+ 2 are mal-formed variable assignments. I was amazed, yesterday, when you told about `foo' becoming `12' (with `1' on the assignment line and `2' on the continuation), but I'm glad you consider this as rather ill-formed. and #+property: var foo=Hello #+property: var+ world This is exactly analogous to #+header: :var foo=hello world which raises the expected error ``variable world must be assigned a default value'' the following alternative however works as expected #+property: var foo=Hello #+property: var+ world #+begin_src emacs-lisp foo #+end_src #+results: : Hello world That said, all of these seem excellent trade-off between the different alternatives that have been discussed and analyzed, and they respect important aspects: simplicity (intuitive on reading) and powerfulness. Just perfect! Best regards, Seb -- Sebastien Vauban -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
Re: [O] org-mode using 100 CPU, weird note, or just too many of them?
Hi Gijs just by chance because this was the reason for many other slow-downs. (Guess it is qualified for the FAQ already?!) Do you have the linum-mode activated? Getting line-numbers left side of the buffer? This does not play nice with org-mode folding, since it seems to recalculate the line umbers whenever you try to fold/unfold stuff. Just an idea. Torsten On 15 November 2011 18:00, Gijs Hillenius g...@hillenius.net wrote: Catching the hints from the current thread on the org-mode list, slow agenda view and scrolling through headlines, here is the result of M-x elp-instrument-package RET org RET and opening the org file M-x elp-results RET And, using Org-mode version 7.7 on GNU Emacs 24.0.91.1 (debian snapshot) org-cycle 5 0.081748 0.0163497999 org-cycle-internal-local 4 0.068494 0.0171235 org-mode 1 0.023933 0.023933 org-end-of-subtree 11 0.021776 0.0019796363 org-optimize-window-after-visibility-change 3 0.02153 0.007176 org-subtree-end-visible-p 2 0.021485 0.010742 org-set-startup-visibility 1 0.016646 0.016646 org-cycle-internal-global 1 0.011137 0.011137 org-cycle-show-empty-lines 4 0.009353 0.00233825 org-overview 1 0.008841 0.008841 org-outline-level 1003 0.003750 3.739...e-06 org-cycle-hide-archived-subtrees 4 0.003287 0.00082175 org-update-radio-target-regexp 1 0.002786 0.002786 org-all-targets 1 0.002765 0.002765 org-activate-footnote-links 16 0.002545 0.0001591249 org-footnote-next-reference-or-definition 16 0.002381 0.0001488125 org-cycle-hide-drawers 5 0.002227 0.0004454000 org-footnote-at-reference-p 2 0.002026 0.001013 org-set-regexps-and-options 1 0.001967 0.001967 org-footnote-in-valid-context-p 2 0.001715 0.0008575 org-babel-hide-all-hashes 1 0.001583 0.001583 org-set-visibility-according-to-property 1 0.001479 0.001479 org-activate-dates 46 0.001455 3.163...e-05 org-in-block-p 2 0.00145 0.000725 org-in-regexps-block-p 18 0.001324 7.355...e-05 org-activate-plain-links 20 0.001147 5.735e-05 org-install-agenda-files-menu 1 0.000676 0.000676 org-do-emphasis-faces 15 0.000629 4.193...e-05 org-fontify-meta-lines-and-blocks 15 0.000491 3.273...e-05 org-at-regexp-p 18 0.000469 2.605...e-05 org-hide-block-toggle-maybe 5 0.000414 8.280...e-05 org-back-to-heading 16 0.000403 2.518...e-05 org-fontify-meta-lines-and-blocks-1 15 0.000382 2.546...e-05 org-at-item-p 14 0.000355 2.535...e-05 org-agenda-files 1 0.000328 0.000328 org-activate-bracket-links 17 0.000303 1.782...e-05 org-activate-tags 15 0.000288 1.92e-05 org-in-regexp 8 0.000245 3.0625e-05 org-unfontify-region 14 0.000242 1.728...e-05 org-hide-archived-subtrees 3 0.000210 7.033...e-05 org-cycle-item-indentation 5 0.000207 4.140...e-05 org-get-level-face
Re: [O] org-mode using 100 CPU, weird note, or just too many of them?
Torsten Wagner torsten.wag...@gmail.com wrote: Hi Gijs just by chance because this was the reason for many other slow-downs. (Guess it is qualified for the FAQ already?!) Do you have the linum-mode activated? Getting line-numbers left side of the buffer? This does not play nice with org-mode folding, since it seems to recalculate the line umbers whenever you try to fold/unfold stuff. Just an idea. Torsten On 15 November 2011 18:00, Gijs Hillenius g...@hillenius.net wrote: Catching the hints from the current thread on the org-mode list, slow agenda view and scrolling through headlines, here is the result of M-x elp-instrument-package RET org RET and opening the org file M-x elp-results RET And, using Org-mode version 7.7 on GNU Emacs 24.0.91.1 (debian snapshot) But the profile does not show org misbehaving at all: everything is under a tenth of second. You probably need something like top or vmstat (these are on Linux, but there is probably something similar on other OSes). IME, emacs occasionally goes into 100% CPU mode and I have to restart it, but it has only happened rarely and I have not tried to figure out what's causing it. Nick org-cycle 5 0.081748 0.0163497999 org-cycle-internal-local 4 0.068494 0.0171235 org-mode 1 0.023933 0.023933 org-end-of-subtree 11 0.021776 0.0019796363 org-optimize-window-after-visibility-change 3 0.02153 0.007176 org-subtree-end-visible-p 2 0.021485 0.010742 org-set-startup-visibility 1 0.016646 0.016646 org-cycle-internal-global 1 0.011137 0.011137 org-cycle-show-empty-lines 4 0.009353 0.00233825 org-overview 1 0.008841 0.008841 org-outline-level 1003 0.003750 3.739...e-06 org-cycle-hide-archived-subtrees 4 0.003287 0.00082175 org-update-radio-target-regexp 1 0.002786 0.002786 org-all-targets 1 0.002765 0.002765 org-activate-footnote-links 16 0.002545 0.0001591249 org-footnote-next-reference-or-definition 16 0.002381 0.0001488125 org-cycle-hide-drawers 5 0.002227 0.0004454000 org-footnote-at-reference-p 2 0.002026 0.001013 org-set-regexps-and-options 1 0.001967 0.001967 org-footnote-in-valid-context-p 2 0.001715 0.0008575 org-babel-hide-all-hashes 1 0.001583 0.001583 org-set-visibility-according-to-property 1 0.001479 0.001479 org-activate-dates 46 0.001455 3.163...e-05 org-in-block-p 2 0.00145 0.000725 org-in-regexps-block-p 18 0.001324 7.355...e-05 org-activate-plain-links 20 0.001147 5.735e-05 org-install-agenda-files-menu 1 0.000676 0.000676 org-do-emphasis-faces 15 0.000629 4.193...e-05 org-fontify-meta-lines-and-blocks 15 0.000491 3.273...e-05 org-at-regexp-p 18 0.000469 2.605...e-05 org-hide-block-toggle-maybe 5 0.000414 8.280...e-05 org-back-to-heading 16 0.000403 2.518...e-05 org-fontify-meta-lines-and-blocks-1 15 0.000382 2.546...e-05 org-at-item-p 14 0.000355 2.535...e-05 org-agenda-files 1 0.000328 0.000328 org-activate-bracket-links 17 0.000303 1.782...e-05 org-activate-tags
[O] bug: BEAMER_FRAME_LEVEL does not work on subtrees
Hi, if I use #+BEAMER_FRAME_LEVEL: 2 and export the entire document, the export is done correct. First level (*) is translated as section, second level headlines (**) as slide titles and third level as headline for content of the slides. However, if I only want to export a subtree it does not work. Now, first level headlines are omitted, second level headlines become sections in the latex file and third level headlines are missing. If I set #+BEAMER_FRAME_LEVEL: 1 subtree export is working again as desired but sure export the entire document is now wrong. My guess would be that the subtree export is not taking care of the #+BEAMER_FRAME_LEVEL property correctly. But this would not explain why headlines are omitted. Please find attached a minimal example to reproduce this behaviour. Thanks Torsten #+TITLE: Export a subtree #+AUTHOR:Torsten Wagner #+EMAIL: #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t :t #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: #+XSLT: #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [bigger] #+BEAMER_FRAME_LEVEL: 2 #+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %4BEAMER_col(Col) %10BEAMER_extra(Extra) * lecture 1 ** start lecture 1 ** slide 1 ** slide 2 ** slide 3 ** end lecture 1 * lecture 2 ** start lecture 2 ** slide 1 ** slide 2 *** Item 1 *** Item 2 *** Item 3 ** slide 3 ** end lecture 2 * lecture 2 ** start lecture 3 ** slide 1 ** slide 2 ** slide 3 ** end lecture 3
[O] Field coordinates and moving averages
I'm trying to create a table of periodic data and calculate a moving average in an adjacent column. I was trying to use field coordinates, but they do not work how I would like them to work. Here is what I have for a 5-day moving average: | Daily Data | Moving Average | |+| | 10 || | 11 || | 12 || | 13 || | 14 || | 14 || | 16 || #+TBLFM: $2=if(@# =7, vmean(@-5$1..@0$1),string()); I expeced the if(@# =7..) to protect the sub-clauses from executing unless the predicate is true. However, that is not the case. When I try to execute this formula, I receive the error: Row descriptor -5 used in line ### leads outside table. I can see how this is true if the ranges are checked for every entry. Is there a better way for me to write this column forumla? Is this a limitation in the field coordinates? Thanks, Ben
Re: [O] Estimate ranges in column view
Hi Carsten and Michael, Carsten Dominik wrote: On Jun 22, 2010, at 4:36 AM, Michael Gauland wrote: Here is a patch for a new 'est+' summary type, including corresponding changes for xemacs and the manual. I've done basic testing on the GNU emacs version, but not the xemacs code. [...] +@{est+@}@r{Add low-high estimates.} [...] +For example, suppose you had ten tasks, each of which was estimated at 0.5 +to 2 days of work. Straight addition produces an estimate of 5 to 20 days, +representing what to expect if everything goes either extremely well or +extremely poorly. In contrast, 'est+' estimates the full job more +realistically, at 10-15 days. Though, if we take 2 tasks, with an estimation of: - exactly 1 day for task 1, and - between 0.5 day (min) and 0.75 day (max) for task 2, we get an estimation of 2 days for both together... #+BEGIN: columnview :hlines 1 :maxlevel 2 | Task | Estim. | |---+--| | * Development | 2-2 | | ** Task 1 |1 | | ** Task 2 | 0.5-0.75 | #+END: +(defun org-estimate-print (e optional fmt) + Prepare a string representation of an estimate, as two numbers with a -' in between them. + (if (null fmt) (set 'fmt %.0f)) + (format %s (mapconcat (lambda (n) (format fmt n)) e -))) That's because of the rounding to the closest integer, done in the above function. Shouldn't we allow for 1 or 2 decimals? Or is there a possible way to guess what the best rounding could be? (provide 'org-colview) I have applied the patch - please check it if it is still working correctly. - Carsten Best regards, Seb -- Sebastien Vauban
Re: [O] Is it the combination with erc? (Was: Re: org-mode using 100 CPU, weird note, or just too many of them?)
Gijs Hillenius g...@hillenius.net wrote: I completely forgot to mention this, but Nick's remark reminds me. This very slow 'org-mode' behaviour *probably* only happens when erc is running (naturally, in another buffer). I run two instances of emacs: one is purely for erc, the other for everything else. You might want to try a setup like that and see if it resolves the problem. Nick
Re: [O] About commit named Allow multi-line properties to be specified in property blocks
Torsten Wagner torsten.wag...@gmail.com writes: Hi, Eric I lost a bit track of what was the final decsion. Guess a good way to get back on track would be helping with the documentary. Any tasks to do? Tom has handled the documentation (thanks Tom!) so he would know better than I if there are any outstanding documentation tasks. As a means of catching up with the final decisions I would recommend reviewing the two commit messages linked to from my email this morning announcing the merge. Another task which would be much appreciated would be to go through the introduction to working with code blocks on Worg and update the syntax as appropriate. http://orgmode.org/worg/org-contrib/babel/intro.html Thanks for the offer! -- Eric Torsten -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] Failure exporting with emacs --batch
With b43c1c621f52f4a51d8d79cb76c226dfed003998 running emacs --no-init-file --load min.el --eval '(setq debug-on-error t)' --eval '(find-file test.org)' -eval '(org-export-as-html 3)' --batch with -- min.el (setq org-babel-load-languages '((emacs-lisp . t) (latex . t))) (setq org-confirm-babel-evaluate nil) (setq org-export-latex-packages-alist `(( diagrams t))) (require 'org-install) (require 'org) -- and -- test.org #+TITLE: Notes for Higher Category Theory #+MATHJAX: mathml:t #+BABEL :exports results * Notes for 2011-09-16 #+begin_src latex :file diag1.png \begin{diagram} Y\times \{0\} \rTo E \\ \dTo \ruDotsto \dTo \\ Y\times I \rTo B \end{diagram} #+end_src -- gives me -- output OVERVIEW Loading vc-git... Exporting... Position saved to mark ring, go back with C-c . executing Latex code block... Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p unspecified) org-create-formula-image(\\begin{diagram}\n Y\\times \\{0\\} \\rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n\\end{diagram} diag1.png (:foreground default :background default :scale 1.0 :html-foreground Black :html-background Transparent :html-scale 1.0 :matchers (begin $1 $ $$ \\( \\[)) t) org-babel-execute:latex(\\begin{diagram}\n Y\\times \\{0\\} \\rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n\\end{diagram} ((:colname-names) (:rowname-names) (:result-params replace file latex file replace latex) (:result-type . value) (:comments . ) (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace file latex) (:session . none) (:rowname-names) (:result-type . value) (:result-params file replace latex) (:padnewline . yes) (:hlines . no) (:file . diag1.png) (:colname-names))) org-babel-execute-src-block(nil (latex \\begin{diagram}\n Y\\times \\{0\\} \\rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n\\end{diagram} ((:colname-names) (:rowname-names) (:result-params replace file latex file replace latex) (:result-type . value) (:comments . ) (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace file latex) (:session . none) (:rowname-names) (:result-type . value) (:result-params file replace latex) (:padnewline . yes) (:hlines . no) (:file . diag1.png) (:colname-names)) nil 0)) org-babel-exp-results((latex \\begin{diagram}\n Y\\times \\{0\\} \\rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n\\end{diagram} ((:colname-names) (:rowname-names) (:result-params replace file latex file replace latex) (:result-type . value) (:comments . ) (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace file latex) (:session . none) (:rowname-names) (:result-type . value) (:result-params file replace latex) (:padnewline . yes) (:hlines . no) (:file . diag1.png) (:colname-names)) nil 0) block nil e690bc66b5d1181e2751abbc36dc7def2f54c72a) org-babel-exp-do-export((latex \\begin{diagram}\n Y\\times \\{0\\} \\rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n\\end{diagram} ((:colname-names) (:rowname-names) (:result-params replace file latex file replace latex) (:result-type . value) (:comments . ) (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:tangle . no) (:exports . results) (:results . replace file latex) (:session . none) (:rowname-names) (:result-type . value) (:result-params file replace latex) (:padnewline . yes) (:hlines . no) (:file . diag1.png) (:colname-names)) nil 0) block e690bc66b5d1181e2751abbc36dc7def2f54c72a) org-babel-exp-src-block(\\begin{diagram}\n Y\\times \\{0\\} \\rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n\\end{diagram} latex :file diag1.png) apply(org-babel-exp-src-block \\begin{diagram}\n Y\\times \\{0\\} \\rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n\\end{diagram} (latex :file diag1.png)) byte-code(\306\307\211\211\211\211\211\211\211\211\211\211+,-./0\310\311!\2111\205) \311K2\312\216\311\313M\210eb\210`\3143\3153\307\306#\203X\316\317\224!4\316\317\225!5\320\321!G-\322\323\324\320\325!\227!\6\326\320\325!\227!,\327 7\330\216\331\320\332!\333\*\32189\206\200 \334\n\235\307:\3358!\204\255 \3156\307\306#\203\255 \320\321!\227\336\230\203\245 8S8\202\204 8T8\202\204 \3358!\204\276 \337\340,4`{#\210\316\317\225!: \204\327 \327 7\341\216\3425\317\224{!*,/\204\346 ,/B/\327 7\343\216\311 4\\210*\344,;\\211A@)\211+\203?\327 7\345\216,=\203\346\202\347+\n#*\211\2034:|\2104b\210c\210 \204\3504`-#\210)4\307\211\223\2105\307\211\223\210:\307\211\223\210. `\2029 )\311 d\\210\351\352!.\207 [progress-marker preserve-indent headers body end start t nil fboundp interblock ((byte-code \203 \302
Re: [O] About commit named Allow multi-line properties to be specified in property blocks
Aloha Torsten, Let me clean up some loose ends in the documentation of standardized keywords in org.texi later today. Eric moves more quickly than I do and the documentation is in a working draft stage, definitely not ready for consumption and use. I didn't get around to documenting the ability to accumulate properties, so please have a go at that if you like. I looked at it briefly and thought that there should be an overview of the new functionality in section 7.1, after the discussion of _ALL properties, and then details in the section on Working with Source Code, where use of the functionality with var=name should be explained. I'm not too clear on the other possibilities this functionality introduces, so my ideas here might be wide of the mark. All the best, Tom Eric Schulte schulte.e...@gmail.com writes: Torsten Wagner torsten.wag...@gmail.com writes: Hi, Eric I lost a bit track of what was the final decsion. Guess a good way to get back on track would be helping with the documentary. Any tasks to do? Tom has handled the documentation (thanks Tom!) so he would know better than I if there are any outstanding documentation tasks. As a means of catching up with the final decisions I would recommend reviewing the two commit messages linked to from my email this morning announcing the merge. Another task which would be much appreciated would be to go through the introduction to working with code blocks on Worg and update the syntax as appropriate. http://orgmode.org/worg/org-contrib/babel/intro.html Thanks for the offer! -- Eric Torsten -- Thomas S. Dye http://www.tsdye.com
Re: [O] About commit named Allow multi-line properties to be specified in property blocks
On Tue, Nov 15, 2011 at 5:00 PM, Eric Schulte schulte.e...@gmail.comwrote: Rainer M Krug r.m.k...@gmail.com writes: Is that patch on git yet? i.e. if can I switch back to HEAD and change my files accordingly? Hi Rainer, I've must merged all of the pending code block changes into the master branch of the Org-mode git repository. So now would be a good time to re-sync with the master branch. Great news. I'll try and adapt my files then tomorrow and let you know if there are any problems. Thanks, Rainer Best -- Eric Cheers, Rainer On Wed, Nov 9, 2011 at 11:31 PM, Sebastien Vauban wxhgmqzgw...@spammotel.com wrote: Hi Eric, Eric Schulte wrote: Rainer M Krug r.m.k...@gmail.com writes: On Tue, Nov 8, 2011 at 11:53 PM, Eric Schulte schulte.e...@gmail.com wrote: Perhaps inserting an assumed space separator would be more intuitive? If we were to go that way it may be possible to allow variable specifications such as #+PROPERTY: var foo=1 bar=2 in which case properties could be easily specified on multiple lines using a default space separator. If this seems like a good way to go I can try to update my previous patch. I've updated the patch, the newest version is attached. It results in the following behavior. Looks good to me - that leaves just the question, what would hppen when doing the following: #+property: var foo=1 #+property: var+ 2 The above is equivalent to, #+header: :var foo=1 2 which due to interaction with some logic put in place to allow the specification of un-named variables in call lines results in the following. #+property: var foo=1 #+property: var+ 2 #+begin_src emacs-lisp foo #+end_src #+results: : 2 #+begin_src emacs-lisp :var bar=1 2 bar #+end_src #+results: : 2 Although generally I would say that both #+header: :var foo=1 2 and #+property: var foo=1 #+property: var+ 2 are mal-formed variable assignments. I was amazed, yesterday, when you told about `foo' becoming `12' (with `1' on the assignment line and `2' on the continuation), but I'm glad you consider this as rather ill-formed. and #+property: var foo=Hello #+property: var+ world This is exactly analogous to #+header: :var foo=hello world which raises the expected error ``variable world must be assigned a default value'' the following alternative however works as expected #+property: var foo=Hello #+property: var+ world #+begin_src emacs-lisp foo #+end_src #+results: : Hello world That said, all of these seem excellent trade-off between the different alternatives that have been discussed and analyzed, and they respect important aspects: simplicity (intuitive on reading) and powerfulness. Just perfect! Best regards, Seb -- Sebastien Vauban -- Eric Schulte http://cs.unm.edu/~eschulte/ -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
Re: [O] [PATCH] Create visibility overlays properly
Hi Milan, Milan Zamazal p...@zamazal.org writes: Any chance to get this patch applied? Or is there anything wrong with it? I just applied it -- thanks for this patch and sorry it took so long to apply it. Best, -- Bastien
Re: [O] About commit named Allow multi-line properties to be specified in property blocks
The cleaning up documentation patch has now been applied. Best -- Eric t...@tsdye.com (Thomas S. Dye) writes: Aloha Torsten, Let me clean up some loose ends in the documentation of standardized keywords in org.texi later today. Eric moves more quickly than I do and the documentation is in a working draft stage, definitely not ready for consumption and use. I didn't get around to documenting the ability to accumulate properties, so please have a go at that if you like. I looked at it briefly and thought that there should be an overview of the new functionality in section 7.1, after the discussion of _ALL properties, and then details in the section on Working with Source Code, where use of the functionality with var=name should be explained. I'm not too clear on the other possibilities this functionality introduces, so my ideas here might be wide of the mark. All the best, Tom Eric Schulte schulte.e...@gmail.com writes: Torsten Wagner torsten.wag...@gmail.com writes: Hi, Eric I lost a bit track of what was the final decsion. Guess a good way to get back on track would be helping with the documentary. Any tasks to do? Tom has handled the documentation (thanks Tom!) so he would know better than I if there are any outstanding documentation tasks. As a means of catching up with the final decisions I would recommend reviewing the two commit messages linked to from my email this morning announcing the merge. Another task which would be much appreciated would be to go through the introduction to working with code blocks on Worg and update the syntax as appropriate. http://orgmode.org/worg/org-contrib/babel/intro.html Thanks for the offer! -- Eric Torsten -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Field coordinates and moving averages
Hi Ben On Tue, Nov 15, 2011 at 16:21, Benjamin Beckwith bnbeckw...@gmail.com wrote: #+TBLFM: $2=if(@# =7, vmean(@-5$1..@0$1),string()); The above does not work because the range expression @-5$1..@0$1 is an Org construct and has to be evaluated for every affected row already in Org, before it is given to Calc. It has therefore no other choice than failing together with $2 = (out of range), the expression @# = 7 is evaluated only in Calc later. This is one of the reasons for which I added field coordinates in formulas (@# and $#) in 2010-03. There are at least two solutions with a Calc formula for this use case: 1) range formula The clean solution, already given by Nick: On Tue, Nov 15, 2011 at 16:52, Nick Dokos nicholas.do...@hp.com wrote: Try a range on the LHS: #+TBLFM: @7$2..@$2=vmean(@-5$1..@0$1) 2) Calc subvec with field coordinates in formulas This was the only solution before Carsten introduced range formulas in 2011-03 and might be interesting for understanding purposes: | Daily Data | Moving Average | |+| | 10 || | 11 || | 12 || | 13 || | 14 || | 14 | 12.333 | | 16 | 13.333 | #+TBLFM: $2 = if(@# = 7, vmean(subvec(@I$1..@$1, @# - 6, @#)) +.0, string()); f-3 See also Dynamic variation of ranges in field coordinates in formulas (@# and $#) here: http://orgmode.org/worg/org-hacks.html reachable about one or two pages down with the current section numbering here: http://orgmode.org/worg/org-hacks.html#sec-1-3-5 For such a two-dimensional moving range, Calc subsrc/subvec is still the simpler solution to get the triangle than several range formulas would be. If you change the input field 16 to 20 you see that +.0 is required in the formula to get 14.000 instead of 14 for the result. See Which float format shows the fraction part also when the latter is zero? here: http://orgmode.org/worg/org-faq.html#table-float-fraction Michael
Re: [O] New feature branch: org-xhtml-and-org-odt
Dear all, thanks Jambunathan for setting up this branch! *Please all*: test this branch as much as you can. We plan to integrate the ODT exporter into Org's core for the next release, and this will only happen if there is no regression between the current org-html.el and org-xhtml.el from Jambunathan's branch. Thanks for your help, -- Bastien
Re: [O] New feature branch: org-xhtml-and-org-odt
Hi Joakim, joa...@verona.se writes: I have a project at github called inkmacs, which integrates inkscape, org-mode, and emacs: https://github.com/jave/inkmacs There I support interactive transfer of org nodes to inkscapes text nodes. My current code to extract the org nodes is not beautiful and I though maybe org-lparse improves the situation? Along with org-lparse.el, the next release will contain a proper Org parser in contrib/ -- it will do what you want. I let Nicolas publicly announce this code when he thinks it's mature enough. Thanks, -- Bastien
Re: [O] Failure exporting with emacs --batch
Tom Prince tom.prince at ualberta.net writes: With b43c1c621f52f4a51d8d79cb76c226dfed003998 running emacs --no-init-file --load min.el --eval '(setq debug-on-error t)' --eval '(find-file test.org)' -eval '(org-export-as-html 3)' --batch Not sure, but I do something similar with a single --eval: --eval '(progn (find-file filename) (org-export-as-html-and-open 3) )' -- Herb
Re: [O] Failure exporting with emacs --batch
Herbert Sitz hesitz at gmail.com writes: Not sure, but I do something similar with a single --eval: --eval '(progn (find-file filename) (org-export-as-html-and-open 3) )' Except my version has double quotes for --eval argument and backslashes before embedded quotes: --eval (progn (find-file \filename\) (org-export-as-html-and-open 3) )
Re: [O] Failure exporting with emacs --batch
Tom Prince tom.pri...@ualberta.net writes: With b43c1c621f52f4a51d8d79cb76c226dfed003998 running emacs --no-init-file --load min.el --eval '(setq debug-on-error t)' --eval '(find-file test.org)' -eval '(org-export-as-html 3)' --batch with -- min.el (setq org-babel-load-languages '((emacs-lisp . t) (latex . t))) (setq org-confirm-babel-evaluate nil) (setq org-export-latex-packages-alist `(( diagrams t))) (require 'org-install) (require 'org) -- and -- test.org #+TITLE: Notes for Higher Category Theory #+MATHJAX: mathml:t #+BABEL :exports results One item to note is that the #+BABEL: syntax is now deprecated, try replacing the above line with the following. #+PROPERTY: exports results Best -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Failure exporting with emacs --batch
Tom Prince tom.pri...@ualberta.net wrote: With b43c1c621f52f4a51d8d79cb76c226dfed003998 running Please use C-u M-x org-version to insert version information in your mail. It's not possible to see from the SHA1 whether it is a recent version or an old version without doing git archaelogy. emacs --no-init-file --load min.el --eval '(setq debug-on-error t)' --eval= '(find-file test.org)' -eval '(org-export-as-html 3)' --batch with -- min.el (setq org-babel-load-languages '((emacs-lisp . t) (latex . t))) (setq org-confirm-babel-evaluate nil) (setq org-export-latex-packages-alist `(( diagrams t))) (require 'org-install) (require 'org) -- and -- test.org #+TITLE: Notes for Higher Category Theory #+MATHJAX: mathml:t #+BABEL :exports results * Notes for 2011-09-16 #+begin_src latex :file diag1.png \begin{diagram} Y\times \{0\} \rTo E \\ \dTo \ruDotsto \dTo \\ Y\times I \rTo B \end{diagram} #+end_src -- A couple of problems: o #+BABEL is obsolete since release_7.7-405-g04a978f - use #+PROPERTY: exports results in its place with latest - I'm not sure what was current at your release (release_7.7.541.gb43c) o how do you set up the diagram environment? it's not there by default, so you probably have done some configuration of your environment. After struggling with it for a while, I can't get it to work to my satisfaction, but in any case, I cannot reproduce the error, with or without #+MATHJAX and with versions Org-mode version 7.7 (release_7.7.563.gf8d8) and Org-mode version 7.7 (release_7.7.541.gb43c): , | $ emacs --no-init-file --load ~/minimal.emacs.org --eval '(setq debug-on-error t)' --eval '(find-file tom-prince.org)' -eval '(org-export-as-html 3)' --batch | OVERVIEW | Loading vc-git... | Exporting... | Exporting... | Saving file /home/nick/src/emacs/org/Worg/tom-prince.html... | Wrote /home/nick/src/emacs/org/Worg/tom-prince.html | HTML export done, pushed to kill ring and clipboard ` Nick PS As Herbert Sitz points out, you can combine all the evals, but I don't think the multiple evals cause the problem. -- output OVERVIEW Loading vc-git... Exporting... Position saved to mark ring, go back with C-c . executing Latex code block... Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p unspe= cified) org-create-formula-image(\\begin{diagram}\n Y\\times \\{0\\} \\rTo = E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n\\end{= diagram} diag1.png (:foreground default :background default :scale 1.0 := html-foreground Black :html-background Transparent :html-scale 1.0 :mat= chers (begin $1 $ $$ \\( \\[)) t) org-babel-execute:latex(\\begin{diagram}\n Y\\times \\{0\\} \\rTo E= \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n\\end{d= iagram} ((:colname-names) (:rowname-names) (:result-params replace file= latex file replace latex) (:result-type . value) (:comments . )= (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:tangle .= no) (:exports . results) (:results . replace file latex) (:session .= none) (:rowname-names) (:result-type . value) (:result-params file re= place latex) (:padnewline . yes) (:hlines . no) (:file . diag1.png= ) (:colname-names))) org-babel-execute-src-block(nil (latex \\begin{diagram}\n Y\\times \\= {0\\} \\rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \= \rTo B\n\\end{diagram} ((:colname-names) (:rowname-names) (:result-param= s replace file latex file replace latex) (:result-type . value)= (:comments . ) (:shebang . ) (:cache . no) (:padline . ) (:noweb .= no) (:tangle . no) (:exports . results) (:results . replace file la= tex) (:session . none) (:rowname-names) (:result-type . value) (:result-= params file replace latex) (:padnewline . yes) (:hlines . no) (:f= ile . diag1.png) (:colname-names)) nil 0)) org-babel-exp-results((latex \\begin{diagram}\n Y\\times \\{0\\} \\= rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B\n= \\end{diagram} ((:colname-names) (:rowname-names) (:result-params replace= file latex file replace latex) (:result-type . value) (:comment= s . ) (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:t= angle . no) (:exports . results) (:results . replace file latex) (:se= ssion . none) (:rowname-names) (:result-type . value) (:result-params fi= le replace latex) (:padnewline . yes) (:hlines . no) (:file . dia= g1.png) (:colname-names)) nil 0) block nil e690bc66b5d1181e2751abbc36d= c7def2f54c72a) org-babel-exp-do-export((latex \\begin{diagram}\n Y\\times \\{0\\} = \\rTo E \n \\dTo \\ruDotsto \\dTo \n Y\\times I \\rTo B= \n\\end{diagram} ((:colname-names) (:rowname-names) (:result-params repla= ce file latex file replace latex) (:result-type . value) (:comme= nts . ) (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (= :tangle . no) (:exports . results) (:results . replace file
Re: [O] Failure exporting with emacs --batch
Herbert Sitz hes...@gmail.com wrote: Herbert Sitz hesitz at gmail.com writes: Not sure, but I do something similar with a single --eval: --eval '(progn (find-file filename) (org-export-as-html-and-open 3) )' Except my version has double quotes for --eval argument and backslashes before embedded quotes: --eval (progn (find-file \filename\) (org-export-as-html-and-open 3) ) That doesn't matter here: both of the above should work fine in a bash (or similar) shell environment. I prefer the single quote style in general, since it allows me to leave everything else unchanged[fn:1]. But shell quoting is a minefield: when you have to quote *parts* of an expression and leave other parts unquoted so that the shell can get to them (e.g. to evaluate shell variables and `...` or $(...) constructs), life starts to get difficult - and that's just the beginning[fn:2]. Nick Footnotes: [fn:1] ...unless there is a single quote in there. If I'm quoting lisp code that has a single quote, I generally write (quote foo) instead of 'foo, in order to avoid the quote mess. And often I'll just add a function to my minimal .emacs, so I can just write ... --eval '(foo)' ... on the command line: when writing foo, I don't have to worry about shell quoting rules. [fn:2] Kernighan and Pike, in their The Unix Programming Environment, have an example on p. 128 where they remark: The remarkable sequence of quote characters is required to capture the date in a string in the middle of the awk program. Worth taking a look if you have the book available nearby.
Re: [O] Failure exporting with emacs --batch
Nick Dokos nicholas.dokos at hp.com writes: That doesn't matter here: both of the above should work fine in a bash (or similar) shell environment. I prefer the single quote style in general, since it allows me to leave everything else unchanged[fn:1]. But shell quoting is a minefield: when you have to quote *parts* of an expression and leave other parts unquoted so that the shell can get to them (e.g. to evaluate shell variables and `...` or $(...) constructs), life starts to get difficult - and that's just the beginning[fn:2]. Nick -- Thanks for clarifying, I didn't read Tom's post closely enough or I would have seen that the export was indeed getting called. I've been working with getting the batch quoting working both for bash and for windows command line (in VimOrganizer clone), trying to keep them as much alike as possible. I think I have things working okay for now, but your tips may be helpful if I end up with something more complex to send. Regards, Herb
[O] [BUG] org-table: time difference delivers wrong results
Hello list, consider the following example: |A | B | C | |--+---+---| | 07:11:00 | -08:00:00 | -01:11:00 | #+TBLFM: $3=$1+$2;T I think the result in the third column is wrong. I expect 0 hours and 49 minutes, negative (-00:49:00). The following does not work, too: |A | C | |--+---| | 07:11:00 | -01:11:00 | #+TBLFM: $2=$1-28800;T Daniel
Re: [O] Failure exporting with emacs --batch
Herbert Sitz hes...@gmail.com wrote: I've been working with getting the batch quoting working both for bash and for windows command line (in VimOrganizer clone), trying to keep them as much alike as possible. I think I have things working okay for now, but your tips may be helpful if I end up with something more complex to send. Yes, I realize that you have that extra burden, hence my bash-or-similar qualification. One can go mad with the bash-or-similar quoting rules alone: having to deal with the command line interpreter on Windoze as well more or less guarantees it :-) Nick
Re: [O] Failure exporting with emacs --batch
On Tue, 15 Nov 2011 15:30:25 -0500, Nick Dokos nicholas.do...@hp.com wrote: Tom Prince tom.pri...@ualberta.net wrote: With b43c1c621f52f4a51d8d79cb76c226dfed003998 running Please use C-u M-x org-version to insert version information in your mail. It's not possible to see from the SHA1 whether it is a recent version or an old version without doing git archaelogy. org-version doesn't display a sha1 hash, when run from an installed copy of a git version. Further simplified: (this time with a git clone) emacs --no-site-file --no-init-file --load min.el --eval '(setq debug-on-error t)' --eval '(find-file test.org)' --eval '(org-version)' -eval '(org-export-as-html 3)' --batch -- min.el (setq org-babel-load-languages '((emacs-lisp . t) (latex . t))) (setq org-confirm-babel-evaluate nil) (add-to-list 'load-path (expand-file-name ~/src/org-mode/lisp)) (add-to-list 'auto-mode-alist '(\\.\\(org\\ |org_archive\\|txt\\)$ . org-mode)) (require 'org-install) -- -- test.org * Notes for 2011-09-16 #+begin_src latex :file diag1.png some latex source #+end_src -- -- output OVERVIEW Loading vc-git... Org-mode version 7.7 (release_7.7.541.gb43c) Exporting... executing Latex code block... ... (let* ((info ...) (lang ...) (raw-params ...) hash) (when info (when ... ... ...) (setf ... ...) (org-babel-exp-do-export info ... hash))) (save-excursion (goto-char (match-beginning 0)) (let* (... ... ... hash) (when info ... ... ...))) org-babel-exp-src-block(some latex source latex :file diag1.png) apply(org-babel-exp-src-block some latex source (latex :file diag1.png)) (if (memq type org-export-blocks-witheld) (apply func body headers)) (progn (if (memq type org-export-blocks-witheld) (apply func body headers))) (unwind-protect (progn (if ... ...)) (set-match-data save-match-data-internal (quote evaporate))) (let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set-match-data save-match-data-internal ...))) (save-match-data (if (memq type org-export-blocks-witheld) (apply func body headers))) (let ((replacement ...)) (when replacement (delete-region match-start match-end) (goto-char match-start) (insert replacement) (unless preserve-indent ...))) (progn (let (...) (when replacement ... ... ... ...))) (if (setq func (cadr ...)) (progn (let ... ...))) (when (setq func (cadr ...)) (let (...) (when replacement ... ... ... ...))) (let* ((match-start ...) (body-start ...) (indentation ...) (inner-re ...) (type ...) (headers ...) (balanced 1) (preserve-indent ...) match-end) (while (and ... ...) (if ... ... ...)) (when (not ...) (error unbalanced begin/end_%s blocks with %S type ...)) (setq match-end (copy-marker ...)) (unless preserve-indent (setq body ...)) (unless (memq type types) (setq types ...)) (save-match-data (interblock start match-start)) (when (setq func ...) (let ... ...)) (set-marker match-start nil) (set-marker body-start nil) (set-marker match-end nil)) (while (re-search-forward beg-re nil t) (let* (... ... ... ... ... ... ... ... match-end) (while ... ...) (when ... ...) (setq match-end ...) (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...) (set-marker match-start nil) (set-marker body-start nil) (set-marker match-end nil)) (setq start (point))) (let ((beg-re ^\\([ ]*\\)#\\+begin_\\(\\S-+\\)[ ]*\\(.*\\)?[ \n])) (while (re-search-forward beg-re nil t) (let* ... ... ... ... ... ... ... ... ... ... ...) (setq start ...))) (progn (fset (quote interblock) (function* ...)) (goto-char (point-min)) (setq start (point)) (let (...) (while ... ... ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook))) (unwind-protect (progn (fset ... ...) (goto-char ...) (setq start ...) (let ... ...) (interblock start ...) (run-hooks ...)) (if --cl-letf-bound-- (fset ... --cl-letf-save--) (fmakunbound ...))) (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind-protect (progn ... ... ... ... ... ...) (if --cl-letf-bound-- ... ...))) (letf ((... ...)) (goto-char (point-min)) (setq start (point)) (let (...) (while ... ... ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook))) (letf* ((... ...)) (goto-char (point-min)) (setq start (point)) (let (...) (while ... ... ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook))) (flet ((interblock ... ...)) (goto-char (point-min)) (setq start (point)) (let (...) (while ... ... ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook))) (let ((case-fold-search t) (types ...) matched indentation type func start end body headers preserve-indent progress-marker) (flet (...) (goto-char ...) (setq start ...) (let ... ...) (interblock start ...) (run-hooks ...))) (save-window-excursion (let (... ... matched indentation type func start end body headers preserve-indent progress-marker) (flet ...
[O] org-mobile-push failure with git tip
I recently updated to the latest git, and found that while everything else I tried was ok, I got a backtrace when doing org-mobile-push. Bisecting, I found that the problem commit is: commit dc62cdcdf11f305149281d16ef2200e18c7abd43 Author: Nicolas Goaziou n.goaz...@gmail.com Date: Sun Oct 23 22:42:48 2011 +0200 org-agenda: Fix small display bug. * lisp/org-agenda.el: Fix small display bug. diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 32087e3..2bbb832 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3887,7 +3887,7 @@ in `org-agenda-text-search-extra-files'. (if (not regexps+) (setq regexp org-outline-regexp-bol) (setq regexp (pop regexps+)) - (if hdl-only (setq regexp (concat org-outline-regexp-bol .*? + (if hdl-only (setq regexp (concat org-outline-regexp-bol .*? regexp (setq files (org-agenda-files nil 'ifmode)) (when (eq (car org-agenda-text-search-extra-files) 'agenda-archives) @@ -4623,7 +4623,7 @@ the documentation of `org-diary'. (setq marker (org-agenda-new-marker (match-beginning 0)) category (org-get-category) org-category-pos (get-text-property (point) 'org-category-position) - txt (match-string 2) + txt (buffer-substring (match-beginning 2) (match-end 3)) tags (org-get-tags-at (point)) txt (org-agenda-format-item txt category tags) priority (1+ (org-get-priority txt)) and by moving to origin/master and then reverting that one commit, all seems well. I can send more information if needed, but I'm guessing the above report will make the problem apparent. pgpSXB2S9fhtZ.pgp Description: PGP signature
Re: [O] Failure exporting with emacs --batch
Tom Prince tom.pri...@ualberta.net wrote: On Tue, 15 Nov 2011 15:30:25 -0500, Nick Dokos nicholas.do...@hp.com wrot= e: Tom Prince tom.pri...@ualberta.net wrote: =20 With b43c1c621f52f4a51d8d79cb76c226dfed003998 running =20 =20 Please use C-u M-x org-version to insert version information in your mail. It's not possible to see from the SHA1 whether it is a recent version or an old version without doing git archaelogy. org-version doesn't display a sha1 hash, when run from an installed copy of a git version. OK. ``git describe'' in your git tree will do the equivalent. Further simplified: (this time with a git clone) emacs --no-site-file --no-init-file --load min.el --eval '(setq debug-on-er= ror t)' --eval '(find-file test.org)' --eval '(org-version)' -eval '(org-= export-as-html 3)' --batch -- min.el (setq org-babel-load-languages '((emacs-lisp . t) (latex . t))) (setq org-confirm-babel-evaluate nil) (add-to-list 'load-path (expand-file-name ~/src/org-mode/lisp)) (add-to-list 'auto-mode-alist '(\\.\\(org\\ |org_archive\\|txt\\)$ . org= -mode)) (require 'org-install) -- -- test.org * Notes for 2011-09-16 #+begin_src latex :file diag1.png some latex source #+end_src -- Yes, I can reproduce this (Org-mode version 7.7 (release_7.7.563.gf8d8.dirty)). I goofed before in not enabling latex as a babel language in my minimal emacs. The thing is that the usual debugging techniques are useless, because it only happens with --batch. So the only thing that works is princ :-( It turns out that there is a bunch of places in org-create-formula-image (which gets called to convert latex formulas to png) that ask for properties of the default face: there is no such thing in batch, and various things blow up - e.g. $ emacs -Q --batch --eval '(princ (face-attribute (quote default) :foreground))' unspecified$ This bug has existed for ever, but I guess this is the first time anybody exercised the code path. In particular, the font height and the fg and bg colors are calculated this way. I stubbed out these things (line 16898ff in org.el) with more or less arbitrary values: (fnh (if (featurep 'xemacs) (font-height (get-face-font 'default)) (face-attribute 'default :height nil))) (fnh (if (numberp fnh) fnh 140.)) and ;;(if (eq fg 'default) (setq fg (org-dvipng-color :foreground))) ;;(if (eq bg 'default) (setq bg (org-dvipng-color :background))) (setq fg rgb 0 1 0) (setq bg rgb 0 0 0) and the test passes. Of course, this is not a fix, but I'm sure one will be forthcoming shortly. There may of course be more such problems in other untested paths. Thanks for an interesting bug, Nick
Re: [O] zotero-cite (A Proposal)
Hi Jambunathan, Sorry I took some time to reply. Some answers are below. At Sat, 12 Nov 2011 02:04:52 +0530, Jambunathan K wrote: Hello Erik Good news. Getting a frugal Zotero-based citations is *definitely* possible. It is just a matter of time. Your libraries already provide the necessary plumbing to accomplish the job. Long story == For my own understanding, I tried trimming down zot4rst to it's bare essentials and the attached zotcite.py is the result. That looks like the essence. Most of the code in zot4rst, as you saw, deals with interacting with the docutils system and generating output. What zotcite does is this: For two Zotero Items, it prints their Bibliogrpahic entries and their Citation Reference, in Text format using Chicago-Author-Date style. I believe a commandline interface could be built around this file along the following lines. (Will you be interested in building this interface for us?) $ zotcite --style chicago --format text --items I1, I2 --print biblio $ zotcite --style chicago --format text --items I1, I2 --print citeref Once this is done, Emacs/Org can do invoke zotcite and get the required Bibliographic definitions and references using shell-command. I’ve adapted your script into a command line program, now included with zotero-plain. The options are slightly different, and --format does not work yet, but the essence is there. Of course it requires the user to have python, etc. installed, but it is probably easier than rewriting everything in emacs lisp. The assumption is that Emacs/Org somehow has captured zotero keys through org-protocol or org-zotero.el or someother means. Here is a output from zotcite.py. […] IIRC, I made two changes to the export.js in your Javascript backend. 1. I had trouble understanding the organization of citation clusters. So I modified getCitationBlock as below. Note the use of true as a second param of the appendCitationCluster. This is OK as registerItemIds already does updateItems(). Thanks for catching this. That might speed things up a bit. […] 2. There should be way to set the output format form python side of things. I had to modify instantiateCiteProc by hand to set the output format to text. You know what output format that LibreOffice plugin uses? I see text, html and rtf as output formats. But not ODT. See https://bitbucket.org/fbennett/citeproc-js/src/tip/src/formats.js Sure, this would be easy. I don’t know how the LibreOffice plugin works. It doesn’t take much code, however, to translate the HTML output into something else. […] Btw, I found that with my 2-day old zotero database and for printing the above 2 keys, the whole machinery takes a perceivably a lot of time. Is this your experience as well? I am not a netbook. Yes, it is slow for me too. I wish it were faster. I don’t know if the issue is jsbridge, or something else. Ideally I would prefer to simply fetch citations information (as JSON, for instance) from Zotero and process in an embedded citeproc-js instance. best, Erik Sent from my free software system http://fsf.org/.
Re: [O] zotero plain, org-odt, and citations in general
At Sat, 12 Nov 2011 02:43:12 +0530, Jambunathan K wrote: Erik […] Here is what I find: If I put the below snippet in a javascript buffer and do a M-x send-region, I am able to retrieve the library and key of the selected item. […] The problem is in zotero-js-write-to-file. The problem happens even after I increase the sleep out time to 1 sec. See the attached backtrace with With M-x toggle-debug-on-quit RET and a C-g I wonder whether the issue is related to we - Matt(?), Christian(?) and I - using Windows. As can be seen from the transaction log, the shell interaction is fine. I am inclined to think that it has something to do with zotero.el. I am wondering whether there is a way to capture the selected item as a zotero link through the jsbridge interface. Anyways with massaging of org-protocol we can get a zotero select link by viewing the report of the current item. Hi, Thanks for all the info. It appears that the file is not being created by Zotero, but I cannot figure why. I can’t really pursue this much, since I am unable to reproduce. If anybody has any thoughts, I would love to hear them! best, Erik Sent from my free software system http://fsf.org/.