Re: [O] Babel-R TBLFM example
Yes, it works. Thanks, Sebastien. Shiyuan On Mon, Aug 25, 2014 at 12:51 AM, Sebastien Vauban sva-n...@mygooglest.com wrote: Shiyuan wrote: I am looking at a simpler example, the pie-chart example as in this link: http://orgmode.org/worg/org-contrib/babel/intro.html#literate-programming This example(src code attached in the end) first generates a table by a shell command and then run a R one-liner which uses the table. However, when the R code is evaluated, I got an error about the object dirs not found. This is what I got in the buffer running R: --- options(STERM='iESS', str.dendrogram.last=', editor='emacsclient', show.error.locations=TRUE) Error in pie(dirs[, 1], labels = dirs[, 2]) (from test-org-babe-meta-programming.org@24170fIx#1) : object 'dirs' not found --- It looks like that the conversion is wrong. When I run `org-babel-expand-src-block` on the R source code, I don't see the R object dirs is expanded to anything. I don't understand how the conversion works, and how Babel passes the table to R. Any explanation is appreciated. Which function/file should I look at? Are there working examples for passing a table to R? Thanks. #+name: directories #+begin_src shell :results replace cd ~ du -sc * |grep -v total #+end_src #+RESULTS: directories | 8 | #*message*-20140319-231047# | | 1168376 | Documents | | 9952288 | Downloads | | 8 | xmodmap2~ | #+name: directory-pie-chart(dirs = directories) #+begin_src R :session R-pie-example :file ~/tmp/dirs.png pie(dirs[,1], labels = dirs[,2]) #+end_src AFAICT, the arguments to code blocks may not be defined and set in the `name' line anymore: this must be done on the `begin_src' line. So, the following should work: #+name: directory-pie-chart #+begin_src R :var dirs=directories :session R-pie-example :file ~/tmp/dirs.png pie(dirs[,1], labels = dirs[,2]) #+end_src Best regards, Seb -- Sebastien Vauban
Re: [O] Babel-R TBLFM example
Aloha all, AFAICT, the arguments to code blocks may not be defined and set in the `name' line anymore: this must be done on the `begin_src' line. or, on a separate #+header: line. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Babel-R TBLFM example
Thomas S. Dye wrote: Aloha all, AFAICT, the arguments to code blocks may not be defined and set in the `name' line anymore: this must be done on the `begin_src' line. or, on a separate #+header: line. Indeed. I tend to forget to use that; thanks for mentioning it! Best regards, Seb -- Sebastien Vauban
[O] [PATCH] Make use of the constant `org-clock-string' whenever possible
Hi, I would like to submit a tiny patch to make use of `org-clock-string' instead of the hard coded value CLOCK: whenever possible. I also found out that :CLOCK: was hard coded in `org-insert-property-drawer' (git sha 67ae102b4be87976240555d1c0d80ee55906f53c, file lisp/org.el:15897) instead of using `org-clock-drawer-start-re' but I did not have time to fix this one. Please find the patch attached to this mail. From 8eedb019d277f7f1e8baa6641244ddf7e298d397 Mon Sep 17 00:00:00 2001 From: Konubinix konubi...@gmail.com Date: Tue, 26 Aug 2014 09:11:23 +0200 Subject: [PATCH] Make use of the constant `org-clock-string' whenever possible Instead of the hardcoded value CLOCK:. * lisp/org-clock.el (org-find-open-clocks) * lisp/org.el (org-clone-subtree-with-time-shift) * lisp/org.el (org-insert-property-drawer) * lisp/org.el (org-at-clock-log-p) TINYCHANGE --- lisp/org-clock.el | 2 +- lisp/org.el | 14 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 179d395..14b613e 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -799,7 +799,7 @@ If CLOCK-SOUND is non-nil, it overrides `org-clock-sound'. (with-current-buffer buf (save-excursion (goto-char (point-min)) - (while (re-search-forward CLOCK: \\(\\[.*?\\]\\)$ nil t) + (while (re-search-forward (concat org-clock-string \\(\\[.*?\\]\\)$) nil t) (push (cons (copy-marker (match-end 1) t) (org-time-string-to-time (match-string 1))) clocks clocks)) diff --git a/lisp/org.el b/lisp/org.el index 750b9d1..4559280 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -8698,7 +8698,8 @@ and still retain the repeater to cover future instances of the task. (org-entry-delete nil ID) (org-id-get-create t))) (unless (= n 0) - (while (re-search-forward ^[ \t]*CLOCK:.*$ nil t) + (while (re-search-forward + (format ^[ \t]*%s.*$ org-clock-string) nil t) (kill-whole-line)) (goto-char (point-min)) (while (re-search-forward drawer-re nil t) @@ -15891,8 +15892,12 @@ formats in the current buffer. (setq hiddenp (outline-invisible-p)) (end-of-line 1) (and (equal (char-after) ?\n) (forward-char 1)) -(while (looking-at ^[ \t]*\\(:CLOCK:\\|:LOGBOOK:\\|CLOCK:\\|:END:\\)) - (if (member (match-string 1) '(CLOCK: :END:)) +(while (looking-at + (format + ^[ \t]*\\(:CLOCK:\\|:LOGBOOK:\\|%s\\|:END:\\) + org-clock-string)) + (if (member (match-string 1) + (list org-clock-string :END:)) ;; just skip this line (beginning-of-line 2) ;; Drawer start, find the end @@ -17589,7 +17594,8 @@ With prefix ARG, change that many days. Is the cursor on the clock log line? (save-excursion (move-beginning-of-line 1) -(looking-at ^[ \t]*CLOCK:))) +(looking-at + (concat ^[ \t]* org-clock-string (defvar org-clock-history) ; defined in org-clock.el (defvar org-clock-adjust-closest nil) ; defined in org-clock.el -- 2.1.0.rc1 -- Samuel pgpWJH_PMqqkl.pgp Description: PGP signature
Re: [O] HTML lists are including paragraphs (lip…/p/li)
El Mon, 25 Aug 2014 10:30:27 +0200 Nicolas Goaziou va escriure: But why not, as a general rule, avoid p for the first elements of lists? That is, don't output paragraph+list+paragraph, but text+list+paragraph. This works for the simple case (litext/li) and allows the complex ones (litextpaa/pol/olwhatever/whatever/li). This was the original behaviour, which was, apparently, unsatisfactory. See http://article.gmane.org/gmane.emacs.orgmode/87898 Ok, let's keep the complex cases possible, but the simple ones simple. So: - litext/li and litextul//li if there's only 1 text or sublist or text+sublist - li[normal flow including p,ol,ul,blockquote,…]/li in the rest. This includes lip/p//li, lip/ol/p//li, liolp//li, lip/p/ol//li
Re: [O] HTML lists are including paragraphs (lip…/p/li)
Daniel Clemente n142...@gmail.com writes: Ok, let's keep the complex cases possible, but the simple ones simple. So: - litext/li and litextul//li if there's only 1 text or sublist or text+sublist - li[normal flow including p,ol,ul,blockquote,…]/li in the rest. This includes lip/p//li, lip/ol/p//li, liolp//li, lip/p/ol//li Fair enough. This is now implemented in master. Please report if it isn't working as expected. Thank you. Regards, -- Nicolas Goaziou
Re: [O] make orgtbl-ascii-plot easier to install
Hello, Thierry Banel tbanelweb...@free.fr writes: Sorry for the late answer, I was on the road. The patch is attached hereafter. Thank you for the patch. Some comments follow. From 5fddaba2208c2cb4ce3b6bc24d0d10571124fb39 Mon Sep 17 00:00:00 2001 From: Thierry Banel tbanelweb...@free.fr Date: Mon, 11 Aug 2014 00:00:21 +0200 Subject: [PATCH] * org-table.el: add ascii plotting in tables, (orgtbl-ascii-plot): top-level function (orgtbl-ascii-draw), (orgtbl-uc-draw-grid), (orgtbl-uc-draw-cont): helper functions which go in table If they are helper functions, I suggest to use -- in their name, e.g., `orgbtl--ascii-draw'. +(defun orgtbl-ascii-draw (value min max optional width characters) + Draws an ascii bar in a table. +VALUE is a the value to plot, the width of the bar to draw. +A value equal to MIN will be displayed as empty (zero width bar). +A value equal to MAX will draw a bar filling all the WIDTH. +WIDTH is the expected width in characters of the column. +CHARACTERS is a string of characters that will compose the bar, This is a minor issue, but a string of characters sounds strange: aren't all strings constituted of characters? Maybe you really want a list of characters. +with shades of grey from pure white to pure black. +It defaults to a 10 characters string of regular ascii characters. + Spurious newline at the end of the docstring. + (unless characters (setq characters .:;c!lhVHW)) + (unless width (setq width 12)) I suggest let-binding variables instead: (let ((characters (or characters .:;c!lhvHW)) (width (or width 12 + (if (stringp value) + (setq value (string-to-number value))) Prefer `and' or `when' over one-armed `if'. Also, this may be dangerous since `string-to-number' can return funny values. Why wouldn't you simply forbid strings and limit VALUE to integers. + (setq value (* (/ (- (+ value 0.0) min) (- max min)) width)) (let ((value ...))) + (cond + (( value 0) too small) + (( value width) too large) + (t +(let ((len (1- (length characters + (concat + (make-string (floor value) (elt characters len)) + (string (elt characters + (floor (* (- value (floor value)) len) + +(defun orgtbl-uc-draw-grid (value min max optional width) + Draws an ascii bar in a table. +It is a variant of orgtbl-ascii-draw with Unicode block characters, +for a smooth display. +Bars appear as grids (to the extend the font allows). + Spurious newline. I wouldn't put the last sentence on its own line, too. Also, isn't it extent? +(defun orgtbl-uc-draw-cont (value min max optional width) + Draws an ascii bar in a table. +It is a variant of orgtbl-ascii-draw with Unicode block characters, +for a smooth display. +Bars are solid (to the extend the font allows). + Ditto. + (orgtbl-ascii-draw value min max width \u258F\u258E\u258D\u258C\u258B\u258A\u2589\u2588)) + +;;;###autoload +(defun orgtbl-ascii-plot (optional ask) + Draws an ascii bars plot in a column, out of values found in another column. +A numeric prefix may be given to override the default 12 characters wide plot. + You must refer explicitly to ASK in your docstring. In particular, you may want to detail the distinction between '(4) and 4. Spurious newline too. + (interactive P) + (let ((col (org-table-current-column)) + (min 1e999) `most-positive-fixnum' + (max -1e999) `most-negative-fixnum' + (length 12) + (table (org-table-to-lisp))) +(cond ((consp ask) +(setq length + (or + (read-string Length of column [12] nil nil 12) + 12))) + ((numberp ask) +(setq length ask))) (let ((length (cond ((consp ask) (read-number Length of column [12] nil nil 12)) ((numberp ask) ask) (t 12) +(mapc Small nitpick: I suggest to use `dolist' instead of `mapc' (no funcall overhead). + (lambda (x) + (when (consp x) + (setq x (nth (1- col) x)) + (when (string-match + ^[-+]?\\([0-9]*[.]\\)?[0-9]*\\([eE][+-]?[0-9]+\\)?$ + x) Would `org-table-number-regexp' make sense here instead of the hard-coded regexp? +(setq x (string-to-number x)) +(if ( min x) (setq min x)) +(if ( max x) (setq max x) (when ( min x) ...) (when ( max x)) + (or (memq 'hline table) table)) ;; skip table header if any This check is not sufficient in the following cases: |---| | no header | |---| and |--| | header | |--| | contents | IOW, you need to eliminate the leading 'hline, if any, and skip until the next 'hline if there is one and if there is something after it. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Make use of the constant `org-clock-string' whenever possible
Hello, Samuel Loury konubi...@gmail.com writes: I would like to submit a tiny patch to make use of `org-clock-string' instead of the hard coded value CLOCK: whenever possible. Thank you. Some comments follow. From 8eedb019d277f7f1e8baa6641244ddf7e298d397 Mon Sep 17 00:00:00 2001 From: Konubinix konubi...@gmail.com Date: Tue, 26 Aug 2014 09:11:23 +0200 Subject: [PATCH] Make use of the constant `org-clock-string' whenever possible Instead of the hardcoded value CLOCK:. * lisp/org-clock.el (org-find-open-clocks) * lisp/org.el (org-clone-subtree-with-time-shift) * lisp/org.el (org-insert-property-drawer) * lisp/org.el (org-at-clock-log-p) The commit message looks strange. What about [PATCH] Use `org-clock-string' whenever possible * lisp/org-clock.el (org-find-open-clocks): * lisp/org.el (org-clone-subtree-with-time-shift, org-insert-property-drawer, org-at-clock-log-p): Use `org-clock-string' whenever possible instead of hardcoded CLOCK. TINYCHANGE Since you signed FSF papers, you don't need to add TINYCHANGE anymore. - (while (re-search-forward CLOCK: \\(\\[.*?\\]\\)$ nil t) + (while (re-search-forward (concat org-clock-string \\(\\[.*?\\]\\)$) nil t) You are building a new string before each search, which is sub-optimal. (let ((re (concat org-clock-string \\(\\[.*?\\]\\)$))) (while (re-search-forward re nil t) ...)) - (while (re-search-forward ^[ \t]*CLOCK:.*$ nil t) + (while (re-search-forward + (format ^[ \t]*%s.*$ org-clock-string) nil t) Ditto. -(while (looking-at ^[ \t]*\\(:CLOCK:\\|:LOGBOOK:\\|CLOCK:\\|:END:\\)) - (if (member (match-string 1) '(CLOCK: :END:)) +(while (looking-at + (format + ^[ \t]*\\(:CLOCK:\\|:LOGBOOK:\\|%s\\|:END:\\) + org-clock-string)) Ditto. + (if (member (match-string 1) + (list org-clock-string :END:)) -(looking-at ^[ \t]*CLOCK:))) You are building a new list each time. +(looking-at + (concat ^[ \t]* org-clock-string See above. Anyway this would benefit from a rewrite using org-element.el (*Hint*) but that's a much bigger task. Regards, -- Nicolas Goaziou
[O] [BUG] ox-gfm.el tries to treat boxquotes as tables
Hi List, when exporting to github markdown, ox-gfm.el tries to treat the content of boxquotes as table, not a good idea (look at the README of https://github.com/tj64/org-bandbook). ,[ C-h f org-bandbook-make-bandbook RET ] | org-bandbook-make-bandbook is an interactive Lisp function in | `org-bandbook.el'. | | It is bound to C-c b m. | | (org-bandbook-make-bandbook) | | Create bandbook for current project. ` Its probably just matching the one | at the beginning of line and concludes it looks at a table. -- cheers, Thorsten
Re: [O] utf8x and org-mode 8 (Sebastien Vauban)
Daniel Szmulewicz wrote: Sebastien Vauban wrote: AFAICT, when using the `utf8' option to `inputenc' (and not `utf8x' which should be avoided, as it uses `ucs' which is no longer maintained), we have 2 solutions to support the UTF-8 non-breaking space: - Convert it in Org mode, when exporting (via a filter) #+begin_src emacs-lisp ;; filter for non-breaking spaces (defun leuven--latex-filter-nbsp (text backend info) Convert non-breaking spaces when exporting to LaTeX/Beamer. (when (memq backend '(latex beamer)) (replace-regexp-in-string ? ~ text))) (add-to-list 'org-export-filter-plain-text-functions 'leuven--latex-filter-nbsp) #+end_src - or Convert it in LaTeX: #+begin_src emacs-lisp :tangle no ;; convert `nbsp' to its LaTeX equivalent (add-to-list 'org-latex-packages-alist (concat \\ifdefined\\DeclareUnicodeCharacter{ \\DeclareUnicodeCharacter{00A0}{~} }\\fi) t) #+end_src I think that the first one is better, though its problem is that, being done by a filter (hence, on the user-side), sharing an Org file is not easy anymore (without sharing the filter to be added to the personal .emacs file). Awesome. Thank you, Sebastien. I prefer the second solution, because it allows me to account for different kinds of spaces: espace fine, espace insécable, espace moyenne, etc. Just for curiosity: I’m not sure what to make of the regexp. The ‘?’ is normally a postfix operator used in conjunction with other characters, isn’t it? As it is, it seems to target question marks instead of blank spaces. What am I missing? It seems to be a character encoding problem: it was supposed to be a real nbsp char (00A0, IIRC). It's clearly NOT intended to be a ?. I don't know how this got badly converted in these posts. Best regards, Seb -- Sebastien Vauban
[O] [RFC] Beautiful LaTeX for Org sources and Agenda info?
Hi List, When creating an Org-Bandbook PDF, one can include - lilypond scores - song arrangements as plantuml activities which both produce beautiful output. But other possible chapters are - tasks and timeline (agenda files and their timeline) - funds (ledger reports) - people (kind of org-contacts) and their looks is not really impressive in the PDF. I wish I could just create taskjuggler charts and reports for the tasks, but unfortunately taskjuggler3 only creates html reports currently, and I don't know of a way to embed these into LaTeX docs (if you heard of one, let me know please). So the 3 latter chapters are basically exported headlines, property drawers, planning info and example blocks. The output looks really *plain*, with typewriter fonts etc. Exporting such org-sources to html gives beautiful pages thanks to CSS, does somebody have customizations that produce beautiful latex too? How do you export your org-contacts file to latex? How do you export Agenda files or Agenda buffers (e.g. the Agenda timeline buffer looks quite nice in Emacs, but not so when put in a quote-block and exported to latex.)? Any hints would be welcome. -- cheers, Thorsten
[O] prioritizing and categorizing items in checklist
I probably either messed the formatting of my list up or tried to do something emacs-orgmode can't yet handle. If I have formatting problems could someone look this list over and let me know how to fix them? cut here. #+TAGS @TODO @DONE #+LastUpdate: [2014-08-26 Tue] * :CATEGORY:@Clotheing: ** [#A] [X] replace 4 undershirts, :DONE: ** [#A] [x] get shoehorn, :done: ** [#B] [ ] get mittens and winter coat when available,:todo: ** [#A] [ ] get four pair compression socks, * :CATEGORY:@hygiene: ** [#A] [/] pick up tool for gums from Dr. Serici's office was left there at end of appointment and they don't stock those at KMart. :done: ** [#A] [/] get mouth wash,:done: ** [#B] [ ] get floss :todo: * :CATEGORY:@food: ** DONE [#B] [x ] get snacks for when I don't get to soda socials, ** [#A] [ ] get restaurant phone numbers that will deliver added to Iphone, * :CATEGORY:@technology: ** [#A] [ ] get external serial modem from staples (backup for hughesnet), ** [#A] [ ] get flat screen monitor for computer, ** [#A] [ ] get small am/fm radio for top of computer to listen to fm signals emitted by computer for when sighted assistance isn't available, ** [#A] [ ] At Apple Store find how many charges remain on Iphone 4s battery and get replacement cost for battery, ** [#A] [ ] start return process for obsolete apple computer, ** [#A] [ ] Replace obsolete Apple computer maybe with Ipad, ** [#A] [ ] November 2014 - get straight talk for Iphone, ** [#B] [ ] replace talking watch, ** [#B] [ ] get ac adapter for shortwave set from RadioShack, ** [#A] [ ] get flat screen monitor for computer, ** [#A] get small am/fm radio to listen to fm signals given off by computer and learn meaning of signals, ** [#A] [ ] get 2 replacement hard drives, ** [#A] [ ] Recurring check availability of any faster internet providers in area that don't throttle data, * :CATEGORY:@Retirement: ** [#A] [ ] find out from Dan what the correct Pennsylvania Withholding percentage is for federal retirees living in Pennsylvania; no withholding has yet been arranged for Pennsylvania. ** [#A] [ ] do social security card replacement paper work, ** [#A] [ ] get two pieces of mail addressed to me at current address without sticky labels, ** [#A] [ ] take social security card and two pieces of mail to d.m.v. and get Pennsylvania state id, ** [#A] [ ] November 2014 - evaluate 2015 healthcare plans, ** [#A] [ ] November 2014 - choose and change healthcare plans, ** [#B] [ ] Set up provisional budget with Jill, *** [#B] [ ] Prepare financials for Dan, ** [#B] [ ] Find out if Dan is aware of Ed Slot and his material, ** [#B] [ ] Ask Dan for advice on best disposition of MetLife policy containing I.R.A. ** [#B] [ ] Optimize tax avoidance for future, ** [#C] [ ] Prepare and file 2014 tax forms Maryland, Pennsylvania, and Federal, ** [#C] [ ] Set up working budget based on work done with Dan and Jill, * :CATEGORY:@Maintenance: ** TODO [#A] [ ] have computer cleaned out dust and fur burn motherboards, ** TODO [#A] [ ] check all hard drives for warranty expiration dates and label hard drives with expiration dates, jude jdash...@shellworld.net
Re: [O] [PATCH] Make use of the constant `org-clock-string' whenever possible
Hi, Thank you for the comments, I will try to improve the commit as soon as possible. About org-element.el, I would be happy to try. I guess the best documentation is the file itself (it appears to be quite well commented). Is it a good way to start? -- Konubinix GPG Key: 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A pgpPo5Rcun9_x.pgp Description: PGP signature
Re: [O] prioritizing and categorizing items in checklist
Jude DaShiell jdash...@shellworld.net writes: ** [#A] [X] replace 4 undershirts, :DONE: Can headlines contain checkboxes? I thought they are plain-list syntax. -- cheers, Thorsten
[O] Triggering clock in/out from org state change and progress logging
Hi list, as part of learning org I'm trying to configure it so that state changes trigger clocking in/out tasks. Why testing workflow is: #+TODO: TODO(t) STRT(s!) PAUS(p!) WAIT(w!) | DONE(d!) CANC(c!) What I try to accomplish: * entering STRT pauses the active task (if any) and clocks-in the current task. * entering PAUS or WAIT clocks-out the current task (if clocking the current task). * entering TODO probably should reset the current task but I don't care at that point. Changing state and clocking in/out works great but logging is weird: * Tasks ** STRT first task - State STRT from TODO [2014-08-26 dt 12:27] :20: CLOCK: [2014-08-26 dt 12:27] :END: ** TODO second task Now I change second task from TODO to STRT: * Tasks ** PAUS first task - State PAUS from STRT [2014-08-26 dt 12:28] - State STRT from TODO [2014-08-26 dt 12:27] :20: CLOCK: [2014-08-26 dt 12:27]--[2014-08-26 dt 12:28] = 0:01 :END: ** STRT second task :20: CLOCK: [2014-08-26 dt 12:28] :END: first taks gets paused and second task is started and clocking but no logging State 'STRT' from 'TODO' ... is added to second task. Starting a task only logs in the other task. After 6 hours struggling with that (clocked with org :) ) I can't figure why that's happening. Any clue? Thanks in advance Here's the code: (defvar arv/org-todo-entering-state-clocking-actions '((STRT . start) (PAUS . stop) (WAIT . stop))) (defvar arv/org-todo-state-change-triggers-clocking-enabled t) (defvar arv/org-todo-paused-state PAUS) (defun arv/org-todo--pause-other-task () (when (org-clock-is-active) (save-excursion (org-clock-goto) (org-clock-out) (let ((arv/org-todo-state-change-triggers-clocking-enabled nil)) ; avoid recursion (org-todo arv/org-todo-paused-state) (defun arv/org-todo--state-change (from to) (when (and arv/org-todo-state-change-triggers-clocking-enabled (not (string= from to))) (let ((action (cdr (assoc to arv/org-todo-entering-state-clocking-actions (unless (null action) (cond ((eq action 'start) (arv/org-todo--pause-other-task) (org-clock-in)) ((eq action 'stop) (let ((org-state DONE) ; hackish, review (org-clock-out-when-done t)) (org-clock-out-if-current))) (t (user-error Unknown action.))) (defun arv/org-todo--state-change-trigger (p) (let ((type (plist-get p :type)) (from (plist-get p :from)) (to (plist-get p :to))) (when (eq type 'todo-state-change) (arv/org-todo--state-change from to (add-hook 'org-trigger-hook 'arv/org-todo--state-change-trigger)
Re: [O] [BUG] Export option ^:{} does not work inside tags
Thorsten Jolitz tjol...@gmail.com writes: Nicolas Goaziou m...@nicolasgoaziou.fr writes: Nevertheless, as you noticed, _ should be always escaped. I fixed it in master (as the fix introduces some incompatible changes). Thank you for reporting it. hmm, I updated (make update) after your fix, and I do see your commit in the git history: , | 2f359a6 * | ox-latex: Protect special characters in tags ` #+BEGIN_SRC emacs-lisp (call-interactively 'org-version) #+END_SRC #+results: : Org-mode version 8.3beta (release_8.3beta-265-g7cf7e4 @ /usr/share/emacs/24.3/lisp/org/lisp/) but I still see the very same problem, in my real world use case as well as in the MWE. Maybe not yet fixed? Its fixed, sorry for the noise, today it works correctly, seems that after the update the old version was still loaded. -- cheers, Thorsten
Re: [O] [BUG] ox-gfm.el tries to treat boxquotes as tables
Hello, Thorsten Jolitz tjol...@gmail.com writes: when exporting to github markdown, ox-gfm.el tries to treat the content of boxquotes as table, not a good idea (look at the README of https://github.com/tj64/org-bandbook). ,[ C-h f org-bandbook-make-bandbook RET ] | org-bandbook-make-bandbook is an interactive Lisp function in | `org-bandbook.el'. | | It is bound to C-c b m. | | (org-bandbook-make-bandbook) | | Create bandbook for current project. ` Its probably just matching the one | at the beginning of line and concludes it looks at a table. This is correct. Last column needs not to be closed to be a valid table (e.g. TAB after |-- will complete it). You may want to enclose your boxquotes within some environment that cannot contain tables, e.g. verse or example. Regards, -- Nicolas Goaziou
Re: [O] [BUG] ox-gfm.el tries to treat boxquotes as tables
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Hello, Thorsten Jolitz tjol...@gmail.com writes: when exporting to github markdown, ox-gfm.el tries to treat the content of boxquotes as table, not a good idea (look at the README of https://github.com/tj64/org-bandbook). ,[ C-h f org-bandbook-make-bandbook RET ] | org-bandbook-make-bandbook is an interactive Lisp function in | `org-bandbook.el'. | | It is bound to C-c b m. | | (org-bandbook-make-bandbook) | | Create bandbook for current project. ` Its probably just matching the one | at the beginning of line and concludes it looks at a table. This is correct. Last column needs not to be closed to be a valid table (e.g. TAB after |-- will complete it). You may want to enclose your boxquotes within some environment that cannot contain tables, e.g. verse or example. I see, makes sense, thanks! -- cheers, Thorsten
Re: [O] Marks not visible in column view
Hi, I forgot to mention I am using Emacs 24.2.1 on Windows. Cheers, Gonzalo On 22/08/2014 10:00 PM, Gonzalo Camarillo wrote: Hi, in the agenda we can mark several entries for bulk processing. In the following example, the second and third agenda entries are marked. To indicate they are marked, a '' symbol is shown right before them: Projects: TODO Write the document Projects: TODO Call Bob Projects: TODO Arrange meeting with Laura Now, if we enter column view, those marks are not visible. For example, the following column view shows the title, the TODO keyword, and the estimated effort for all entries: Write the document | TODO | 0:30 | Call Bob | TODO | 0:15 | Arrange meeting with Laura | TODO | 0:10 | Is it possible to have the column view show which entries are marked? Thanks, Gonzalo
[O] Problem with org-mobile can't see task.org only agenda view
I really have a big problem. I have GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17 on MARVIN Now i am able to see the agenda view of my task.org on mobile-org. But I Can't see my task.org file on mobile-org for android... Only the agenda view. This is my index file : https://www.dropbox.com/s/kw68jprrfv5hunz/index.org?dl=0 -- Posté par Steve Prud'Homme sprud...@gmail.com 514 466-3951
Re: [O] Proboem org-mobile-push
I resolved the problem by cleaning errors in my .emac file. 2014-08-25 20:39 GMT-04:00 Steve Prud'Homme sprud...@gmail.com: I have a file named task.org, i want to push this file to mobile-org / dropbox. When I do M-x org-mobile-push i have this message Non-existent agenda file ~/Dropbox/PROJETS/ORG/LOCAL/| /__ 20140521| | 1:19 | | |. [R]emove from list or [A]bort? What can i do to resolve that issue ? -- Posté par Steve Prud'Homme sprud...@gmail.com 514 466-3951 -- Posté par Steve Prud'Homme sprud...@gmail.com 514 466-3951
Re: [O] Marks not visible in column view
Hi, I forgot to mention I am using Emacs 24.2.1 on Windows. Cheers, Gonzalo On 22/08/2014 10:00 PM, Gonzalo Camarillo wrote: Hi, in the agenda we can mark several entries for bulk processing. In the following example, the second and third agenda entries are marked. To indicate they are marked, a '' symbol is shown right before them: Projects: TODO Write the document Projects: TODO Call Bob Projects: TODO Arrange meeting with Laura Now, if we enter column view, those marks are not visible. For example, the following column view shows the title, the TODO keyword, and the estimated effort for all entries: Write the document | TODO | 0:30 | Call Bob | TODO | 0:15 | Arrange meeting with Laura | TODO | 0:10 | Is it possible to have the column view show which entries are marked? Thanks, Gonzalo
[O] TAGS /
Hi, i have a list of tag that i use with orgmode with the shortcut c-c c-c. I have a lot of tag and behind one of this tag their is this : \201 How can i enter this with my keyboard ? Thanks a lot -- Posté par Steve Prud'Homme sprud...@gmail.com
[O] Bug: Cannot set header-args :includes with multiple includes [8.2.7 (8.2.7-4-g880362-elpa @ /home/will/.emacs.d/elpa/org-20140616/)]
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. I believe the :includes header argument is incorrectly parsing lists of includes for c++. This snippet: #+BEGIN_SRC C++ :includes cstdio iostream using namespace std; printf(Hello ); cout world; #+END_SRC produces a compiler error: warning: extra tokens at end of #include directive #include cstdio iostream Then, of course printf and cout are undeclared. It looks like the include is just throwing all the includes onto one line when they should be broken up and each put on their own line. Emacs : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2) of 2014-06-06 on barber, modified by Debian Package: Org-mode version 8.2.7 (8.2.7-4-g880362-elpa @ /home/will/.emacs.d/elpa/org-20140616/) current state: == (setq org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-html-format-drawer-function '(lambda (name contents) contents) org-log-done t org-latex-format-inlinetask-function 'ignore org-confirm-shell-link-function 'yes-or-no-p org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-latex-format-headline-function 'org-latex-format-headline-default-function org-after-todo-state-change-hook '(org-clock-out-if-current) org-latex-format-drawer-function '(lambda (name contents) contents) org-from-is-user-regexp \\William Everett\\ org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(org-journal-update-auto-mode-alist #[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-ascii-format-drawer-function '(lambda (name contents width) contents) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-enforce-todo-dependencies t org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-journal-dir ~/Journal/ org-archive-location ~/projects/Archived/%s_archive:: org-use-property-inheritance t org-deadline-warning-days 3 org-babel-tangle-lang-exts '((latex . tex) (python . py) (C++ . cpp) (awk . awk) (emacs-lisp . el)) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-log-into-drawer t org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) org-html-format-headline-function 'ignore org-babel-load-languages '((awk . t) (C . t) (sh . t) (python . t) (latex . t) (makefile \.t)) org-src-preserve-indentation t org-html-format-inlinetask-function 'ignore org-agenda-files '(/home/will/projects/local /home/will/projects) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-confirm-babel-evaluate nil )
Re: [O] prioritizing and categorizing items in checklist
I may be wrong here, but I believe you are conflating plain lists and headlines Plain lists may include checkboxes and start with '-' - [ ] list item one - [ ] list item two - [X] list item two.one Etc. Headlines may get priorities and start with '*{1,}' * TODO [#A] headline one * TODO [#B] headline two ** WORK [#A] headline two.one Etc. I don't think you can include priorities in list items nor checkboxes in list items. Lists are supposed to be a 'lightweight' version of TODO headlines. They can, however, be mixed like this, where each headline has it's own separate list underneath it. * TODO [#A] headline one - [ ] list item one - [ ] list item two - [ ] list item two.one * WORK [#B] headline two - [X] list item one - [/] list item two - [X] list item two.one - [ ] list item two.two ** TODO [#A] headline two.one - [ ] list item one - [ ] list item two Etc. -Original Message- From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org [mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On Behalf Of Jude DaShiell Sent: Tuesday, August 26, 2014 2:36 AM To: emacs-orgmode@gnu.org Subject: [O] prioritizing and categorizing items in checklist I probably either messed the formatting of my list up or tried to do something emacs-orgmode can't yet handle. If I have formatting problems could someone look this list over and let me know how to fix them? cut here. #+TAGS @TODO @DONE #+LastUpdate: [2014-08-26 Tue] * :CATEGORY:@Clotheing: ** [#A] [X] replace 4 undershirts, :DONE: ** [#A] [x] get shoehorn,:done: ** [#B] [ ] get mittens and winter coat when available, :todo: ** [#A] [ ] get four pair compression socks, * :CATEGORY:@hygiene: ** [#A] [/] pick up tool for gums from Dr. Serici's office was left there at end of appointment and they don't stock those at KMart. :done: ** [#A] [/] get mouth wash, :done: ** [#B] [ ] get floss:todo: * :CATEGORY:@food: ** DONE [#B] [x ] get snacks for when I don't get to soda socials, ** [#A] [ ] get restaurant phone numbers that will deliver added to Iphone, * :CATEGORY:@technology: ** [#A] [ ] get external serial modem from staples (backup for hughesnet), ** [#A] [ ] get flat screen monitor for computer, ** [#A] [ ] get small am/fm radio for top of computer to listen to fm signals emitted by computer for when sighted assistance isn't available, ** [#A] [ ] At Apple Store find how many charges remain on Iphone 4s battery and get replacement cost for battery, ** [#A] [ ] start return process for obsolete apple computer, ** [#A] [ ] Replace obsolete Apple computer maybe with Ipad, ** [#A] [ ] November 2014 - get straight talk for Iphone, ** [#B] [ ] replace talking watch, ** [#B] [ ] get ac adapter for shortwave set from RadioShack, ** [#A] [ ] get flat screen monitor for computer, ** [#A] get small am/fm radio to listen to fm signals given off by computer and learn meaning of signals, ** [#A] [ ] get 2 replacement hard drives, ** [#A] [ ] Recurring check availability of any faster internet providers in area that don't throttle data, * :CATEGORY:@Retirement: ** [#A] [ ] find out from Dan what the correct Pennsylvania Withholding percentage is for federal retirees living in Pennsylvania; no withholding has yet been arranged for Pennsylvania. ** [#A] [ ] do social security card replacement paper work, ** [#A] [ ] get two pieces of mail addressed to me at current address without sticky labels, ** [#A] [ ] take social security card and two pieces of mail to d.m.v. and get Pennsylvania state id, ** [#A] [ ] November 2014 - evaluate 2015 healthcare plans, ** [#A] [ ] November 2014 - choose and change healthcare plans, ** [#B] [ ] Set up provisional budget with Jill, *** [#B] [ ] Prepare financials for Dan, ** [#B] [ ] Find out if Dan is aware of Ed Slot and his material, ** [#B] [ ] Ask Dan for advice on best disposition of MetLife policy containing I.R.A. ** [#B] [ ] Optimize tax avoidance for future, ** [#C] [ ] Prepare and file 2014 tax forms Maryland, Pennsylvania, and Federal, ** [#C] [ ] Set up working budget based on work done with Dan and Jill, * :CATEGORY:@Maintenance: ** TODO [#A] [ ] have computer cleaned out dust and fur burn motherboards, ** TODO [#A] [ ] check all hard drives for warranty expiration dates and label hard drives with expiration dates, jude jdash...@shellworld.net This message is intended for the sole use of the individual and entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone
Re: [O] contribute: three pane mode for org
Hi, this sounds interesting but I have just tried to use it and I get: : if: Symbol's value as variable is void: org-panes-list I can send a backtrace if you wish. Maybe I am not using this properly? All I tried was M-x org-panes RET after loading the file. thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-246-g77d0da
[O] Bug?/performance issue in org-icalendar-export-current-agenda
Hi all, I pulled from master recently (for the first time since the spring), and since the update, I have noticed a performance/lockup issue. The problem occurs when exporting an agenda view to iCalendar format. My Emacs version is 23.4.1 and my Org version is 8.3beta (I am currently on commit 767895...) I have traced the problem down to a call to `org-icalendar-export-current-agenda', though I don't know if the problem is in this function or in another function called by it. Somewhere during the execution of this function, Emacs goes to 100% CPU usage (on one core) and memory usage starts growing until I kill the process. Here's what my setup looks like. I have just one entry in `org-agenda-custom-commands' that defines the files field. It looks like: (Z Export to iCalendar file tags +event|+appointment nil (~/Documents/website/public_html/lib/attachments/calendar.ics) I normally only call this command via a cron job that exports my agenda files to .ics, which until recently was working fine. But I have noticed I can reproduce the lockup interactively by building an agenda view with this command, and then calling `org-icalendar-export-current-agenda' on it (which is also what happens, a few steps down the call chain, during the cron job). I have run some tests by manually setting org-agenda-files, then building this agenda and eval'ing (org-icalendar-export-current-agenda /tmp/agenda.ics) in the agenda buffer. The results: 1) Using just a simple three-entry test file, the export completes quickly and I don't see the lockup. 2) Using an agenda file which contains plenty of real data (about 1000 lines) but no headlines tagged event or appointment (i.e., a file for which this agenda view is empty), the call to `org-icalendar-export-current-agenda' takes about 5 seconds to complete, even though there are no entries to export. During those 5 seconds, the Emacs process goes to 100% CPU usage. 3) Using a different agenda file (of about 4000 lines) which contains about 75 matching headlines, the call to `org-icalendar-export-current-agenda' does not complete within several minutes, during which time I see 100% CPU usage and rapid memory usage growth. So it looks to me like maybe some part of the export process uses exponentially more time and memory, depending on the input, since a minimal test case does not produce the problem. What's the next step for debugging this? Please let me know if I can provide more information. Thanks! -- Best, Richard
Re: [O] Bug?/performance issue in org-icalendar-export-current-agenda
El mar, 26 ago 2014, Richard Lawrence decía: Hi all, I pulled from master recently (for the first time since the spring), and since the update, I have noticed a performance/lockup issue. The problem occurs when exporting an agenda view to iCalendar format. My Emacs version is 23.4.1 and my Org version is 8.3beta (I am currently on commit 767895...) I have traced the problem down to a call to `org-icalendar-export-current-agenda', though I don't know if the problem is in this function or in another function called by it. Somewhere during the execution of this function, Emacs goes to 100% CPU usage (on one core) and memory usage starts growing until I kill the process. Here's what my setup looks like. I have just one entry in `org-agenda-custom-commands' that defines the files field. It looks like: (Z Export to iCalendar file tags +event|+appointment nil (~/Documents/website/public_html/lib/attachments/calendar.ics) I normally only call this command via a cron job that exports my agenda files to .ics, which until recently was working fine. But I have noticed I can reproduce the lockup interactively by building an agenda view with this command, and then calling `org-icalendar-export-current-agenda' on it (which is also what happens, a few steps down the call chain, during the cron job). I have run some tests by manually setting org-agenda-files, then building this agenda and eval'ing (org-icalendar-export-current-agenda /tmp/agenda.ics) in the agenda buffer. The results: 1) Using just a simple three-entry test file, the export completes quickly and I don't see the lockup. 2) Using an agenda file which contains plenty of real data (about 1000 lines) but no headlines tagged event or appointment (i.e., a file for which this agenda view is empty), the call to `org-icalendar-export-current-agenda' takes about 5 seconds to complete, even though there are no entries to export. During those 5 seconds, the Emacs process goes to 100% CPU usage. 3) Using a different agenda file (of about 4000 lines) which contains about 75 matching headlines, the call to `org-icalendar-export-current-agenda' does not complete within several minutes, during which time I see 100% CPU usage and rapid memory usage growth. So it looks to me like maybe some part of the export process uses exponentially more time and memory, depending on the input, since a minimal test case does not produce the problem. What's the next step for debugging this? Please let me know if I can provide more information. Thanks! -- Best, Richard I use a bash script: =agenda-ascii= [0] to reduce the list of file to export, first =grep= current =year-month= pattern in the *.org files: #+BEGIN_EXAMPLE ORG_FILES=$($GREP -l $YEAR-$MONTH *.org) echo $ORG_FILES if [ $EXPORT_ICS = TRUE ] then for AGENDA in $(echo $ORG_FILES) do echo EXPORT $AGENDA ... ARCHIVO=$DIR/$AGENDA $EMACS --batch -q --directory=${DIR} --visit=${ARCHIVO} --eval '(org-export-icalendar-this-file)' /dev/null 21 done fi #+END_EXAMPLE Actually the process, cosume 42%-97% CPU, for 526 appoinments, takes 0m 30.396s Org-mode version 8.3beta (release_8.3beta-264-g7a5f3f GNU Emacs 24.3.1 (x86_64-pc-linux-gnu) of 2014-06-06 on barber, modified by Debian [0] https://github.com/osiris/org-bash-utils/blob/master/agenda-ascii -- :: Osiris Alejandro Gomez (OSiUX) os...@osiux.com.ar DC44 95D2 0D5D D544 FC1A F00F B308 A671 9237 D36C http://www.osiux.com.ar http://www.altermundi.net signature.asc Description: Digital signature
[O] dropping the debian version
This has been probably been asked many times before but auntie google can't find it if so. I've just updated my git clone of org-mode to its version '409913b253de2de1b49f9468a4b77b9292e090c4' from 'ORIG_HEAD' and I've done --8---cut here---start-8--- M-x org-version --8---cut here---end---8--- which now shows ╭ │Org-mode version 8.2.6 (release_8.2.6-1 @ /usr/local/share/emacs/24.3.93/lisp/org/) ╰ How do I drop the debian version and stick with the git version please? I have this as part of my init file. --8---cut here---start-8--- ;;; -*- emacs-lisp-mode -*- --- init file ;;; mine from 27-11-13. Heavily influenced by http://www.aaronbedra.com/emacs.d/ ;; Show errors in this file: (setq debug-on-error t debug-on-signal nil debug-on-quit nil) (setq load-path (cons /home/boudiccas/.emacs.d/lisp load-path)) (add-to-list 'load-path /home/boudiccas/git/org-mode/lisp load-path) (require 'org-install) (add-to-list 'load-path /home/boudiccas/git/org-mode/contrib/lisp load-path) --8---cut here---end---8--- Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots TGmeds = http://www.tgmeds.org.uk Debian testing, fluxbox 1.3.5, emacs 24.3.93.1 signature.asc Description: PGP signature
Re: [O] contribute: three pane mode for org
On Tuesday, 26 Aug 2014 at 19:37, Florian Knupfer wrote: Hi eric, sry I was profiling and optimizing a bit the code and haven't noticed, that this variable was only in my emacs session defined. It is now fixed and much less cpu-consuming. Thanks! It does work now. And it seems to work quite well. I need to play with some of the variables but I can see myself getting used to having this. Sort of an org specific multi-level speedbar. It's particularly useful on my very wide monitor where much of the space is wasted often... Thanks again, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-246-g77d0da
Re: [O] dropping the debian version
On Tuesday, 26 Aug 2014 at 19:40, Sharon Kimble wrote: This has been probably been asked many times before but auntie google can't find it if so. It has been asked many times. :) I've just updated my git clone of org-mode to its version '409913b253de2de1b49f9468a4b77b9292e090c4' from 'ORIG_HEAD' and I've done M-x org-version which now shows ╭ │Org-mode version 8.2.6 (release_8.2.6-1 @ /usr/local/share/emacs/24.3.93/lisp/org/) ╰ How do I drop the debian version and stick with the git version please? I have pretty much what you have: #+begin_src emacs-lisp (add-to-list 'load-path ~/git/org-mode/lisp) (add-to-list 'load-path ~/git/org-mode/contrib/lisp/) (require 'org) #+end_src and this works fine. These lines come before anything that may reference org in any way, mind you. -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-246-g77d0da
Re: [O] Bug?/performance issue in org-icalendar-export-current-agenda
Hello, Richard Lawrence richard.lawre...@berkeley.edu writes: I pulled from master recently (for the first time since the spring), and since the update, I have noticed a performance/lockup issue. The problem occurs when exporting an agenda view to iCalendar format. My Emacs version is 23.4.1 and my Org version is 8.3beta (I am currently on commit 767895...) I have traced the problem down to a call to `org-icalendar-export-current-agenda', though I don't know if the problem is in this function or in another function called by it. Somewhere during the execution of this function, Emacs goes to 100% CPU usage (on one core) and memory usage starts growing until I kill the process. Interestingly, I introduced a patch that should speed up this function yesterday. You may want to update Org (the patch landed after 767895) and try again. If it is still suspiciously slow, please use profiler (`profiler-start') and report the results here. Regards, -- Nicolas Goaziou
[O] Worg Tutorial error: using Emacs lisp as formulas
Hi! I was fascinated to work through the examples provided in the org-tutorials sections under Worg and really see the power of using eLisp as spreadsheet formula: http://orgmode.org/worg/org-tutorials/org-spreadsheet-lisp-formulas.html However the use of the mapconcat function always generated an error: Invalid regex Regular expression too big, even with only a few terms in the formula. The offending formula was: #+TBLFM: @2$3='(mapconcat 'identity (delete-dups (list @2$1..@$1 @2$2..@$2)) ) I experimented with variations of the formula getting the same error every time. I did a search of the org-mode forum without finding any solution. Any thoughts? Regard
[O] Parsing org-mode files
Dear list members, I would like to automatically parse the org-mode files within emacs and was wondering if somebody already had done something similar. My idea is to create objects (for example, one object for every **-entry, with attributes that cover the tags, and also one attribute that covers the body of the entry). In that way I would like to add things like comparing two org-mode files on a structural basis, and also add some further intelligence. Before I start writing something like this from scratch, I was wondering if anybody had done something similar or if perhaps hooks already exist within org-mode that I could use. Best regards, Steffen
Re: [O] dropping the debian version
Sharon Kimble writes: How do I drop the debian version and stick with the git version please? make up2 (setq load-path (cons /home/boudiccas/.emacs.d/lisp load-path)) You shouldn't need this unless you really have some stuff in there that's just for you. I'd suggest moving those things to site-lisp if possible (which is already in load-path and therefore doesn't need any gymnastics). (add-to-list 'load-path /home/boudiccas/git/org-mode/lisp load-path) (require 'org-install) (add-to-list 'load-path /home/boudiccas/git/org-mode/contrib/lisp load-path) Drop this, too. Do add (require 'org-loaddefs) instead since at least the standard Debian Emacs is too old to work without it. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables
Re: [O] Parsing org-mode files
Steffen, you should probably have a look at org-element.el which parses org files and creates data structures along the lines of what you will need. HTH, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-246-g77d0da
Re: [O] make orgtbl-ascii-plot easier to install
Thanks Nicolas for your valuable insight. I will apply your recommendations. Le 26/08/2014 10:29, Nicolas Goaziou a écrit : (orgtbl-ascii-plot): top-level function (orgtbl-ascii-draw), (orgtbl-uc-draw-grid), (orgtbl-uc-draw-cont): helper functions which go in table If they are helper functions, I suggest to use "--" in their name, e.g., `orgbtl--ascii-draw'. Well, all those functions have user-visibility. They appear in the #+TBLFM: line. I should avoid the words "helper function" here. +CHARACTERS is a string of characters that will compose the bar, This is a minor issue, but a "string of characters" sounds strange: aren't all strings constituted of characters? Maybe you really want a list of characters. Yes :) Just string. + (unless characters (setq characters " .:;c!lhVHW")) + (unless width (setq width 12)) I suggest let-binding variables instead: (let ((characters (or characters " .:;c!lhvHW")) (width (or width 12 I'll change to let-binding. What is the rational for that ? Better byte-code ? + (if (stringp value) + (setq value (string-to-number value))) Prefer `and' or `when' over one-armed `if'. Also, this may be dangerous since `string-to-number' can return funny values. Why wouldn't you simply forbid strings and limit VALUE to integers. Can I limit VALUE to numbers ? VALUE comes from a cell in the table. The formula line of the table looks like this: #+TBLFM: $2='(orgtbl-ascii-draw $1 1 3 12) VALUE is $1 in this formula. If (string-to-number VALUE) fails, it will return zero, which is not very harmful. But yes, you are right, it would be better to check funny values, and explicitly do something sensible in this case. + (orgtbl-ascii-draw value min max width " \u258F\u258E\u258D\u258C\u258B\u258A\u2589\u2588")) + +;;;###autoload +(defun orgtbl-ascii-plot (optional ask) + "Draws an ascii bars plot in a column, out of values found in another column. +A numeric prefix may be given to override the default 12 characters wide plot. +" You must refer explicitly to ASK in your docstring. In particular, you may want to detail the distinction between '(4) and 4. Absolutely. + (interactive "P") + (let ((col (org-table-current-column)) + (min 1e999) `most-positive-fixnum' Actually this should be `cl-most-positive-float', because everything here works in floating point values. Thanks for the clue. + (length 12) + (table (org-table-to-lisp))) +(cond ((consp ask) + (setq length + (or + (read-string "Length of column [12] " nil nil 12) + 12))) + ((numberp ask) + (setq length ask))) (let ((length (cond ((consp ask) (read-number "Length of column [12] " nil nil 12)) ((numberp ask) ask) (t 12) Ok, shorter. +(mapc Small nitpick: I suggest to use `dolist' instead of `mapc' (no funcall overhead). Sure, easier to read. + (lambda (x) + (when (consp x) + (setq x (nth (1- col) x)) + (when (string-match + "^[-+]?\\([0-9]*[.]\\)?[0-9]*\\([eE][+-]?[0-9]+\\)?$" + x) Would `org-table-number-regexp' make sense here instead of the hard-coded regexp? Before hard-coding this regexp, I took a look at what was already there. org-table-number-regexp matches too much, for instance it matches: "345" "345()" "345%45" "0x45" // hexadecimal "1101#2" // base two Anyway, the string feeds (string-to-number x) which does not accept all those variations. So I created a regexp exactly fitted for (string-to-number). + (or (memq 'hline table) table)) ;; skip table header if any This check is not sufficient in the following cases: |---| | no header | |---| and |--| | header | |--| | contents | IOW, you need to eliminate the leading 'hline, if any,and skip until the next 'hline if there is one and if there is something after it. Ok. Not completely fool-proof, but better. On the other hand, this loop searches for the min and the max of a column, ignoring entries which are not numbers. So it could just iterate over the full column, including any kind of headers. | header | -- ignored || -- ignored | 1 | -- used
Re: [O] Bug?/performance issue in org-icalendar-export-current-agenda
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Interestingly, I introduced a patch that should speed up this function yesterday. You may want to update Org (the patch landed after 767895) and try again. Indeed! I just pulled again and the problem is gone. The export runs much more reasonably now, completing in a few seconds even with all my agenda files in the mix. Thanks! Best, Richard
Re: [O] make orgtbl-ascii-plot easier to install
Thierry Banel tbanelweb...@free.fr writes: I'll change to let-binding. What is the rational for that ? Better byte-code ? This is faster, indeed. Also, the scope of the binding is explicit. It is sometimes hard to tell where the value of a setq'ed variable comes from. Can I limit VALUE to numbers ? VALUE comes from a cell in the table. The formula line of the table looks like this: #+TBLFM: $2='(orgtbl-ascii-draw $1 1 3 12) VALUE is $1 in this formula. If (string-to-number VALUE) fails, it will return zero, which is not very harmful. Nevermind then. Actually this should be `cl-most-positive-float', because everything here works in floating point values. Thanks for the clue. Oh, right. Then, I wouldn't bother in this case. Org supports Emacs 23 and cl-lib is not easily available. Small nitpick: I suggest to use `dolist' instead of `mapc' (no funcall overhead). Sure, easier to read. This is also kinda like let vs setq. Before hard-coding this regexp, I took a look at what was already there. org-table-number-regexp matches too much, for instance it matches: 345 345() 345%45 0x45 // hexadecimal 1101#2 // base two Anyway, the string feeds (string-to-number x) which does not accept all those variations. So I created a regexp exactly fitted for (string-to-number). OK. IOW, you need to eliminate the leading 'hline, if any,and skip until the next 'hline if there is one and if there is something after it. Ok. Not completely fool-proof, but better. Do you think of another case that wouldn't be covered by this? On the other hand, this loop searches for the min and the max of a column, ignoring entries which are not numbers. So it could just iterate over the full column, including any kind of headers. | header | -- ignored || -- ignored | 1 | -- used (will set min=1) | 2 | -- used | xx | -- ignored | 3 | -- used (will set max=3) || -- ignored But header and the rest of the column may be both numbers but expressed in different units, e.g. header could be a year and column inhabitants. FWIW, I think skipping header (when there is one) is a good idea. Regards, -- Nicolas Goaziou
Re: [O] dropping the debian version
Sharon, Sharon Kimble wrote: This has been probably been asked many times before but auntie google can't find it if so. I've just updated my git clone of org-mode to its version '409913b253de2de1b49f9468a4b77b9292e090c4' from 'ORIG_HEAD' and I've done --8---cut here---start-8--- M-x org-version --8---cut here---end---8--- which now shows ╭ │Org-mode version 8.2.6 (release_8.2.6-1 @ /usr/local/share/emacs/24.3.93/lisp/org/) ╰ How do I drop the debian version and stick with the git version please? I have this as part of my init file. --8---cut here---start-8--- ;;; -*- emacs-lisp-mode -*- --- init file ;;; mine from 27-11-13. Heavily influenced by http://www.aaronbedra.com/emacs.d/ ;; Show errors in this file: (setq debug-on-error t debug-on-signal nil debug-on-quit nil) (setq load-path (cons /home/boudiccas/.emacs.d/lisp load-path)) (add-to-list 'load-path /home/boudiccas/git/org-mode/lisp load-path) (require 'org-install) (add-to-list 'load-path /home/boudiccas/git/org-mode/contrib/lisp load-path) --8---cut here---end---8--- Thanks Sharon. Pretty much what Eric and Achim have already siad. I run make update2 each morning; the most recent org mode is in my /home/directory/.elisp and my .emacs.d/init.el loads it via (add-to-list 'load-path /home/directory/.elisp/org-mode/lisp) (add-to-list 'load-path /home/directory/.elisp/org-mode/contrib/lisp/) Essentially I copied it from section 1.2 of the manual. Charlie Millar --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Re: [O] make orgtbl-ascii-plot easier to install
Le 26/08/2014 22:27, Nicolas Goaziou a écrit : Thierry Banel tbanelweb...@free.fr writes: I'll change to let-binding. What is the rational for that ? Better byte-code ? This is faster, indeed. Also, the scope of the binding is explicit. It is sometimes hard to tell where the value of a setq'ed variable comes from. Good ! Actually this should be `cl-most-positive-float', because everything here works in floating point values. Thanks for the clue. Oh, right. Then, I wouldn't bother in this case. Org supports Emacs 23 and cl-lib is not easily available. Small nitpick: I suggest to use `dolist' instead of `mapc' (no funcall overhead). Sure, easier to read. This is also kinda like let vs setq. Do you recommend to stay away from CL CL-LIB for ORG stuff ? `DOLIST' comes from CL as well... IOW, you need to eliminate the leading 'hline, if any,and skip until the next 'hline if there is one and if there is something after it. Ok. Not completely fool-proof, but better. Do you think of another case that wouldn't be covered by this? 1st case: a header and several hlines. In this case, values 1,2,3 will be ignored. | header | || -- leading hline: skipped | 1 | | 2 | | 3 | || -- next hline: ignore whatever is before | 4 | | 5 | | 6 | 2nd case: no header at all, values in boxes. Values 1,2,3 will be ignored as well. || -- leading hline: skipped | 1 | | 2 | | 3 | || -- next hline: ignore whatever is before | 4 | | 5 | | 6 | || -- last hline On the other hand, this loop searches for the min and the max of a column, ignoring entries which are not numbers. So it could just iterate over the full column, including any kind of headers. | header | -- ignored || -- ignored | 1 | -- used (will set min=1) | 2 | -- used | xx | -- ignored | 3 | -- used (will set max=3) || -- ignored But header and the rest of the column may be both numbers but expressed in different units, e.g. header could be a year and column inhabitants. FWIW, I think skipping header (when there is one) is a good idea. Good use-case ! Now I am not sure what to do anymore. There is already a heuristic algorithm in org-table to apply column-formulas. It does a good job at avoiding computing the formula for headers. Maybe I should mimic it. Header surrounded by hlines: |+| | Header | | -- formula not applied |+| | 1 | 10 | -- $1*10 | 2 | 20 | -- $1*10 |+| | 3 | 30 | -- $1*10 | 4 | 40 | -- $1*10 #+TBLFM: $2=$1*10 Header over several lines, no top-hline: | Head1 | | -- formula not applied | Head2 | | -- formula not applied |---+| | 3 | 30 | -- $1*10 | 4 | 40 | -- $1*10 #+TBLFM: $2=$1*10 No header, just values | 3 | 30 | -- $1*10 | 4 | 40 | -- $1*10 #+TBLFM: $2=$1*10 The only ill-interpreted case is this one, with no header. The first values are considered as headers: |---+| | 3 | | -- formula not applied | 4 | | -- formula not applied |---+| | 5 | 50 | | 6 | 60 | |---+| #+TBLFM: $2=$1*10 Thanks for all this feedback. Thierry
Re: [O] dropping the debian version
Eric S Fraga e.fr...@ucl.ac.uk writes: On Tuesday, 26 Aug 2014 at 19:40, Sharon Kimble wrote: This has been probably been asked many times before but auntie google can't find it if so. It has been asked many times. :) I've just updated my git clone of org-mode to its version '409913b253de2de1b49f9468a4b77b9292e090c4' from 'ORIG_HEAD' and I've done M-x org-version which now shows ╭ │Org-mode version 8.2.6 (release_8.2.6-1 @ /usr/local/share/emacs/24.3.93/lisp/org/) ╰ How do I drop the debian version and stick with the git version please? I have pretty much what you have: #+begin_src emacs-lisp (add-to-list 'load-path ~/git/org-mode/lisp) (add-to-list 'load-path ~/git/org-mode/contrib/lisp/) (require 'org) #+end_src and this works fine. These lines come before anything that may reference org in any way, mind you. Thanks for this Eric. I've now set up my init with your little stanza in, evaluated it, restarted org-mode and did version on it. And its showing - ╭ │Org-mode version 8.2.7c (release_8.2.7c-53-g409913 @ /home/boudiccas/git/org-mode/lisp/) ╰ Hooray! Result! Thanks :) Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots TGmeds = http://www.tgmeds.org.uk Debian testing, fluxbox 1.3.5, emacs 24.3.93.1 signature.asc Description: PGP signature
Re: [O] make orgtbl-ascii-plot easier to install
Thierry Banel tbanelweb...@free.fr writes: Do you recommend to stay away from CL CL-LIB for ORG stuff ? `DOLIST' comes from CL as well... Actually, `dolist' is a macro from subr.el, which is then shadowed by `cl-dolist', so there's no problem here. BTW, you can use macros from cl (cl-lib doesn't exist in Emacs 23), not so functions. IOW, you need to eliminate the leading 'hline, if any,and skip until the next 'hline if there is one and if there is something after it. Ok. Not completely fool-proof, but better. Do you think of another case that wouldn't be covered by this? 1st case: a header and several hlines. In this case, values 1,2,3 will be ignored. | header | || -- leading hline: skipped | 1 | | 2 | | 3 | || -- next hline: ignore whatever is before | 4 | | 5 | | 6 | I wasn't clear. A leading hline is when the very first row is a hline (or worse consecutive hlines start the table). In the example above, there is no such leading hline, so you don't eliminate it. Therefore, only header will be skipped. 2nd case: no header at all, values in boxes. Values 1,2,3 will be ignored as well. || -- leading hline: skipped | 1 | | 2 | | 3 | || -- next hline: ignore whatever is before | 4 | | 5 | | 6 | || -- last hline There is a header. By definition, anything in the first column group is a header. There is no limitations on the number of rows involved. It may be a bit surprising, but this is consistent with the rest of Org. The only ill-interpreted case is this one, with no header. The first values are considered as headers: |---+| | 3 | | -- formula not applied | 4 | | -- formula not applied |---+| | 5 | 50 | | 6 | 60 | |---+| #+TBLFM: $2=$1*10 See above. Regards, -- Nicolas Goaziou
Re: [O] dropping the debian version
Achim Gratz strom...@nexgo.de writes: Sharon Kimble writes: How do I drop the debian version and stick with the git version please? make up2 I'm sorry Achim, but what do you mean by that? (setq load-path (cons /home/boudiccas/.emacs.d/lisp load-path)) You shouldn't need this unless you really have some stuff in there that's just for you. I'd suggest moving those things to site-lisp if possible (which is already in load-path and therefore doesn't need any gymnastics). 'site-lisp'? Where’s that then please? Its not in the org-mode that comes with the git output, and I don't have one in my bog-standard emacs in my /home directory at ~/.emacs.d/ (add-to-list 'load-path /home/boudiccas/git/org-mode/lisp load-path) (require 'org-install) (add-to-list 'load-path /home/boudiccas/git/org-mode/contrib/lisp load-path) Drop this, too. Do add (require 'org-loaddefs) instead since at least the standard Debian Emacs is too old to work without it. Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots TGmeds = http://www.tgmeds.org.uk Debian testing, fluxbox 1.3.5, emacs 24.3.93.1 signature.asc Description: PGP signature
Re: [O] make orgtbl-ascii-plot easier to install
Everything is clear now. Thanks Nicolas for those guidelines. Regards, Thierry Le 27/08/2014 00:09, Nicolas Goaziou a écrit : Actually, `dolist' is a macro from subr.el, which is then shadowed by `cl-dolist', so there's no problem here. BTW, you can use macros from cl (cl-lib doesn't exist in Emacs 23), not so functions. Ok, good. By definition, anything in the first column group is a header. There is no limitations on the number of rows involved. It may be a bit surprising, but this is consistent with the rest of Org. Regards, Good.
[O] [RFC] [PATCH] org.el: fix ‘org-buffer-property-keys’
* lisp/org.el (org-buffer-property-keys): Only match real property drawers. This patch adds an org-element based check. Otherwise the following triggers a bogus prompt to fix a malformed drawer on typing M-: (org-buffer-property-keys) * foo (add-to-list 'org-capture-templates '(c Contact entry (file ~/org/contacts.org) * %(org-contacts-template-name)%? :PROPERTIES: :EMAIL: %(org-contacts-template-email) :END:)) --- lisp/org.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index d529a31..2e3003a 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -15825,6 +15825,8 @@ formats in the current buffer. (goto-char (point-min)) (while (re-search-forward org-property-start-re nil t) (catch 'cont + (unless (eq (org-element-type (org-element-at-point)) 'property-drawer) + (throw 'cont nil)) (setq range (or (org-get-property-block) (if (y-or-n-p (format Malformed drawer at %d, repair? (point))) -- 2.1.0
[O] [bug?] org-copy-face doesn’t add faces to org-faces customize group
Hello all, I’ve noticed that the faces defined by org-copy-face are not added to the org-faces customize group. This is in accordance with the docstring of ‘copy-face’, which says (in part) “This function does not copy face customization data, so NEW-FACE will not be made customizable. Most Lisp code should not call this function; use `defface' with :inherit instead.” I think it’s at best an odd surprise and at worst a bug that all org’s faces are not accessible from the org-faces customize group. Would there be any objection to replacing all uses of this function with :inherit as recommended by the docstring, and removing the org-copy-face function? For reference, here are the uses of the function, as returned by rgrep: ./lisp/org-faces.el:431:(org-copy-face 'org-todo 'org-checkbox-statistics-todo ./lisp/org-faces.el:434:(org-copy-face 'org-done 'org-checkbox-statistics-done ./lisp/org-faces.el:540:(org-copy-face 'org-meta-line 'org-block-begin-line ./lisp/org-faces.el:543:(org-copy-face 'org-meta-line 'org-block-end-line ./lisp/org-faces.el:560:(org-copy-face 'org-block 'org-quote ./lisp/org-faces.el:562:(org-copy-face 'org-block 'org-verse ./lisp/org-faces.el:600:(org-copy-face 'org-agenda-structure 'org-agenda-date ./lisp/org-faces.el:603:(org-copy-face 'org-agenda-date 'org-agenda-date-today ./lisp/org-faces.el:607:(org-copy-face 'secondary-selection 'org-agenda-clocking ./lisp/org-faces.el:610:(org-copy-face 'org-agenda-date 'org-agenda-date-weekend ./lisp/org-faces.el:719:(org-copy-face 'org-time-grid 'org-agenda-current-time ./lisp/org-faces.el:791:(org-copy-face 'mode-line 'org-mode-line-clock ./lisp/org-faces.el:793:(org-copy-face 'mode-line 'org-mode-line-clock-overrun Thanks, -- Aaron Ecay
Re: [O] Worg Tutorial error: using Emacs lisp as formulas
Ciaran Mulloy crmul...@gmail.com writes: Hi! I was fascinated to work through the examples provided in the org-tutorials sections under Worg and really see the power of using eLisp as spreadsheet formula: http://orgmode.org/worg/ org-tutorials/org-spreadsheet-lisp-formulas.html However the use of the mapconcat function always generated an error: Invalid regex Regular expression too big, even with only a few terms in the formula. The offending formula was: #+TBLFM: @2$3='(mapconcat 'identity (delete-dups (list @2$1..@$1 @2$2..@$2)) ) I experimented with variations of the formula getting the same error every time. I did a search of the org-mode forum without finding any solution. Any thoughts? I can't reproduce it - e.g. this --8---cut here---start-8--- | one | two | three | four | five | |-+-+---+--+--| | a | a | a b c e f d g | | | | a | b | | | | | b | a | | | | | c | d | | | | | e | f | | | | | f | g | | | | | a | f | | | | #+TBLFM: @2$3='(mapconcat 'identity (delete-dups (list @2$1..@$1 @2$2..@$2)) ) --8---cut here---end---8--- works fine for me. This is with more-or-less latest org. Moreover, none of the functions used (mapconcat, identity, delete-dups or list) use regexps at all. There is a chance that regexps are used by the evaluator when building the ranges, but it's unlikely IMO, so the regexp error seems like a red herring to me. How big a table did you try? Did you try restarting emacs and redoing the evaluation? How about starting emacs without any of your customizations and redoing the evaluation? Something like this emacs -q -l /path/to/minimal/init /path/to/file/with/the/table where the minimal init file just sets load-path if necessary and initializes org. -- Nick