Re: [O] org-mobile-push
Vikas Rawal vikasli...@agrarianresearch.org wrote: Thanks Nick and Jambunathan for taking the trouble to respond. So pretty please: when you get an error, *at the very least*, do M-x toggle-debug-on-error Thanks nick for teaching my how to use back-trace. Here is the output. May I request you to help identify what could be causing the problem. The backtrace shows (you read it from the bottom up) that the following sequence of calls took place: org-mobile-push - org-mobile-create-sumo-agenda - org-store-agenda-views - org-batch-store-agenda-views - org-agenda(nil X) - org-agenda-run-series(SUMO ...) - org-agenda-list - org-get-entries-from-diary - diary-list-entries - run the diary-hook - appt-make-list In trying to call this last function, emacs gets an error: the function is not defined. Basically what happens is that org-mobile-push calculates the agenda, by calling org-agenda-list. This function checks the value of the variable org-agenda-include-diary, which in your case must be t, so it tries to add agenda entries from the diary. It calls org-get-entries-from-diary to do that, which calls diary-list-entries. This one runs the diary-hook and somewhere in your init files you must have done something like this: (add-hook 'diary-hook (function appt-make-list)) When the hook is run, emacs tries to call the function, does not find it and complains. To fix it, change the above line to (require 'appt) (add-hook 'diary-hook (function appt-make-list)) The (require 'appt) makes sure that the file that defines this function is loaded, the function is defined when emacs needs to call it and the problem is resolved. Strictly speaking, the function does not need to be defined that early: it only needs to be defined before it is called, but if you are going to call it, you might as well do it early. If that's not desirable for some reason, you can use the autoload mechanism (see the emacs manual for that). Note that there are two customizations (the setting of org-agenda-include-diary to t and the setting of diary-hook) that caused your problem. I don't include the diary in my agenda, so I would not have seen the problem at all. That's one of the reasons why it's important for everybody to have the Pavlovian response: error -- must get backtrace It can pinpoint where *your* problem is and show the way to a solution. HTH, Nick Debugger entered--Lisp error: (void-function appt-make-list) appt-make-list() run-hooks(diary-hook) diary-list-entries((9 26 2011) 1) byte-code(\301\302!\203\nfter))) (alltodo nil ((org-agenda-title-append afterKEYS=t TITLE: ALL TODO /after))) (agenda ((org-agenda-title-append afterKEYS=n#1 TITLE: Agenda and all TODO's /after))) (alltodo nil ((org-agenda-title-append afterKEYS=n#2 TITLE: Agenda and all TODO's /after ((org-agenda-compact-blocks nil)) (/home/vikas/Dropbox/MobileOrg/agendas.org))) ... org-agenda(nil X) (let ((org-agenda-compact-blocks nil)) (org-agenda nil thiscmdkey)) eval((let ((org-agenda-compact-blocks nil)) (org-agenda nil thiscmdkey))) ... ... (org-batch-store-agenda-views) eval((org-batch-store-agenda-views)) org-store-agenda-views() org-mobile-create-sumo-agenda() org-mobile-push() call-interactively(org-mobile-push t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil) which means that you can load the file and therefore define the function by inserting (require 'appt) Thanks Jambunathan and Nick. This indeed solves the problem. Vikas
Re: [O] [PATCH][babel] add a string input to ob-octave
Hello, Litvinov Sergey slitvi...@gmail.com writes: +(cond + ((stringp var) + (format \'%s\' (or var nil))) + (t + (format %s (or var nil)) Just nitpicking: In the first case, var is already identified as a string, so it will always be non-nil, and your or is useless. In the second case, (or var nil) is redundant, as (format %s nil) already returns nil. In other words, replacing (or var nil) with var would be enough in both cases. Regards, -- Nicolas Goaziou
Re: [O] TABLES: Remove/add cell
2011/9/30 Michael Brand michael.ch.br...@gmail.com: Ehm - it is doable, but not by editing commands from Org table. Only with several rectangular edits or an Org table formula with a few tricks and a temporary column to be removed afterward. There are some org-table specific rectangle edit commands that should make it easier. Cut the cells with org-table-cut-region, and paste by org-table-paste-rectangle. Hope this helps. -- Suvayu Open source is the future. It sets us free.
Re: [O] [PATCH][babel] add a string input to ob-octave
In other words, replacing (or var nil) with var would be enough Thanks. Fixed in the patch below. The patch also adds an ert test. From b4b679abdc7bec9f3033b50f81d567a0bb48b147 Mon Sep 17 00:00:00 2001 From: Litvinov Sergey slitvi...@gmail.com Date: Sat, 1 Oct 2011 13:37:56 +0200 Subject: [PATCH 2/2] Remove redundant condition check in ob-octave.el. Add a test. --- lisp/ob-octave.el |4 ++-- testing/examples/ob-octave-test.org |6 -- testing/lisp/test-ob-octave.el |6 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el index cfc1f1d..f840739 100644 --- a/lisp/ob-octave.el +++ b/lisp/ob-octave.el @@ -119,9 +119,9 @@ specifying a variable of the same value. (if (listp (car var)) ; ,)) ]) (cond ((stringp var) - (format \'%s\' (or var nil))) + (format \'%s\' var)) (t - (format %s (or var nil)) + (format %s var) (defun org-babel-prep-session:octave (session params optional matlabp) Prepare SESSION according to the header arguments specified in PARAMS. diff --git a/testing/examples/ob-octave-test.org b/testing/examples/ob-octave-test.org index 37cf3f9..97d9b00 100644 --- a/testing/examples/ob-octave-test.org +++ b/testing/examples/ob-octave-test.org @@ -24,7 +24,6 @@ Input an integer variable ans = s #+end_src - Input an array #+begin_src octave :exports results :results silent :var s='(1.0 2.0 3.0) ans = s @@ -40,4 +39,7 @@ Input a string ans = s(1:2) #+end_src - +Input elisp nil +#+begin_src octave :exports results :results silent :var s='nil +ans = s +#+end_src diff --git a/testing/lisp/test-ob-octave.el b/testing/lisp/test-ob-octave.el index f3972ec..145266d 100644 --- a/testing/lisp/test-ob-octave.el +++ b/testing/lisp/test-ob-octave.el @@ -53,3 +53,9 @@ (org-babel-next-src-block 4) (should (equal te (org-babel-execute-src-block) +(ert-deftest ob-octave/input-nil () + Input elisp nil + (org-test-at-id cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba +(org-babel-next-src-block 5) +(should (equal nil (org-babel-execute-src-block) + -- 1.7.4.1
Re: [O] looking for examples using babel/calc
is there some documentation and are there some examples of using babel with calc? There are examples in https://github.com/eschulte/babel-dev.git Search for 'begin_src calc'. https://raw.github.com/eschulte/babel-dev/master/scraps.org
[O] Bug: Can't check collapsed checkbox from end of line [7.7 (release_7.7.351.gb8b5)]
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 have the following item in my todo list --8---cut here---start-8--- ** TODO [#A] * Org Routine [1/4] ** SCHEDULED: 2011-10-01 Sat .+1d - [ ] PRIORITIZE - A: not completing on scheduled day has consequences - C: completely optional but you want to consider it - [ ] REFILE Inbox - [ ] TAG with required resource - Most of all people so you can filter and make sure all issues with that person are dealt with - [ ] RESCHEDULE/UNSCHEDULE until today is manageable - 15 bite-sized tasks --8---cut here---end---8--- When the line labelled PRIORITIZE is collapsed (the A and C are not visible), if I go to the end of that line, `C-c C-c' has no effect Emacs : GNU Emacs 23.3.1 (x86_64-apple-darwin10.8.0, Carbon Version 1.6.0 AppKit 1038.36) of 2011-09-12 on pluto.luannocracy.com Package: Org-mode version 7.7 (release_7.7.351.gb8b5) current state: == (setq org-x-backends '(ox-org ox-redmine) org-agenda-deadline-leaders '(D: D%d: ) org-clock-in-switch-to-state STARTED org-agenda-skip-scheduled-if-deadline-is-shown t org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-x-redmine-title-prefix-match-function 'org-x-redmine-title-prefix-match org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-agenda-custom-commands '((E Errands (next 3 days) tags ErrandTODO\DONE\TODO\CANCELED\STYLE\habit\SCHEDULED\+3d\ ((org-agenda-overriding-header Errands (next 3 days)) ) ) (A Priority #A tasks agenda ((org-agenda-ndays 1) (org-agenda-overriding-header Today's priority #A tasks: ) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote notregexp) \\=.*\\[#A\\]) ) ) ) ) (b Priority #A and #B tasks agenda ((org-agenda-ndays 1) (org-agenda-overriding-header Today's priority #A and #B tasks: ) (org-agenda-skip-function (quote (org-agenda-skip-entry-if (quote regexp) \\=.*\\[#C\\]) ) ) ) ) (w Waiting/delegated tasks tags TODO=\WAITING\|TODO=\DELEGATED\ ((org-agenda-overriding-header Waiting/delegated tasks:) (org-agenda-sorting-strategy (quote (todo-state-up priority-down category-up))) ) ) (p Unprioritized tasks tags AREA\Work\TODO\\TODO{DONE\\|CANCELED\\|NOTE\\|PROJECT\\|DEFERRED\\|SOMEDAY} ((org-agenda-files (quote (~/Documents/Tasks/todo.txt) )
Re: [O] Bug: Can't check collapsed checkbox from end of line [7.7 (release_7.7.351.gb8b5)]
Hello, Dave Abrahams d...@boostpro.com writes: I have the following item in my todo list ** TODO [#A] * Org Routine [1/4] ** SCHEDULED: 2011-10-01 Sat .+1d - [ ] PRIORITIZE - A: not completing on scheduled day has consequences - C: completely optional but you want to consider it - [ ] REFILE Inbox - [ ] TAG with required resource - Most of all people so you can filter and make sure all issues with that person are dealt with - [ ] RESCHEDULE/UNSCHEDULE until today is manageable - 15 bite-sized tasks When the line labelled PRIORITIZE is collapsed (the A and C are not visible), if I go to the end of that line, `C-c C-c' has no effect I've pushed a fix on master. Could you confirm that it is working now? Regards, -- Nicolas Goaziou
Re: [O] Bug: Can't check collapsed checkbox from end of line [7.7 (release_7.7.351.gb8b5)]
on Sat Oct 01 2011, Nicolas Goaziou n.goaziou-AT-gmail.com wrote: Hello, Dave Abrahams d...@boostpro.com writes: I have the following item in my todo list ** TODO [#A] * Org Routine [1/4] ** SCHEDULED: 2011-10-01 Sat .+1d - [ ] PRIORITIZE - A: not completing on scheduled day has consequences - C: completely optional but you want to consider it - [ ] REFILE Inbox - [ ] TAG with required resource - Most of all people so you can filter and make sure all issues with that person are dealt with - [ ] RESCHEDULE/UNSCHEDULE until today is manageable - 15 bite-sized tasks When the line labelled PRIORITIZE is collapsed (the A and C are not visible), if I go to the end of that line, `C-c C-c' has no effect I've pushed a fix on master. Could you confirm that it is working now? Not for me. When I visit the org file above, press `TAB' to reveal the detail of the TODO, move down two lines with `C-n C-n' and press `TAB' again to collapse the PRIORITIZE bullet, hit `C-e' to go to the end of line, then hit `C-c C-c', no checkmark appears. -- Dave Abrahams BoostPro Computing http://www.boostpro.com
Re: [O] Bug: Can't check collapsed checkbox from end of line [7.7 (release_7.7.351.gb8b5)]
Dave Abrahams d...@boostpro.com writes: Not for me. When I visit the org file above, press `TAB' to reveal the detail of the TODO, move down two lines with `C-n C-n' and press `TAB' again to collapse the PRIORITIZE bullet, hit `C-e' to go to the end of line, then hit `C-c C-c', no checkmark appears. That's because you have `org-special-ctrl-a/e' set to nil. You should set it to t first. Regards, -- Nicolas Goaziou
Re: [O] Bug: Can't check collapsed checkbox from end of line [7.7 (release_7.7.351.gb8b5)]
on Sat Oct 01 2011, Nicolas Goaziou n.goaziou-AT-gmail.com wrote: Dave Abrahams d...@boostpro.com writes: Not for me. When I visit the org file above, press `TAB' to reveal the detail of the TODO, move down two lines with `C-n C-n' and press `TAB' again to collapse the PRIORITIZE bullet, hit `C-e' to go to the end of line, then hit `C-c C-c', no checkmark appears. That's because you have `org-special-ctrl-a/e' set to nil. You should set it to t first. Thanks, you're right; that's definitely a setting I want. Regards, -- Dave Abrahams BoostPro Computing http://www.boostpro.com
Re: [O] % (org-agenda-bulk-mark-regexp) in agenda view problems
Hi Bastien, I found a third problem of org-agenda-bulk-mark-regexp, it does not work well on daily/weekly agenda view. Basically it chokes on lines that is not a regular headline, like date labels, dairy entries and grid lines. So to show I am not merely a leech on this list, I come up with my version here, most of the ugly code are to deal with the way org-agenda-bulk-mark works now (e.g., returning nil when successful): (defun org-agenda-bulk-mark-regexp (regexp) Mark entries match REGEXP. (interactive sMark entries matching regexp: ) (save-excursion (goto-char (point-min)) (let ((entries-marked 0)) (while (not (eobp)) (unless (and (not (get-char-property (point) 'invisible)) (not (org-get-at-bol 'org-agenda-diary-link)) (org-get-at-bol 'org-hd-marker) (let (txt-property) (setq txt-property (get-char-property (point) 'txt)) (string-match regexp txt-property)) (not (call-interactively 'org-agenda-bulk-mark)) (setq entries-marked (+ entries-marked 1))) (beginning-of-line 2))) (if (zerop entries-marked) (message No entry matching this regexp.) (message %d entries marked for bulk action entries-marked) Thanks, Net On Sat, Oct 1, 2011 at 12:38 AM, netty hacky netty.ha...@gmail.com wrote: Hi Bastien, I'm having two problems with the % command (org-agenda-bulk-mark-regexp) in Org-mode agenda view. 1. If I use . as the search string, I get Wrong type argument: number-or-marker-p, nil. And my workaround is to change the line (let (entries-marked) in org-agenda.el to (let ((entries-marked 0)). 2. If I use .* as the search string, I get Wrong type argument: stringp, nil. After some edebugging, I found the reason is that in org-agenda-bulk-mark-regexp, re-search-forward moved the point to the end of the line (since .* matches the whole line), causing (get-text-property (point) 'txt) to return nil, in turn caused string-match to throw the error. I think this may happen to other regexps, as long as the strings matched include the last character in the line. I'm new to Emacs Lisp so I'm not sure how to fix this one. Wondering why it seems only me having these two problems. I am using MacPorts' Emacs and Org-mode: Emacs : GNU Emacs 23.3.1 (x86_64-apple-darwin10.8.0) Package: Org-mode version 7.7 Thanks, Net
Re: [O] org-mobile-push
In trying to call this last function, emacs gets an error: the function is not defined. Basically what happens is that org-mobile-push calculates the agenda, by calling org-agenda-list. This function checks the value of the variable org-agenda-include-diary, which in your case must be t, so it tries to add agenda entries from the diary. It calls org-get-entries-from-diary to do that, which calls diary-list-entries. This one runs the diary-hook and somewhere in your init files you must have done something like this: (add-hook 'diary-hook (function appt-make-list)) Thanks very much for explaining it so well. Best wishes, Vikas
Re: [O] Printing in indent mode
Giovanni Ridolfi giovanni.rido...@yahoo.it writes: That would be very nice, but I do not know how to do this for a hierarchical list so that the result would look like a list. For a subtree: * A list :PROPERTIES: :EXPORT_TITLE: :EXPORT_OPTIONS: H:0 num:nil toc:nil \n:t @:t ::t |:t ^:t f:nil *:t tags:nil TeX:t LaTeX:nil skip:t p:nil author:nil email:nil creator:nil timestamp:nil :END: Thanks, works like a charm! It might be useful for me to define this as a function (like org-export-as-pdf-as-is). I will try to figure out later how I could do it. All the best, Jarmo