Re: [O] Can't use char in TODO state
Hello, Bastien b...@altern.org writes: Michael Brand michael.ch.br...@gmail.com writes: It works with this patch http://patchwork.newartisans.com/patch/964 from Nicolas which I am still using to test it. If so, then Nicolas please apply it. It really simplifies the way headlines are matched in many places in the code. I've applied it. Regards, -- Nicolas Goaziou
Re: [O] org-capture and XEmacs, indenting too far
Michael Sperber sper...@deinprogramm.de writes: Robert Pluim rpl...@gmail.com writes: Hi, I'm using XEmacs 21.5 (beta29) garbanzo d27c1ee1943b+ [Lucid] (i686-pc-cygwin, Mule) of Mon Oct 18 2010 on RPluim, with the following org-capture-templates ((t Todo entry (file+headline ~/org/notes.org Tasks) * TODO %?)) The problem is that for some reason the resulting TODO heading is has 2 extra spaces, and is placed at too deep a level, giving: * Tasks *** TODO a task I've tested this on a fairly recent emacs24 build, and everything works fine there, so this is probably something XEmacs specific. Can anyone suggest any way to track this down (I'd bisect, but I've yet to find a 'good' version)? I finally got around to looking into this: The reason is that, in org-capture mode, `outline-level' is bound to outline.el's function, Looking at this again, my analysis was stupid: The problem is that the indirect buffer used for capture is not in org-mode at all, and that is indeed an XEmacs-specific problem, as `make-indirect-buffer' does not accept the 'clone argument on XEmacs. I therefore retract the rubbish I sent earlier and suggest this one instead: diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el index 14d7d5d..44ed82b 100644 --- a/lisp/ob-calc.el +++ b/lisp/ob-calc.el @@ -28,7 +28,6 @@ ;;; Code: (require 'ob) (require 'calc) -(require 'calc-store) (unless (featurep 'xemacs) (require 'calc-trail) (require 'calc-store)) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index e1b8a4f..fa9895f 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -848,6 +848,7 @@ it. When it is a variable, retrieve the value. Return whatever we get. (goto-char (org-capture-get :pos)) (org-set-local 'org-capture-target-marker (move-marker (make-marker) (point))) + (org-set-local 'outline-level 'org-outline-level) (let* ((template (org-capture-get :template)) (type (org-capture-get :type))) (case type @@ -1213,7 +1214,10 @@ Use PREFIX as a prefix for the name of the indirect buffer. (setq bname (concat prefix - (number-to-string (incf n)) - base))) (condition-case nil (make-indirect-buffer buffer bname 'clone) - (error (make-indirect-buffer buffer bname) + (error + (let ((buf (make-indirect-buffer buffer bname))) +(with-current-buffer buf (org-mode)) +buf) (defun org-capture-verify-tree (tree) Sorry about the snafu. -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla
Re: [O] org-contacts or bbdb?
Thank you all for your points of view! So I'll try bbdb-3. (I've already started a bit.) On Fri, Oct 21 2011, Eric Abrahamsen wrote: As Rasmus mentioned, if you use BBDB you should get version 3, it's significantly better than the previous version. There's a slow movement towards better import/export functions, which I think has been one of the major gripes about BBDB in the past (there are probably more I'm not aware of). So perhaps Julien just wrote org-contacts, because bbdb-3 did not exist then? On Fri, Oct 21 2011, Wes Hardaker wrote: go mess with the database easily. EG, with BBDB if one area gets a new area code you can't go quickly search/replace for all records replacing 111 with 222. With org-contacts it's a simple search/replace edit. But you can open the bbdb-file and do the replacement there, can't you? Greetings, -- Peter
Re: [O] org-capture and XEmacs, indenting too far
THis looks like the right solution to me... - Carsten On 23.10.2011, at 10:15, Michael Sperber wrote: Michael Sperber sper...@deinprogramm.de writes: Robert Pluim rpl...@gmail.com writes: Hi, I'm using XEmacs 21.5 (beta29) garbanzo d27c1ee1943b+ [Lucid] (i686-pc-cygwin, Mule) of Mon Oct 18 2010 on RPluim, with the following org-capture-templates ((t Todo entry (file+headline ~/org/notes.org Tasks) * TODO %?)) The problem is that for some reason the resulting TODO heading is has 2 extra spaces, and is placed at too deep a level, giving: * Tasks *** TODO a task I've tested this on a fairly recent emacs24 build, and everything works fine there, so this is probably something XEmacs specific. Can anyone suggest any way to track this down (I'd bisect, but I've yet to find a 'good' version)? I finally got around to looking into this: The reason is that, in org-capture mode, `outline-level' is bound to outline.el's function, Looking at this again, my analysis was stupid: The problem is that the indirect buffer used for capture is not in org-mode at all, and that is indeed an XEmacs-specific problem, as `make-indirect-buffer' does not accept the 'clone argument on XEmacs. I therefore retract the rubbish I sent earlier and suggest this one instead: diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el index 14d7d5d..44ed82b 100644 --- a/lisp/ob-calc.el +++ b/lisp/ob-calc.el @@ -28,7 +28,6 @@ ;;; Code: (require 'ob) (require 'calc) -(require 'calc-store) (unless (featurep 'xemacs) (require 'calc-trail) (require 'calc-store)) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index e1b8a4f..fa9895f 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -848,6 +848,7 @@ it. When it is a variable, retrieve the value. Return whatever we get. (goto-char (org-capture-get :pos)) (org-set-local 'org-capture-target-marker (move-marker (make-marker) (point))) + (org-set-local 'outline-level 'org-outline-level) (let* ((template (org-capture-get :template)) (type (org-capture-get :type))) (case type @@ -1213,7 +1214,10 @@ Use PREFIX as a prefix for the name of the indirect buffer. (setq bname (concat prefix - (number-to-string (incf n)) - base))) (condition-case nil (make-indirect-buffer buffer bname 'clone) - (error (make-indirect-buffer buffer bname) + (error + (let ((buf (make-indirect-buffer buffer bname))) + (with-current-buffer buf (org-mode)) + buf) (defun org-capture-verify-tree (tree) Sorry about the snafu. -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla
[O] Agenda views w/m: inconsistency, bug
Hi! In short: Personally I do think that org-aganda-week-view[1] and org-agenda-month-view behave differently. The first one shows today and the upcoming six days whereas the month view shows the current calendar month, independent of the current day. Example problem: Last week I started to use calendar export to ics/Google Calendar. Therefore I am using org-agenda-month-view to narrow down my data that gets exported. If I export my agenda today, I only get about a week of agenda days I am interested (upcoming schedule) and more than three weeks of agenda days that are of no use for me any more (past). I propose: I'd personally prefer org-agenda-month-view showing today and the upcoming 30 days instead. 1. There is a bug in the documentation btw: instead of «org-aganda-week-view» there is «org-aganda-day-view» on http://orgmode.org/org.html#Agenda-commands -- Karl Voit
[O] notify, when something to do
Hello, I would like to be notified[1], when a todo item enters the warning period, scheduled time, or deadline. I can imagine writing a function, that executes every 5 minutes, that scans all agenda files calling `org-get-[scheduled,deadline]-time', but I hope, that there is already something, that I can use more easily. TIA for any help, Peter Footnotes: [1] For notifying, I'll use an external program, for example notify-send, because the emacs window is not always visible.
Re: [O] Agenda views w/m: inconsistency, bug
On Sun, Oct 23, 2011 at 12:06, Karl Voit devn...@karl-voit.at wrote: Personally I do think that org-aganda-week-view[1] and org-agenda-month-view behave differently. The first one shows today and the upcoming six days whereas the month view shows the current calendar month, independent of the current day. Week view shows one calendar week (Monday - Sunday) for me. -- Suvayu Open source is the future. It sets us free.
Re: [O] Agenda views w/m: inconsistency, bug
On 23.10.2011, at 12:06, Karl Voit wrote: Hi! In short: Personally I do think that org-aganda-week-view[1] and org-agenda-month-view behave differently. The first one shows today and the upcoming six days whereas the month view shows the current calendar month, independent of the current day. You are right that this looks inconsistent, however, it is not. You get this view for the weekly agenda only because org-agenda-start-on-weekday is nil. You can set it to 1 to make the week agenda start on Monday and then be consistent with the monthly view. You are looking for a view that covers 30 days. The view you are requesting can be made with C-u 30 C-c a a or with a simple custom command that sets org-agenda-span to 30 in the options section of the command. HTH - Carsten Example problem: Last week I started to use calendar export to ics/Google Calendar. Therefore I am using org-agenda-month-view to narrow down my data that gets exported. If I export my agenda today, I only get about a week of agenda days I am interested (upcoming schedule) and more than three weeks of agenda days that are of no use for me any more (past). I propose: I'd personally prefer org-agenda-month-view showing today and the upcoming 30 days instead. 1. There is a bug in the documentation btw: instead of «org-aganda-week-view» there is «org-aganda-day-view» on http://orgmode.org/org.html#Agenda-commands -- Karl Voit
Re: [O] Agenda views w/m: inconsistency, bug
Hi Carsten! * Carsten Dominik carsten.domi...@gmail.com wrote: You get this view for the weekly agenda only because org-agenda-start-on-weekday is nil. You can set it to 1 to make the week agenda start on Monday and then be consistent with the monthly view. Oh, I see. You are looking for a view that covers 30 days. The view you are requesting can be made with C-u 30 C-c a a or with a simple custom command that sets org-agenda-span to 30 in the options section of the command. Perfect! Thank you very much! That leaves just for the bug that «org-aganda-day-view» should be replaced by «org-aganda-week-view» one time at http://orgmode.org/org.html#Agenda-commands -- Karl Voit
Re: [O] [RFC] Standardized code block keywords
Am Freitag, 21. Oktober 2011, 21:10:27 schrieb Thomas S. Dye: Eric Schulte schulte.e...@gmail.com writes: I'm confused by [3] so I will say nothing for now, except to ask some questions: are we talking about what a human would use to label a piece of data for consumption by a block (including perhaps the future possibilities of lists and paragraphs that Tom brought up)? what babel would use to label a results block (possibly so that it could be consumed by another block in a chain)? both? would that mean that #+tblname would go the way of the dodo and that tables would be labelled with #+data (or #+object or whatever else we come up with)? +1 (Confused, too) well, I guess it is good that this discussion has begun if only to clear up this lingering uncertainty. I wasn't even aware of #+DATA. Does it do anything TBLNAME and SRCNAME don't? from the prospective of code blocks it is exactly synonymous with tblname. Srcname is different in that it labels code blocks. A reason to keep TBLNAME is that it's also used by the spreadsheet remote references. If Babel looked for DATA instead, a table that is both a remote reference for another spreadsheet and a data source for a src block would need both TBLNAME and DATA, which seems redundant. agreed, I'm thinking that tblname will at least remain an option no matter what decision is made. As for labeling lists and paragraphs, I recall from the list that Nicolas Goaziou is working on a generalized way to set captions, labels and attributes for various kinds of Org block, as is possible now for tables and images. I thought that sounded promising. I don't know if he planned for block names, too (currently we have tblname but no imgname), but that could make sense. In which case it might be a good idea to coordinate. Agreed, I was not aware of this work. Thanks for sharing. In this vein I would like to voice my desire to be able to add captions to code blocks, the lack of this feature has bitten me in the past. Hi Eric, For LaTeX export, the listings package has support for code block captions. Not in org AFAIK, org only supports these for my use cases not very useful function name = exports. I patched org to produce real captions instead, but my changes are not that well tested and required some changes in the central export logic. If there is interest I could share what I have so far. The code quality is a mess, as I do not really know elisp. Daniel
Re: [O] [RFC] Standardized code block keywords
Hi, named code blocks [1] -- source srcname function calling external functions [2] -- call lob named data [3] -- tblname resname results data what about #+name: for [1] and [3], and #+call: for [2] ? That a table or list contains data is obvious. The only thing, the additional line is for, is to name it. That a source block contains source is also obvious and is already noted by the use of #+begin_src, so why duplicate the src-part? Daniel
[O] ELISP (was: Agenda views w/m: inconsistency, bug)
* Carsten Dominik carsten.domi...@gmail.com wrote: You are looking for a view that covers 30 days. The view you are requesting can be made with C-u 30 C-c a a or with a simple custom command that sets org-agenda-span to 30 in the options section of the command. I am (almost) to afraid to ask here (OT, newbee, ...): For now I used: ,[ from my .emacs ] | (defun vk-export-agenda() | Exports monthly Org-mode agenda to agenda.ics file | (interactive) | (org-agenda-list) | (org-agenda-month-view) | (org-write-agenda ~/org-mode/agenda.ics) | ) ` I tried by myself but failed miserable. How can I add this org-agenda-span to this function definition? And: is there an (E)LISP book/URL you can recommend? I do have programming experience and I noticed that I should learn ELISP in order to get most of my editor ... Thanks again in advance! -- Karl Voit
Re: [O] ELISP
Karl Voit devn...@karl-voit.at writes: * Carsten Dominik carsten.domi...@gmail.com wrote: C-u 30 C-c a a For now I used: ,[ from my .emacs ] | (defun vk-export-agenda() | Exports monthly Org-mode agenda to agenda.ics file | (interactive) | (org-agenda-list) | (org-agenda-month-view) | (org-write-agenda ~/org-mode/agenda.ics) | ) ` I tried by myself but failed miserable. How can I add this org-agenda-span to this function definition? ,[ C-h k C-c a ] | a Call `org-agenda-list' to display the agenda for current day or | week. ` ,[ C-h f org-agenda-list ] | (org-agenda-list optional INCLUDE-ALL START-DAY SPAN) | ... | With a numeric prefix argument in an interactive call, the agenda will | span INCLUDE-ALL days. Lisp programs should instead specify SPAN to change | the number of days. SPAN defaults to `org-agenda-span'. ` So, try (org-agenda-list nil nil 30) (org-write-agenda ~/org-mode/agenda.ics) And: is there an (E)LISP book/URL you can recommend? I do have programming experience and I noticed that I should learn ELISP in order to get most of my editor ... An Introduction to Programming in Emacs Lisp should come with your emacs. Good way to get started. And The Emacs Lisp Reference Manual is very useful, too. hth, my elips knowledge is *very* limited, though ... Memnon
Re: [O] [RFC] Standardized code block keywords
Daniel Bausch danielbau...@gmx.de writes: Am Freitag, 21. Oktober 2011, 21:10:27 schrieb Thomas S. Dye: Eric Schulte schulte.e...@gmail.com writes: I'm confused by [3] so I will say nothing for now, except to ask some questions: are we talking about what a human would use to label a piece of data for consumption by a block (including perhaps the future possibilities of lists and paragraphs that Tom brought up)? what babel would use to label a results block (possibly so that it could be consumed by another block in a chain)? both? would that mean that #+tblname would go the way of the dodo and that tables would be labelled with #+data (or #+object or whatever else we come up with)? +1 (Confused, too) well, I guess it is good that this discussion has begun if only to clear up this lingering uncertainty. I wasn't even aware of #+DATA. Does it do anything TBLNAME and SRCNAME don't? from the prospective of code blocks it is exactly synonymous with tblname. Srcname is different in that it labels code blocks. A reason to keep TBLNAME is that it's also used by the spreadsheet remote references. If Babel looked for DATA instead, a table that is both a remote reference for another spreadsheet and a data source for a src block would need both TBLNAME and DATA, which seems redundant. agreed, I'm thinking that tblname will at least remain an option no matter what decision is made. As for labeling lists and paragraphs, I recall from the list that Nicolas Goaziou is working on a generalized way to set captions, labels and attributes for various kinds of Org block, as is possible now for tables and images. I thought that sounded promising. I don't know if he planned for block names, too (currently we have tblname but no imgname), but that could make sense. In which case it might be a good idea to coordinate. Agreed, I was not aware of this work. Thanks for sharing. In this vein I would like to voice my desire to be able to add captions to code blocks, the lack of this feature has bitten me in the past. Hi Eric, For LaTeX export, the listings package has support for code block captions. Not in org AFAIK, org only supports these for my use cases not very useful function name = exports. I patched org to produce real captions instead, but my changes are not that well tested and required some changes in the central export logic. If there is interest I could share what I have so far. The code quality is a mess, as I do not really know elisp. Daniel Yes, source code block captions currently have to be handled outside the usual Org-mode mechanism. If you use org-special-blocks and the listings package, then the following template will give you floating code block listings with captions in LaTeX export. : #+BEGIN_listing : source block : #+LATEX: \caption[The short caption]{The long caption.}\ref{fig:src_blk} : #+END_listing This doesn't do anything for export to other formats, but it works well for LaTeX export. There is even \listoflistings command to produce a list of source code listings in the front matter. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] notify, when something to do
pmli...@free.fr (Peter Münster) writes: Hi Peter, I would like to be notified[1], when a todo item enters the warning period, scheduled time, or deadline. I export my org entries as appt alarms, so that I get system notifications 15 minutes before meetings (every 1 minute until I discard them). Here's the code: --8---cut here---start-8--- (defvar th-notify-title-to-id-map (make-hash-table :test 'string=) Maps TITLE values of notifications to the last notification ID. If ID is -1, then any further notifications with that body will be skipped.) (defun th-notify (rest args) Create a notification popup. For ARGS, see `notifications-notify'. There's some new default behavior over the function above: - Notifications with same :body replace each other. :body, because my notifications are usually something like :title \Meeting with Hugo\ :body \In 15 Minutes\ where each minute a similar notification with decreasing minutes in the :body is triggered. - If a notification was dismissed, then don't show any notifications with that :title anymore (the next 15 minutes). - Use unlimited timeout. (require 'notifications) (let* ((title (plist-get args :body)) (body (plist-get args :body)) (replaces-id (or (plist-get args :replaces-id) (gethash title th-notify-title-to-id-map))) (on-close (or (plist-get args :on-close) `(lambda (id reason) (when (eq reason 'dismissed) ;; Mark as don't show again! (puthash ,title -1 th-notify-title-to-id-map) ;; But clear that dont-show-mark after 15 minutes (run-with-timer (* 15 60) nil (lambda () (remhash ,title th-notify-title-to-id-map))) ;; 0 means, it should not expire at all (timeout (or (plist-get args :timeout) 0))) (unless (eql replaces-id -1) (puthash title (apply 'notifications-notify (th-plist-put-many args :timeout timeout :replaces-id replaces-id :on-close on-close)) th-notify-title-to-id-map (defun th-appt-alarm (mins time text) Show a notification popup (or update the current one) for the appt with TEXT in MINS minutes (a string). (let ((body (substring-no-properties text))) (th-notify :title text :body (concat Appointment (if (string= mins 0) NOW: (concat in mins minutes:)) (setq appt-display-format 'window appt-disp-window-function 'th-appt-alarm appt-display-interval 1 appt-display-duration 60) (defun th-org-agenda-to-appt () (require 'org-agenda) (org-agenda-to-appt t) (appt-activate 1)) (th-org-agenda-to-appt) (add-hook 'org-finalize-agenda-hook 'th-org-agenda-to-appt) --8---cut here---end---8--- Bye, Tassilo
Re: [O] Can't use char in TODO state
Jambunathan K kjambunat...@gmail.com writes: Note the regression in TOC with this commit. The HTML file was produced by C-C C-e b (by org-html.el) with emacs -Q. I think this should be fixed now. Regards, -- Nicolas Goaziou
Re: [O] Odd export of a selected tree
Bastien b...@altern.org Sat, 22 Oct 2011 12:35:51 +0200 Hi Eythan, eythan...@gmail.com (Eythan Weg) writes: Hi, Consider a file containing something like: * Test :export: * Test 2 And now export it, say to ascii format. I get a buffer containing: 1 Test :export: Is this expected? Use (setq org-export-with-tags nil) or #+OPTIONS: tags:nil directly in your org buffer. The :export: tag will still do its job. Yes, thank you. Eythan
Re: [O] notify, when something to do
Tassilo Horn tass...@member.fsf.org writes: (defvar th-notify-title-to-id-map (make-hash-table :test 'string=) Maps TITLE values of notifications to the last notification ID. If ID is -1, then any further notifications with that body will be skipped.) (defun th-notify (rest args) Create a notification popup. For ARGS, see `notifications-notify'. There's some new default behavior over the function above: - Notifications with same :body replace each other. :body, because my notifications are usually something like :title \Meeting with Hugo\ :body \In 15 Minutes\ where each minute a similar notification with decreasing minutes in the :body is triggered. This comment is obviously outdated. The notifications with equal :title now replace each other. Bye, Tassilo
Re: [O] Output to shell when calling emacsclient?
Herbert Sitz hesitz at gmail.com writes: Can't get it to work in Windows, though. In Windows it runs in the gui server with correct output in Emacs server in the Messages buf and on the minibuf command line. But not output in the terminal. In case anyone cares -- I know the number of people using emacsclientw is probably tiny -- the workaround I'm using in Windows is just to pipe it to 'cat'. So this does work to output on the terminal: emacsclientw --eval ^(message \^Hi there\^)^ | cat -- Herb
Re: [O] org-capture and XEmacs, indenting too far
Hello Michael, Michael Sperber sper...@deinprogramm.de writes: Looking at this again, my analysis was stupid: The problem is that the indirect buffer used for capture is not in org-mode at all, and that is indeed an XEmacs-specific problem, as `make-indirect-buffer' does not accept the 'clone argument on XEmacs. I therefore retract the rubbish I sent earlier and suggest this one instead: Thanks for the analysis and solution. May I ask you to resend the patch with a proper ChangeLog? The simple way is to commit your changes on a newbranch then to create the patches with ~$ git format-patch master..newbranch Thanks a lot for your effort, -- Bastien
Re: [O] FYI: Org mode testing framework, Emacs 23 and 22
Hello, Eric Schulte schulte.e...@gmail.com writes: $ time emacs -Q --batch \ -l ~/.emacs.d/src/org/testing/org-test.el \ --eval (setq org-confirm-babel-evaluate nil) \ -f org-test-run-batch-tests 2/dev/null 1/dev/null \ 4.00s user 0.44s system 56% cpu 7.834 total So at 8 seconds (on my machine) it shouldn't put too much load on the server to run after every commit, we would just want to be sure that multiple instances of the test suite are not run at once. A check to only run the suite if it is not currently running shouldn't be difficult to run. I can work with Jason offline to figure out how to set this up. I blindly trust you and Jason for finding the best solution here. If having tests after each commit does not create unwanted complexity, let's go with it. Thanks, -- Bastien
Re: [O] Can't use char in TODO state
Nicolas Goaziou n.goaz...@gmail.com writes: If so, then Nicolas please apply it. It really simplifies the way headlines are matched in many places in the code. I've applied it. Thanks a lot. -- Bastien
Re: [O] notify, when something to do
On Sun, Oct 23 2011, Tassilo Horn wrote: pmli...@free.fr (Peter Münster) writes: I would like to be notified[1], when a todo item enters the warning period, scheduled time, or deadline. I export my org entries as appt alarms, so that I get system notifications 15 minutes before meetings (every 1 minute until I discard them). Here's the code: Hello Tassilo, First, I took a look at the lines --8---cut here---start-8--- (org-agenda-to-appt t) (appt-activate 1) --8---cut here---end---8--- This is already a good starting point, just 3 remarks: - I think, I'll need a filter for org-agenda-to-appt, because I only want TODO items. Should be no problem. - How to distinguish between SCHEDULED and DEADLINE? I'll investigate... - Perhaps the main problem: appt does not know about warning periods. There are items with -3d, other with -5M[1]. There is only one universal appt-message-warning-time. Would it be possible, to have a individual warning-time for each todo-item, directly computed from the warning time in the org-timestamp? In the meantime, I'll take a look at your th-appt-alarm. Thanks for your code! Peter Footnotes: [1] That means warn 5 minutes before. I don't know, if org-mode supports this. -2H for hours would be useful too.
Re: [O] notify, when something to do
pmli...@free.fr (Peter Münster) writes: Hi Peter, First, I took a look at the lines (org-agenda-to-appt t) (appt-activate 1) This is already a good starting point, just 3 remarks: - I think, I'll need a filter for org-agenda-to-appt, because I only want TODO items. Should be no problem. Yep. - How to distinguish between SCHEDULED and DEADLINE? I'll investigate... - Perhaps the main problem: appt does not know about warning periods. There are items with -3d, other with -5M[1]. There is only one universal appt-message-warning-time. Would it be possible, to have a individual warning-time for each todo-item, directly computed from the warning time in the org-timestamp? Not sure about the last two. But maybe one could change `org-agenda-to-appt' to accept also a function as filter. Bye, Tassilo
[O] Patch: maintain window configuration when org-agenda-follow-indirect is set
From 5adafd491f520908c8ee180c1b0d63d877fa8547 Mon Sep 17 00:00:00 2001 From: Dave Abrahams d...@boostpro.com Date: Sun, 23 Oct 2011 14:41:44 -0400 Subject: [PATCH] Maintain stable window configuration when org-agenda-follow-indirect is set Without this change, org-agenda-follow-indirect tends to cause the window configration to bounce around chaotically as you move from item to item. --- lisp/org-agenda.el | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index e4b1ba5..639ee23 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7168,6 +7168,23 @@ With numerical prefix arg ARG, go up to this level and then take that tree. With a \\[universal-argument] prefix, make a separate frame for this tree (i.e. don't use the dedicated frame). (interactive) + (if (and current-prefix-arg (listp current-prefix-arg)) + (org-agenda-do-tree-to-indirect-buffer) +(let ((agenda-window (selected-window)) + (indirect-window (get-buffer-window org-last-indirect-buffer))) + (save-window-excursion (org-agenda-do-tree-to-indirect-buffer)) + (unwind-protect + (progn +(unless indirect-window + (setq indirect-window (split-window agenda-window))) +(select-window indirect-window) +(switch-to-buffer org-last-indirect-buffer :norecord) +(fit-window-to-buffer indirect-window)) +(select-window agenda-window) + +(defun org-agenda-do-tree-to-indirect-buffer () + Implements org-agenda-tree-to-indirect-buffer, but +doesn't attempt to manage stability of the window configuration. (org-agenda-check-no-diary) (let* ((marker (or (org-get-at-bol 'org-marker) (org-agenda-error))) -- 1.7.6.1 -- Dave Abrahams BoostPro Computing http://www.boostpro.com
[O] patch: accept lazy filter in org-agenda-to-appt
Hello, I use `org-agenda-to-appt' this way: --8---cut here---start-8--- (org-agenda-to-appt t '((headline TODO))) --8---cut here---end---8--- But this works only with the following patch: --8---cut here---start-8--- === modified file 'lisp/org/org-agenda.el' --- lisp/org/org-agenda.el 2011-09-02 16:38:40 + +++ lisp/org/org-agenda.el 2011-10-23 19:43:51 + @@ -8415,10 +8415,12 @@ (ok (or (null filter) (and (stringp filter) (string-match filter evt)) (and (listp filter) - (or (string-match - (cadr (assoc 'category filter)) cat) - (string-match - (cadr (assoc 'headline filter)) evt)) + (let ((cat-filter (cadr (assoc 'category filter))) + (evt-filter (cadr (assoc 'headline filter + (or (or (eq cat-filter nil) + (string-match cat-filter cat)) + (or (eq evt-filter nil) + (string-match evt-filter evt ;; FIXME: Shall we remove text-properties for the appt text? ;; (setq evt (set-text-properties 0 (length evt) nil evt)) (when (and ok tod) --8---cut here---end---8--- -- Peter
Re: [O] Feature idea: show last log entry
on Wed Oct 12 2011, Achim Gratz Stromeko-AT-nexgo.de wrote: Dave Abrahams d...@boostpro.com writes: Generally I'm interested in keeping log entries for my Org items for historical purposes only (so I like to stash them away in a :LOGBOOK: drawer), but on a day-to-day basis I'm interested in the very latest log entry; it tells me about the status of the item. For example, if I've made a task DELEGATED, the latest log entry usually has the person I've delegated it to and often a link to the mail message in which I did the delegation. So I'd like a feature that would leave the latest log entry outside the drawer, and always file the previous log entry into the drawer when I make a new one. I'm currently using something similar with two drawers back-to-back: :LOGBOOK: shiny :END: :CLOSED: old cruft :END: That means I have to move old stuff by hand from LOGBOOK to CLOSED (what I really do is move the :END:/:CLOSED: markers normally), but the way I'm using this it hasn't been too much trouble. Yeah... that's really not what I want: a) because it would be too much trouble for me :-) b) because it would take up screen real-estate to show :LOGBOOK: and :END: about which I don't care at all. That said, I've been thinking of extending drawers to have stops, that is each visibility cycle on a drawer would just pull it out to the next stop. Specifically for timestamps there should be some function to auto-move the stop (current+last week for instance). Presumably if that was made into a more general function one could also just keep a certain number of lines before the stop. That too sounds cool, but really not what I'm after because of the extra verbosity. With every item there's information that's current and then there's the change history, and I want to keep the current information outside the drawer. -- Dave Abrahams BoostPro Computing http://www.boostpro.com
Re: [O] Feature idea: show last log entry
on Wed Oct 12 2011, Bernt Hansen bernt-AT-norang.ca wrote: Dave Abrahams d...@boostpro.com writes: Generally I'm interested in keeping log entries for my Org items for historical purposes only (so I like to stash them away in a :LOGBOOK: drawer), but on a day-to-day basis I'm interested in the very latest log entry; it tells me about the status of the item. For example, if I've made a task DELEGATED, the latest log entry usually has the person I've delegated it to and often a link to the mail message in which I did the delegation. So I'd like a feature that would leave the latest log entry outside the drawer, and always file the previous log entry into the drawer when I make a new one. Thoughts? I log stuff in :LOGBOOK: with the items reversed so the newest is always on top. Mine are ordered that way too. SPC on a task in the agenda opens the task including the drawer Actually I think Carsten fixed that thing-I-thought-was-a-bug-but-you-thought-was-a-feature. At least it doesn't do that for me anymore. so I can see the details for any given task. I'm using the new org-agenda-follow-indirect feature with this patch (http://patchwork.newartisans.com/patch/1004/)... and the idea is to get a somewhat minimal view of the item. I don't want to open the whole thing. But I can understand why nobody else would be calling for this feature since probably I'm the only one using org-agenda-follow-indirect ATM. -- Dave Abrahams BoostPro Computing http://www.boostpro.com
Re: [O] patch: accept lazy filter in org-agenda-to-appt
Hello, The following patch replaces the previous one: --8---cut here---start-8--- === modified file 'lisp/org/org-agenda.el' --- lisp/org/org-agenda.el 2011-09-02 16:38:40 + +++ lisp/org/org-agenda.el 2011-10-23 20:03:11 + @@ -8415,10 +8415,12 @@ (ok (or (null filter) (and (stringp filter) (string-match filter evt)) (and (listp filter) - (or (string-match - (cadr (assoc 'category filter)) cat) - (string-match - (cadr (assoc 'headline filter)) evt)) + (let ((cat-filter (cadr (assoc 'category filter))) + (evt-filter (cadr (assoc 'headline filter + (or (and (stringp cat-filter) + (string-match cat-filter cat)) + (and (stringp evt-filter) + (string-match evt-filter evt ;; FIXME: Shall we remove text-properties for the appt text? ;; (setq evt (set-text-properties 0 (length evt) nil evt)) (when (and ok tod) --8---cut here---end---8--- Sorry for the noise... -- Peter
Re: [O] Feature idea: show last log entry
Dave Abrahams d...@boostpro.com writes: on Wed Oct 12 2011, Bernt Hansen bernt-AT-norang.ca wrote: SPC on a task in the agenda opens the task including the drawer Actually I think Carsten fixed that thing-I-thought-was-a-bug-but-you-thought-was-a-feature. At least it doesn't do that for me anymore. so I can see the details for any given task. This still works for me in Org-mode version 7.7 (release_7.7.447.g77eeb). -Bernt
Re: [O] Byte compiler warnings
Hi Achim, Achim Gratz strom...@nexgo.de writes: In org-agenda-get-blocks: org-agenda.el:5434:42:Warning: assignment to free variable `category-pos' org-agenda.el:5434:20:Warning: reference to free variable `category-pos' I just fixed this. I'm still getting the same error with commit e0c1855 included. The rest of your fixes did quell the warnings from the byte compiler. You're right, I've just fixed this for good. Thanks! -- Bastien
Re: [O] notify, when something to do
Hi Tassilo, Tassilo Horn tass...@member.fsf.org writes: But maybe one could change `org-agenda-to-appt' to accept also a function as filter. Done. You can now use a fonction as a filter. It will filter through entries. the only mandatory argument for this function will be an entry, i.e. something similar to what `org-agenda-get-day-entries' outputs. Thanks for this idea! -- Bastien
Re: [O] notify, when something to do
Hi Peter, pmli...@free.fr (Peter Münster) writes: - I think, I'll need a filter for org-agenda-to-appt, because I only want TODO items. Should be no problem. Yes -- just use a function who tries to match the TODO keyword against the entry. - How to distinguish between SCHEDULED and DEADLINE? I'll investigate... I introduced the ability to use (org-agenda-to-appt nil t :scheduled) if you just want to get scheduled appointments. This might speeds things and make them more flexible. - Perhaps the main problem: appt does not know about warning periods. There are items with -3d, other with -5M[1]. There is only one universal appt-message-warning-time. Would it be possible, to have a individual warning-time for each todo-item, directly computed from the warning time in the org-timestamp? Check what info is available as text properties in the agenda (with `C-u C-x =') and see if you can use this information in a filter function. HTH, -- Bastien
Re: [O] Feature idea: show last log entry
on Sun Oct 23 2011, Bernt Hansen bernt-AT-norang.ca wrote: Dave Abrahams d...@boostpro.com writes: on Wed Oct 12 2011, Bernt Hansen bernt-AT-norang.ca wrote: SPC on a task in the agenda opens the task including the drawer Actually I think Carsten fixed that thing-I-thought-was-a-bug-but-you-thought-was-a-feature. At least it doesn't do that for me anymore. so I can see the details for any given task. This still works for me in Org-mode version 7.7 (release_7.7.447.g77eeb). Yeah, but I'm way ahead of that commit. -- Dave Abrahams BoostPro Computing http://www.boostpro.com
Re: [O] Feature idea: show last log entry
Dave Abrahams d...@boostpro.com writes: on Sun Oct 23 2011, Bernt Hansen bernt-AT-norang.ca wrote: Dave Abrahams d...@boostpro.com writes: on Wed Oct 12 2011, Bernt Hansen bernt-AT-norang.ca wrote: SPC on a task in the agenda opens the task including the drawer Actually I think Carsten fixed that thing-I-thought-was-a-bug-but-you-thought-was-a-feature. At least it doesn't do that for me anymore. so I can see the details for any given task. This still works for me in Org-mode version 7.7 (release_7.7.447.g77eeb). Yeah, but I'm way ahead of that commit. And where might that be? origin/master is currently release_7.7-452-g767f518 so maybe you have local commits in your history that is changing this behaviour? -Bernt
Re: [O] git describe in version of info file with make info_git_describe
On Oct 16, 2011, at 9:12 PM, Michael Brand wrote: I made a new patch replacing the previous, now considering the Makefile targets target and help introduced meanwhile by Achim Gratz and with a shorter name info-vg for the new target for easier typing of the make command. The previous patch attachment had a wrong mime type, could therefore not be caught by patchwork and has not been accepted. Michael Carsten Dominik carsten.domi...@gmail.com writes: Hi, is there an agreement that this is a good patch? I have not followed the discussion. - Carsten I'm fine with the actual text change for the version number so it matches the git describe command. I'm not sure if all of the make target changes make sense since I don't normally use those. Regards, Bernt
Re: [O] [RFC] Standardized code block keywords
Hi Eric, Hi Seb, Eric Schulte wrote: We could open an older file and if it isn't working, we could try #+PROPERTY: babel-function-set obsolete I think that making use of such a feature is almost as onerous as changing to the new terms (which is a simple search replace, in fact once terms are selected I'll happily share a function on list which can be used to convert all old terms in existing Org-mode files). Ok, I agree with both of you. Keeping obsolete functions active might be more difficult then just asking people to change the tiny bits and pieces. I like the idea to having a function to convert old syntax to new syntax (semi)automatically. Python did the same with there 2to3 script and I was able to convert large parts of my scripts without problems. Only make sure that the BIG BANG is really loud reaching all babelers out there (including the ones not on this mailing list and not reading changelogs) Maybe an additional function could be called for a certain time whenever old syntax is found (just a list of keywords) generating a warning that this code is obsolete pointing to a special chapter in the manual to help with conversion. That would help people to understand what is going on rather then getting a standard error message for code which run perfectly fine a few months ago. Remember, people might upgrade to emacs24 and they might not be aware that this includes updates to org-mode and org-babel. Anyhow I would like to offer to help with the manual (my lisp is to poor to help with coding). There should be a new section which helps old-babeler to change there code to the newest syntax, explain shortly changes in the syntax, etc. A two column table is often used for this | old syntax | replaced now by | | #+BABEL: | #+ PROPERTIES | Followed by some more explanation or a link to the (rewritten) manual section. Totti
Re: [O] notify, when something to do
Bastien b...@altern.org wrote: Hi Tassilo, Tassilo Horn tass...@member.fsf.org writes: But maybe one could change `org-agenda-to-appt' to accept also a function as filter. Done. You can now use a fonction as a filter. It will filter through entries. the only mandatory argument for this function will be an entry, i.e. something similar to what `org-agenda-get-day-entries' outputs. Thanks for this idea! -- Bastien Hey Bastien, This is awesome. Thanks a lot. Tassilo
Re: [O] [RFC] Standardized code block keywords
Am Sonntag 23 Oktober 2011, 18:09:01 schrieben Sie: Daniel Bausch danielbau...@gmx.de writes: Am Freitag, 21. Oktober 2011, 21:10:27 schrieb Thomas S. Dye: Eric Schulte schulte.e...@gmail.com writes: I'm confused by [3] so I will say nothing for now, except to ask some questions: are we talking about what a human would use to label a piece of data for consumption by a block (including perhaps the future possibilities of lists and paragraphs that Tom brought up)? what babel would use to label a results block (possibly so that it could be consumed by another block in a chain)? both? would that mean that #+tblname would go the way of the dodo and that tables would be labelled with #+data (or #+object or whatever else we come up with)? +1 (Confused, too) well, I guess it is good that this discussion has begun if only to clear up this lingering uncertainty. I wasn't even aware of #+DATA. Does it do anything TBLNAME and SRCNAME don't? from the prospective of code blocks it is exactly synonymous with tblname. Srcname is different in that it labels code blocks. A reason to keep TBLNAME is that it's also used by the spreadsheet remote references. If Babel looked for DATA instead, a table that is both a remote reference for another spreadsheet and a data source for a src block would need both TBLNAME and DATA, which seems redundant. agreed, I'm thinking that tblname will at least remain an option no matter what decision is made. As for labeling lists and paragraphs, I recall from the list that Nicolas Goaziou is working on a generalized way to set captions, labels and attributes for various kinds of Org block, as is possible now for tables and images. I thought that sounded promising. I don't know if he planned for block names, too (currently we have tblname but no imgname), but that could make sense. In which case it might be a good idea to coordinate. Agreed, I was not aware of this work. Thanks for sharing. In this vein I would like to voice my desire to be able to add captions to code blocks, the lack of this feature has bitten me in the past. Hi Eric, For LaTeX export, the listings package has support for code block captions. Not in org AFAIK, org only supports these for my use cases not very useful function name = exports. I patched org to produce real captions instead, but my changes are not that well tested and required some changes in the central export logic. If there is interest I could share what I have so far. The code quality is a mess, as I do not really know elisp. Daniel Yes, source code block captions currently have to be handled outside the usual Org-mode mechanism. If you use org-special-blocks and the listings package, then the following template will give you floating code block listings with captions in LaTeX export. : #+BEGIN_listing : : source block : : #+LATEX: \caption[The short caption]{The long caption.}\ref{fig:src_blk} : #+END_listing This doesn't do anything for export to other formats, but it works well for LaTeX export. There is even \listoflistings command to produce a list of source code listings in the front matter. All the best, Tom Thank you for this hint, but with my patches, I'm able to write #+caption: A Code Snippet #+label: lst:xyz #+begin_src lang #+end_src What I'd like to add, is that the listings implementation in org has a bug, which I also fixed. If you mix #+begin_src and #+begin_example blocks in one document, then the #+begin_example blocks are syntax highlighted analog to the previous #+begin_src block because the language is selected by \lstset. In my patches I'm using the 'language' attribute of \begin{lstlisting}, which does not affect following blocks that do not have this attribute. I have attached my patch. I suspect that there might be a bug in it, that disables that tables that have #+attr_latex can be used by babel using #+tblname, because I observed such a behavior recently. It is possible that this second defect might origin from somewhere else, too. Daniel diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 2aad322..8255021 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1171,7 +1171,15 @@ on this string to produce the exported version. ;; Export code blocks (org-export-blocks-preprocess) + ;; Select and protect backend specific stuff, throw away stuff + ;; that is specific for other backends + (run-hooks 'org-export-preprocess-before-selecting-backend-code-hook) + (org-export-select-backend-specific-text) + + ;; Attach captions to the correct object + (setq target-alist (org-export-attach-captions-and-attributes target-alist)) ;; Mark lists with properties + (org-export-mark-list-properties) ;; Handle source code snippets @@ -1213,11 +1221,6 @@ on this
Re: [O] patch: accept lazy filter in org-agenda-to-appt
Hi Peter, pmli...@free.fr (Peter Münster) writes: The following patch replaces the previous one: The patch is correct, thanks. Could you send it using git format-patch, taking care of adding a small ChangeLog for this? Since it is a small change, please add TINYCHANGE at the end of your commit message. Please read http://orgmode.org/worg/org-contribute.html if you have any question. It makes things way easier for me! Thanks a lot, -- Bastien