Re: [O] Table calculation
Fantastic. Thanks Michael. Michael Brand writes: > Hi Brett > > On Sat, Feb 20, 2016 at 8:41 PM, Brett Presnell > wrote: > >> In the following table, the last row gives the number of empty cells >> following the last nonempty cell in each column (except the first column >> of course). I would like to create a TBLFM formula that does this >> calculation for me automatically. Some time ago I tried using >> org-lookup-last and org-lookup-all for this, but I never got it to work. >> Any ideas/solutions? >> >> | Date | AA | BB | CC | DD | EE | FF | GG | HH | II | JJ | KK | LL | MM | >> |+++++++++++++| >> | / | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | >> | 201005 ||||| 1 ||| 1 |||| 1 || >> | 201008 |||| 1 |||||||||| >> | 201012 |||||||||||||| >> | 201105 |||||| 1 |||||||| >> | 201108 ||||||| 1 ||||||| >> | 201112 |||||||||| 1 |||| >> | 201205 |||||||||||||| >> | 201208 |||||||||||||| >> | 201212 ||||||||| 1 ||||| >> | 201305 ||| 1 ||||| 2 ||| 1 ||| >> | 201308 | 1 ||||||||||||| >> | 201312 ||||||||||||| 1 | >> | 201405 |||||||| 1 |||| 1 || >> | 201408 || 1 |||||||||||| >> | 201412 ||||| 1 ||||||||| >> | 201505 |||| 1 |||||||||| >> | 201508 ||||||||| 1 ||||| >> | 201512 ||||||| 1 ||||||| >> | 201605 |||||||||||||| >> |+++++++++++++| >> || 8 | 5 | 9 | 3 | 4 | 15 | 1 | 6 | 2 | 13 | 9 | 6 | 7 | > > Two of the possible solutions: > > | Date | AA | BB | CC | DD | EE | FF | GG | HH | II | JJ | KK | LL | MM | > | / | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | > |+++++++++++++| > | 201005 ||||| 1 ||| 1 |||| 1 || > | 201008 |||| 1 |||||||||| > | 201012 |||||||||||||| > | 201105 |||||| 1 |||||||| > | 201108 ||||||| 1 ||||||| > | 201112 |||||||||| 1 |||| > | 201205 |||||||||||||| > | 201208 |||||||||||||| > | 201212 ||||||||| 1 ||||| > | 201305 ||| 1 ||||| 2 ||| 1 ||| > | 201308 | 1 ||||||||||||| > | 201312 ||||||||||||| 1 | > | 201405 |||||||| 1 |||| 1 || > | 201408 || 1 |||||||||||| > | 201412 ||||| 1 ||||||||| > | 201505 |||| 1 |||||||||| > | 201508 ||||||||| 1 ||||| > | 201512 ||||||| 1 ||||||| > | 201605 |||||||||||||| > |+++++++++++++| > || 8 | 5 | 9 | 3 | 4 | 15 | 1 | 6 | 2 | 13 | 9 | 6 | 7 | > #+TBLFM: @>$<<..@>$> = find(rev(@I..@II), 1) - 1; E > > Note that I moved the header separator line. > > When the last non-empty cell is not limited to be always 1 it gets a > bit more complicated: > > #+TBLFM: @>$<<..@>$> = '(position-if-not (lambda (x) (equal x "")) > (reverse '(@I..@II))); E > > Michael
Re: [O] Table calculation
Hi Brett On Sat, Feb 20, 2016 at 8:41 PM, Brett Presnell wrote: > In the following table, the last row gives the number of empty cells > following the last nonempty cell in each column (except the first column > of course). I would like to create a TBLFM formula that does this > calculation for me automatically. Some time ago I tried using > org-lookup-last and org-lookup-all for this, but I never got it to work. > Any ideas/solutions? > > | Date | AA | BB | CC | DD | EE | FF | GG | HH | II | JJ | KK | LL | MM | > |+++++++++++++| > | / | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | > | 201005 ||||| 1 ||| 1 |||| 1 || > | 201008 |||| 1 |||||||||| > | 201012 |||||||||||||| > | 201105 |||||| 1 |||||||| > | 201108 ||||||| 1 ||||||| > | 201112 |||||||||| 1 |||| > | 201205 |||||||||||||| > | 201208 |||||||||||||| > | 201212 ||||||||| 1 ||||| > | 201305 ||| 1 ||||| 2 ||| 1 ||| > | 201308 | 1 ||||||||||||| > | 201312 ||||||||||||| 1 | > | 201405 |||||||| 1 |||| 1 || > | 201408 || 1 |||||||||||| > | 201412 ||||| 1 ||||||||| > | 201505 |||| 1 |||||||||| > | 201508 ||||||||| 1 ||||| > | 201512 ||||||| 1 ||||||| > | 201605 |||||||||||||| > |+++++++++++++| > || 8 | 5 | 9 | 3 | 4 | 15 | 1 | 6 | 2 | 13 | 9 | 6 | 7 | Two of the possible solutions: | Date | AA | BB | CC | DD | EE | FF | GG | HH | II | JJ | KK | LL | MM | | / | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | |+++++++++++++| | 201005 ||||| 1 ||| 1 |||| 1 || | 201008 |||| 1 |||||||||| | 201012 |||||||||||||| | 201105 |||||| 1 |||||||| | 201108 ||||||| 1 ||||||| | 201112 |||||||||| 1 |||| | 201205 |||||||||||||| | 201208 |||||||||||||| | 201212 ||||||||| 1 ||||| | 201305 ||| 1 ||||| 2 ||| 1 ||| | 201308 | 1 ||||||||||||| | 201312 ||||||||||||| 1 | | 201405 |||||||| 1 |||| 1 || | 201408 || 1 |||||||||||| | 201412 ||||| 1 ||||||||| | 201505 |||| 1 |||||||||| | 201508 ||||||||| 1 ||||| | 201512 ||||||| 1 ||||||| | 201605 |||||||||||||| |+++++++++++++| || 8 | 5 | 9 | 3 | 4 | 15 | 1 | 6 | 2 | 13 | 9 | 6 | 7 | #+TBLFM: @>$<<..@>$> = find(rev(@I..@II), 1) - 1; E Note that I moved the header separator line. When the last non-empty cell is not limited to be always 1 it gets a bit more complicated: #+TBLFM: @>$<<..@>$> = '(position-if-not (lambda (x) (equal x "")) (reverse '(@I..@II))); E Michael
[O] Table calculation
In the following table, the last row gives the number of empty cells following the last nonempty cell in each column (except the first column of course). I would like to create a TBLFM formula that does this calculation for me automatically. Some time ago I tried using org-lookup-last and org-lookup-all for this, but I never got it to work. Any ideas/solutions? | Date | AA | BB | CC | DD | EE | FF | GG | HH | II | JJ | KK | LL | MM | |+++++++++++++| | / | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | <> | | 201005 ||||| 1 ||| 1 |||| 1 || | 201008 |||| 1 |||||||||| | 201012 |||||||||||||| | 201105 |||||| 1 |||||||| | 201108 ||||||| 1 ||||||| | 201112 |||||||||| 1 |||| | 201205 |||||||||||||| | 201208 |||||||||||||| | 201212 ||||||||| 1 ||||| | 201305 ||| 1 ||||| 2 ||| 1 ||| | 201308 | 1 ||||||||||||| | 201312 ||||||||||||| 1 | | 201405 |||||||| 1 |||| 1 || | 201408 || 1 |||||||||||| | 201412 ||||| 1 ||||||||| | 201505 |||| 1 |||||||||| | 201508 ||||||||| 1 ||||| | 201512 ||||||| 1 ||||||| | 201605 |||||||||||||| |+++++++++++++| || 8 | 5 | 9 | 3 | 4 | 15 | 1 | 6 | 2 | 13 | 9 | 6 | 7 |
Re: [O] "atomic knowledge" modeling tool
Hi, Nicolas Goaziou writes: > Samuel Loury writes: > >> Nevertheless, org-mode is rather slow when my todo.org file becomes >> quite large (~20K lines). > > Could you share some profiler information under typical usage so that we > can tell which parts are slow? I have made a custom agenda command¹ to implement a "kind of" GTD workflow. On a quite old computer with no SSD disk, the commands takes about 20 seconds. My org files sum up to 27K lines and 2629 headings (with the archives, there are 5630 headings in 66K lines). I attached the result of elp-instrument-package "org-" when running this command without the archives. I don't know if that helps... My best :-). org-agenda-redo 1 18.523051518.5230515 org-agenda-run-series 1 13.822207838 13.822207838 org-let2 4 10.361238463 2.5903096157 org-agenda-get-day-entries245 7.8211318620 0.0319229871 org-todo-list 1 4.242655788 4.242655788 org-agenda-list 2 3.819318714 1.909659357 org-agenda-get-todos 35 3.592892502 0.1026540714 org-let 2 3.446571314 1.723285657 org-agenda-goto 580 2.7936375289 0.0048166164 org-tags-view 1 2.299200757 2.299200757 org-scan-tags 35 2.293939894 0.0655411398 org-agenda-prepare-buffers6 2.200799137 0.3667998561 org-agenda-get-sexps 70 2.0172191590 0.0288174165 org-diary-sexp-entry 9 2.0077601339 0.2230844593 org-outline-level 9910 1.9457936820 0.0001963464 org-agenda-prepare5 1.9130132399 0.3826026479 org-diary 3 1.769465726 0.5898219086 org-agenda-skip-eval 3124 1.6885327159 0.0005405034 org-get-tags-at 2746 1.6866494770 0.0006142204 org-agenda-skip 2126 1.5673435740 0.0007372265 org-agenda-finalize 5 1.534251945 0.306850389 org-agenda-mode 1 1.256090736 1.256090736 org-agenda-get-deadlines 210 1.2349923170 0.0058809157 org-up-heading-safe 3295 1.0934742469 0.0003318586 org-back-to-heading 14062 1.0211351570 7.261...e-05 org-agenda-to-appt2 0.860954804 0.430477402 org-end-of-subtree1746 0.8471089869 0.0004851712 org-agenda-finalize-entries 4 0.636714557 0.1591786392 org-refresh-properties420 0.5715409850 0.0013608118 org-get-entries-from-diary1 0.461614148 0.461614148 org-agenda-get-timestamps 210 0.4608280769 0.0021944194 org-agenda-get-scheduled 210 0.4060911670 0.0019337674 org-agenda-align-tags 1 0.381108939 0.381108939 org-agenda-highlight-todo 829 0.3807340809 0.0004592690 org-get-todo-state2071 0.3624726299 0.0001750229 org-refresh-effort-properties 210 0.3425058340 0.0016309801 org-flag-heading 1173 0.2918298459 0.0002487892 org-activate-plain-links 363 0.269716567 0.0007430208 org-refresh-stats-properties 210 0.236244147 0.0011249721 org-refresh-property 264 0.2290685090 0.0008676837 org-show-context 580 0.2155166490 0.0003715804 org-is-habit-p163 0.176636081 0.0010836569 org-entry-get
Re: [O] get current headline?
Hi, Matt Price writes: > I feel like I should know how to do this -- how od I retrieve the current > headline as an org-element object? > > context: I want to take a headline like this > > ** Jane Doe > - demonstrates an understanding of research topic :: yes > - Annotated Bibliography :: very nicely done > - Grammar and Spelling :: no major problems, but see inline comments > - Further Comments :: see file > - Grade :: A > > And set the headline's "GRADE" property to the value of the "- Grade ::" > line. But, I want to make sure that I'm still in the current headline when > I set the property (rather than accidentally navigating to the next > headline, because the current headline doesn't contain a "- Grade ::" lin). > > Tanks as always for the help! I'm pretty sure I've asked this question > before but can't find the answer... Would this do what you want? (save-excursion (org-back-to-heading) (org-element-at-point)) If you have a more sophisticated parse tree you could use org-element-lineage. Rasmus -- Don't slow down Johnny, leave the Cadillac runnin'
Re: [O] Errors get suppressed by org-babel-execute-src-block
Nicolas Goaziou writes: > Hello, > > Aaron Ecay writes: > >> I’ve tested, and remote execution seems to work (when tramp works for >> me, which it does not do consistently – a known problem) > > Thank you. > > IMO, it looks good. You might as well push it and wait for more > feedback, if needed. > > Regards, I did some testing as well and it seems to work. -- Nick
Re: [O] Errors get suppressed by org-babel-execute-src-block
Hello, Aaron Ecay writes: > I’ve tested, and remote execution seems to work (when tramp works for > me, which it does not do consistently – a known problem) Thank you. IMO, it looks good. You might as well push it and wait for more feedback, if needed. Regards, -- Nicolas Goaziou
Re: [O] Auto-delete dated DONE notifications?
Hello, Sharon Kimble writes: > I recently had to dive into the guts of a habit which I've been using > since June 2015, I know that because there were all the 1-line DONE > dated notifications! Is there anyway in which they can be auto-deleted > after a cut-off number, say '60' please? AFAICT, this is not possible yet. I think this would be a nice addition to Org. We could add an option that can limit the number of state change notes in an entry. WDYT? Do you want to give a try at it? Regards, -- Nicolas Goaziou
Re: [O] Icalendar export and contacts
Hello, Simon Thum writes: > would the attached patch be enough? Thank you. I do not maintain org-contact.el, tho. > +;; Add the link type supported by org-contacts-strip-link > +;; so everything is in order for its use in Org files > +(org-add-link-type "tel") This means that no export function is defined for "tel" links. Is it the intended behaviour? Regards, -- Nicolas Goaziou
Re: [O] resuming an interrupted org-publish to ftp
Hello, Julien Cubizolles writes: > I have a huge number of files to publish to a ftp server (I had to > reexport them after an Org upgrade) and org-publish fails because the > ftp server closes the connection before the *whole* transfer is > done. And it seems that in this case none of the timestamps used to > control which file has to be uploaded are updated. So I have to start > the whole upload again, it fails again... > > Shouldn't org-publish update the timestamps after each successful upload > of a file, and not wait for the end of the whole upload ? Isn't it the case already? ;; Allow chain of publishing functions. (dolist (f publishing-function) (when (org-publish-needed-p filename pub-dir f tmp-pub-dir base-dir) (let ((output (funcall f project-plist filename tmp-pub-dir))) (org-publish-update-timestamp filename pub-dir f base-dir) (run-hook-with-args 'org-publish-after-publishing-hook filename output Regards, -- Nicolas Goaziou
[O] bibliography style under ox-pandoc + org-ref to export docx
How to config the bibliography style under ox-pandoc + org-ref to export docx? I can not find citeproc in melpa. Thank you! Junxiang