Re: [O] [PATCH] Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe' in tests
Sending it again as your mail setup filters my answer. Sebastien Vauban writes: > Here's a patch doing so. I cannot apply your patch. Could you update your repository first, and send it again as an attachment? Thanks,
Re: [O] Agenda with an archived indicator
Any ideas on this, anyone? On Sun, Dec 28, 2014 at 2:30 AM, Yuri Niyazov wrote: > I am trying to build an agenda view that includes both Archived and > non-Archived items, and includes an indicator whether an item is > archived or not. Here's how I've gotten it to work so far: > > In custom agenda: > > (... (org-agenda-prefix-format "%(yn/org-archived-display) > %-11c%-11T%-11s") ... ) > > (defun yn/org-archived-display () > (if (get-text-property (point-at-bol) :org-archived) > "A" > " ")) > > > I figured if I learned how org-agenda skips over archived org entries > while building the display, that will give some insight into what the > code inside that expression should look like, so that code is derived > from org-agenda-skip. > > This has an appreciable slow-down while building the agenda, I assume > it's because it is re-parsing the item. Is there something in the > environment of the expressions in %() that can be efficiently > interrogated for archived/not archived status?
Re: [O] [PATCH] Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe' in tests
Hello Nicolas, Nicolas Goaziou wrote: > Sending it again as your mail setup filters my answer. Not sure to understand. Never mind, though. > Sebastien Vauban writes: > >> Here's a patch doing so. > > I cannot apply your patch. Could you update your repository first, and > send it again as an attachment? I am pretty sure I was up-to-date... In fact, I'm ahead of `origin/master' by 3 commits: - 2 about the "display of a count of items" functionality I've implemented a while ago [1], and - this new one (about renaming `org-ctrl-c-ctrl-c' to `org-babel-execute-maybe'). Anyway, here is, attached, the results of the command: git diff origin/master..master testing > org-babel-execute-maybe.patch Thanks! Best regards, Seb [1] https://lists.gnu.org/archive/html/emacs-orgmode/2013-09/msg01075.html -- Sebastien Vauban diff --git a/testing/lisp/test-ob-emacs-lisp.el b/testing/lisp/test-ob-emacs-lisp.el index f771ee3..bb3f51b 100644 --- a/testing/lisp/test-ob-emacs-lisp.el +++ b/testing/lisp/test-ob-emacs-lisp.el @@ -1,6 +1,6 @@ ;;; test-ob-emacs-lisp.el -;; Copyright (c) 2012, 2013, 2014 Free Software Foundation, Inc. +;; Copyright (c) 2012-2014 Free Software Foundation, Inc. ;; Authors: Eric Schulte, Martyn Jago ;; This file is not part of GNU Emacs. @@ -29,7 +29,7 @@ ;; #+end_src" (org-babel-next-src-block) -(org-ctrl-c-ctrl-c) +(org-babel-execute-maybe) (should (re-search-forward "results:" nil t)) (forward-line) (should @@ -42,7 +42,7 @@ #+end_src" (org-babel-next-src-block) -(org-ctrl-c-ctrl-c) +(org-babel-execute-maybe) (should (re-search-forward "results:" nil t)) (forward-line) (should @@ -56,7 +56,7 @@ ;; #+end_src" (org-babel-next-src-block) -(org-ctrl-c-ctrl-c) +(org-babel-execute-maybe) (re-search-forward "results" nil t) (forward-line) (should (string= @@ -69,7 +69,7 @@ 2;; #+end_src" (org-babel-next-src-block) -(org-ctrl-c-ctrl-c) +(org-babel-execute-maybe) (re-search-forward "results" nil t) (forward-line) (should (string= diff --git a/testing/lisp/test-ob-ruby.el b/testing/lisp/test-ob-ruby.el index ee7e837..28c06a4 100644 --- a/testing/lisp/test-ob-ruby.el +++ b/testing/lisp/test-ob-ruby.el @@ -1,6 +1,6 @@ ;;; test-ob-ruby.el --- tests for ob-ruby.el -;; Copyright (c) 2013 Oleh Krehel +;; Copyright (c) 2013-2014 Oleh Krehel ;; Authors: Oleh Krehel ;; This program is free software; you can redistribute it and/or modify @@ -28,7 +28,7 @@ s = \"2\" s = \"3\" puts s #+end_src" - (org-ctrl-c-ctrl-c) + (org-babel-execute-maybe) (substring-no-properties (buffer-string))) "#+begin_src ruby :session :results output @@ -47,7 +47,7 @@ puts s s = \"5\" puts s #+end_src" - (org-ctrl-c-ctrl-c) + (org-babel-execute-maybe) (substring-no-properties (buffer-string))) "#+begin_src ruby :session :results output @@ -63,7 +63,7 @@ puts s (should (equal (org-test-with-temp-text "#+begin_src ruby :session :results output puts s #+end_src" - (org-ctrl-c-ctrl-c) + (org-babel-execute-maybe) (substring-no-properties (buffer-string))) "#+begin_src ruby :session :results output diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el index efde99a..5b75e23 100644 --- a/testing/lisp/test-ob.el +++ b/testing/lisp/test-ob.el @@ -269,7 +269,7 @@ this is simple" (ert-deftest test-org-babel/org-babel-get-inline-src-block-matches () (flet ((test-at-id (id) - (org-test-at-id + (org-test-at-id id (let ((test-point (point))) (should (fboundp 'org-babel-get-inline-src-block-matches)) @@ -298,18 +298,18 @@ this is simple" ;; src_ at bol line 1... (org-test-with-temp-text test-line - (goto-char (point-min)) (org-ctrl-c-ctrl-c) + (goto-char (point-min)) (org-babel-execute-maybe) (should (string= (concat test-line " =1=") (buffer-substring-no-properties (point-at-bol) (point-at-eol - (forward-char) (org-ctrl-c-ctrl-c) + (forward-char) (org-babel-execute-maybe) (should (string= (concat test-line " =1= =1=") (buffer-substring-no-properties (point-at-bol) (point-at-eol (re-search-forward "1}") - (should-error (org-ctrl-c-ctrl-c)) + (should-error (org-babel-execute-maybe)) (backward-char) ;; last char of block body - (org-ctrl-c-ctrl-c) + (org-babel-execute-maybe) (should (string= (concat test-line " =1= =1= =1=") (buffer-substring-no-properties (point-at-bol) (point-at-eol) @@ -317,29 +317,29 @@ this is simple" (let ((test-line " src_emacs-lisp{ 1 }")) (org-test-with-temp-text test-line - (should-error (org-ctrl-c-ctrl-c)) - (forward-char) (org-ctrl-c-ctrl-c) + (should-error (org-babel-execute-maybe)) + (forward-char) (org-babel-execute-maybe) (should (string= (concat test-line "
Re: [O] Agenda with an archived indicator
test On Tue, Dec 30, 2014 at 1:47 AM, Yuri Niyazov wrote: > Any ideas on this, anyone? > > On Sun, Dec 28, 2014 at 2:30 AM, Yuri Niyazov wrote: >> I am trying to build an agenda view that includes both Archived and >> non-Archived items, and includes an indicator whether an item is >> archived or not. Here's how I've gotten it to work so far: >> >> In custom agenda: >> >> (... (org-agenda-prefix-format "%(yn/org-archived-display) >> %-11c%-11T%-11s") ... ) >> >> (defun yn/org-archived-display () >> (if (get-text-property (point-at-bol) :org-archived) >> "A" >> " ")) >> >> >> I figured if I learned how org-agenda skips over archived org entries >> while building the display, that will give some insight into what the >> code inside that expression should look like, so that code is derived >> from org-agenda-skip. >> >> This has an appreciable slow-down while building the agenda, I assume >> it's because it is re-parsing the item. Is there something in the >> environment of the expressions in %() that can be efficiently >> interrogated for archived/not archived status?
[O] Transforming org-mode project in Gantt graphes
Hello, I just wrote two python scripts to transform a project managed in org-mode in (beautifull) gantt graphes. You could find more here : - example of generated graphes : - http://xael.org/norman/python/org2gantt/project.svg - http://xael.org/norman/python/org2gantt/project_ressources.svg - explanations : http://xael.org/norman/python/org2gantt/README.org - the whole thing : http://xael.org/norman/python/org2gantt/org2gantt.tar.gz Of course, it is in an early release... Seems to work but not deeply tested yet. Comments or improvements are welcome ! Regards, Alexandre
[O] Bug: org-export-icalendar-this-file doesn't work [8.2.10 (8.2.10-29-g89a0ac-elpa @ /home/vadmin/.emacs.d/elpa/org-20141222/)]
I recently updated to the latest org-mode version (using M-x list-packages). Now M-x org-export-icalendar-this file doesn't work. I get the following error message: org-export-icalendar: Symbol's function definition is void: org-prepare-agenda-buffers More information below. Please advise. Thank you. Sincerely, Felix Fernandes Emacs : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22 on chindi10, modified by Debian Package: Org-mode version 8.2.10 (8.2.10-29-g89a0ac-elpa @ /home/vadmin/.emacs.d/elpa/org-20141222/) current state: == (setq org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-icalendar-include-todo t 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-agenda-use-time-grid nil 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-agenda-custom-commands '(("pa" "A-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"A\"") ("pb" "B-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"B\"") ("pc" "C-priority" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"C\"") ("b" "Buy" tags "+CATEGORY=\"BUY\"") ("w" "Web" tags "+CATEGORY=\"WEB\"") ("k" "Books" tags "+CATEGORY=\"BOOKS\"") ("v" "Movies" tags "+CATEGORY=\"MOVIES\"") ("u" "Music" tags "+CATEGORY=\"MUSIC\"")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-deadline-warning-days 0 org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-sorting-strategy '((agenda priority-down) (todo priority-down category-keep) (tags priority-down category-keep) (search category-keep)) org-agenda-start-with-follow-mode t org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-agenda-prefix-format " %-11:c% s" org-mode-hook '(#[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 my-org-mode-hook) org-agenda-start-on-weekday nil org-agenda-mode-hook '(my-org-agenda-mode-hook) org-directory "~/org/" org-metadown-hook '(org-babel-pop-to-session-maybe) org-agenda-files '("~/org/todo.org" "~/org/home.org") org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-confirm-shell-link-function 'yes-or-no-p )
Re: [O] Bug: org-export-icalendar-this-file doesn't work [8.2.10 (8.2.10-29-g89a0ac-elpa @ /home/vadmin/.emacs.d/elpa/org-20141222/)]
Felix Fernandes writes: > I recently updated to the latest org-mode version (using M-x list-packages). > Now M-x org-export-icalendar-this file > doesn't work. I get the following error message: > org-export-icalendar: Symbol's function definition is void: > org-prepare-agenda-buffers > > More information below. Please advise. Thank you. > AFAICT, there is no `org-export-icalendar' function in the current version(s) of org. I suspect you are picking up bits and pieces from the version of org that was bundled with your emacs (a so-called "mixed installation"). You probably need to make sure that you install org correctly, so that the previous bits are shadowed completely. Read the "Using Emacs packaging system" subsection of the "Installation" section of the Org manual for important information: (info "(org) Installation") > > Emacs : GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) > of 2014-02-22 on chindi10, modified by Debian > Package: Org-mode version 8.2.10 (8.2.10-29-g89a0ac-elpa @ > /home/vadmin/.emacs.d/elpa/org-20141222/) > Nick
Re: [O] Org-mode to feed a database
* Vikas Rawal wrote: > This is, in all likelihood, a crazy idea. Please excuse me for that. Hehe. > I often need to get a number of people enter complex survey data > into a database using some kind of forms. The forms I need are > fairly complex (with several nested grids, for example). I need > radio-buttons and drop-down menus-equivalents. > > I was thinking if it would be worth it to use Org-mode for data > entry. > > The idea would be something like this. We have a template org file > that is copied for each survey respondent. The template contains > “blank” org tables and some source blocks. Responses are filled > into the org tables, and then the source blocks are evaluated to > feed the data into the database. You can version-control the whole > thing so that different people can create these records and push > it to a centralised git repository. Never done this. But if I'd do this, I'd definitely take a look at yasnippet and using it for default values, dropdowns, ... -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
Re: [O] Bug: Invalid hline refernce + org-edit-special freeze emacs [8.2.10 (8.2.10-29-g89a0ac-elpa @ /home/artis/.emacs.d/elpa/org-20141222/)]
Hello, Artis Rozentāls writes: > A reference to a non-existant hline as the formula target results in a > complete freeze when running org-edit-special (and moving the cursor > down if invoked via C-c ') despite performing seemingly correct calculations. > > An example of such a table is attached. This should be fixed in development version. Thank you for reporting it. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe' in tests
Sebastien Vauban writes: > Not sure to understand. Never mind, though. I cannot do "Reply to all" since your address is invalid. Therefore, I have to rewrite "To" header each time. > Anyway, here is, attached, the results of the command: > > git diff origin/master..master testing > org-babel-execute-maybe.patch Could you use git format-patch instead? Thanks,
Re: [O] [PATCH] Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe' in tests
Nicolas Goaziou wrote: > Sebastien Vauban writes: > >> Not sure to understand. Never mind, though. > > I cannot do "Reply to all" since your address is invalid. You mean "sva-news-D0wtAvR13HarG/idocf...@public.gmane.org" here above? > Therefore, I have to rewrite "To" header each time. I'm quite positive you can use it: it'll be forwarded to me. Try it! >> Anyway, here is, attached, the results of the command: >> >> git diff origin/master..master testing > org-babel-execute-maybe.patch > > Could you use git format-patch instead? Of course. Sorry. Here it is. Best regards, Seb -- Sebastien Vauban >From 27ff606c268b79158fe32627ff651d0500d38468 Mon Sep 17 00:00:00 2001 From: Sebastien Vauban Date: Mon, 29 Dec 2014 17:02:06 +0100 Subject: [PATCH] Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe' in tests * test-ob-emacs-lisp.el, test-ob-ruby.el, test-ob.el: Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe' in tests. --- testing/lisp/test-ob-emacs-lisp.el | 10 ++--- testing/lisp/test-ob-ruby.el | 8 ++-- testing/lisp/test-ob.el| 88 +++--- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/testing/lisp/test-ob-emacs-lisp.el b/testing/lisp/test-ob-emacs-lisp.el index f771ee3..bb3f51b 100644 --- a/testing/lisp/test-ob-emacs-lisp.el +++ b/testing/lisp/test-ob-emacs-lisp.el @@ -1,6 +1,6 @@ ;;; test-ob-emacs-lisp.el -;; Copyright (c) 2012, 2013, 2014 Free Software Foundation, Inc. +;; Copyright (c) 2012-2014 Free Software Foundation, Inc. ;; Authors: Eric Schulte, Martyn Jago ;; This file is not part of GNU Emacs. @@ -29,7 +29,7 @@ ;; #+end_src" (org-babel-next-src-block) -(org-ctrl-c-ctrl-c) +(org-babel-execute-maybe) (should (re-search-forward "results:" nil t)) (forward-line) (should @@ -42,7 +42,7 @@ #+end_src" (org-babel-next-src-block) -(org-ctrl-c-ctrl-c) +(org-babel-execute-maybe) (should (re-search-forward "results:" nil t)) (forward-line) (should @@ -56,7 +56,7 @@ ;; #+end_src" (org-babel-next-src-block) -(org-ctrl-c-ctrl-c) +(org-babel-execute-maybe) (re-search-forward "results" nil t) (forward-line) (should (string= @@ -69,7 +69,7 @@ 2;; #+end_src" (org-babel-next-src-block) -(org-ctrl-c-ctrl-c) +(org-babel-execute-maybe) (re-search-forward "results" nil t) (forward-line) (should (string= diff --git a/testing/lisp/test-ob-ruby.el b/testing/lisp/test-ob-ruby.el index ee7e837..28c06a4 100644 --- a/testing/lisp/test-ob-ruby.el +++ b/testing/lisp/test-ob-ruby.el @@ -1,6 +1,6 @@ ;;; test-ob-ruby.el --- tests for ob-ruby.el -;; Copyright (c) 2013 Oleh Krehel +;; Copyright (c) 2013-2014 Oleh Krehel ;; Authors: Oleh Krehel ;; This program is free software; you can redistribute it and/or modify @@ -28,7 +28,7 @@ s = \"2\" s = \"3\" puts s #+end_src" - (org-ctrl-c-ctrl-c) + (org-babel-execute-maybe) (substring-no-properties (buffer-string))) "#+begin_src ruby :session :results output @@ -47,7 +47,7 @@ puts s s = \"5\" puts s #+end_src" - (org-ctrl-c-ctrl-c) + (org-babel-execute-maybe) (substring-no-properties (buffer-string))) "#+begin_src ruby :session :results output @@ -63,7 +63,7 @@ puts s (should (equal (org-test-with-temp-text "#+begin_src ruby :session :results output puts s #+end_src" - (org-ctrl-c-ctrl-c) + (org-babel-execute-maybe) (substring-no-properties (buffer-string))) "#+begin_src ruby :session :results output diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el index efde99a..5b75e23 100644 --- a/testing/lisp/test-ob.el +++ b/testing/lisp/test-ob.el @@ -269,7 +269,7 @@ this is simple" (ert-deftest test-org-babel/org-babel-get-inline-src-block-matches () (flet ((test-at-id (id) - (org-test-at-id + (org-test-at-id id (let ((test-point (point))) (should (fboundp 'org-babel-get-inline-src-block-matches)) @@ -298,18 +298,18 @@ this is simple" ;; src_ at bol line 1... (org-test-with-temp-text test-line - (goto-char (point-min)) (org-ctrl-c-ctrl-c) + (goto-char (point-min)) (org-babel-execute-maybe) (should (string= (concat test-line " =1=") (buffer-substring-no-properties (point-at-bol) (point-at-eol - (forward-char) (org-ctrl-c-ctrl-c) + (forward-char) (org-babel-execute-maybe) (should (string= (concat test-line " =1= =1=") (buffer-substring-no-properties (point-at-bol) (point-at-eol (re-search-forward "1}") - (should-error (org-ctrl-c-ctrl-c)) + (should-error (org-babel-execute-maybe)) (backward-char) ;; last char of block body - (org-ctrl-c-ctrl-c) + (org-babel-execute-maybe) (should (string= (concat test-line " =1= =1= =1=") (buffer-substring-no-properties (point-at-bol) (point-at-eol
Re: [O] Org-mode to feed a database
>> >> 2. In my case, people who would enter the data into org files would >> not have used emacs before. So, there is a learning curve. Is it worth >> it? Or should one just build a web-based graphic application for such >> people to use? >> > > My knee-jerk reaction was: Use Django, not org - but that may be a > failure of imagination on my part. > You are perhaps right. I will perhaps end up using Django. But there would be many interesting things one could do in an emacs/org-based solution. My biggest worry is that it would require continuous training of people coming in to enter data. Vikas
Re: [O] Org-mode to feed a database
> > Have you considered the Emacs Widget library? > Thanks. Did not know about this. Very interesting. Vikas