[O] bad text pointer cursor: BadValue (integer parameter out of range for operation)
Hi, I'm trying to make an org-capture frame so I can call it conveniently with a keystroke and emacsclient will launch and bring up org-capture. This works, and it is very convenient for my workflow. Basically I do the following in my awesome window manager configuration: awful.key({ modkey }, q, function () awful.util.spawn(emacsclient --eval '(make-capture-frame)') end), That allows me to hit Super-q and then it will spawn: emacsclient --eval '(make-capture-frame)' which I have defined in my .emacs.d/my-org.el as follows: (defun make-capture-frame () Create a new frame and run org-capture. (interactive) (make-frame '((name . capture) (width . 80 ) (height . 10))) (select-frame-by-name capture) (org-capture) (delete-other-windows) ) Everything works great, except... at some point, something happens and I can no longer open a capture frame. When I hit the key nothing happens, so I execute the emacsclient line in a shell and what I get is: *ERROR*: bad text pointer cursor: BadValue (integer parameter out of range for operation) I have no idea what this means, or how to debug it. I can still run M-x org-capture, so that seems to still work, but otherwise I'm puzzled...So I turn to you wizards for some help and guidance! thanks for any ideas or suggestions for improvement, micah --
[O] org-capture-hook only when in frame?
I have a function to create a frame for capture mode that I can call with emacsclient at any time: ;; Initialization of capture frames (defun make-capture-frame () Create a new frame and run org-capture (interactive) (make-frame '((name . capture) (width . 80) (height . 10))) (select-frame-by-name capture) ;; Org-remember splits windows, force it to a single window (add-hook 'org-capture-mode-hook 'delete-other-windows) (org-capture) ) This works great, however I actually would like org-capture-mode to split the screen when I am *not* calling this function, but it seems like when I have this existing, it deletes the other window even when I am inside the original emacs. thanks for any hints! micah -- pgpGfupcEBWJp.pgp Description: PGP signature
Re: [O] org-capture-hook only when in frame?
Tom Prince tom.pri...@ualberta.net writes: On Tue, 20 Sep 2011 18:45:31 -0400, Micah Anderson mi...@riseup.net wrote: Non-text part: multipart/signed I have a function to create a frame for capture mode that I can call with emacsclient at any time: ;; Initialization of capture frames (defun make-capture-frame () Create a new frame and run org-capture (interactive) (make-frame '((name . capture) (width . 80) (height . 10))) (select-frame-by-name capture) ;; Org-remember splits windows, force it to a single window (let ((org-capture-mode-hook)) (add-hook 'org-capture-mode-hook 'delete-other-windows) (org-capture) ) ) Would probably work, although there may be better ways. Actually, it seems like I didn't need to do the hook at all, I just had to put a (delete-other-window) after the (org-capture), like this: (defun make-capture-frame () Create a new frame and run org-capture. (interactive) (make-frame '((name . capture) (width . 80 ) (height . 10))) (select-frame-by-name capture) (org-capture) (delete-other-windows) ) Now I am trying to get the frame to be destroyed after I've either canceled, or saved the capture, I found these referenced on the mailing list, and I've added them and loaded them, but for some reason they aren't working: (defadvice capture-finalize (after delete-capture-frame activate) Advise capture-finalize to close the frame if it is the capture frame (if (equal capture (frame-parameter nil 'name)) (delete-frame))) (defadvice capture-destroy (after delete-capture-frame activate) Advise capture-destroy to close the frame if it is the rememeber frame (if (equal capture (frame-parameter nil 'name)) (delete-frame))) what happens is I get the frame, I get the org-capture template, I enter my item, I finalize it, and then I'm switched back to the scratch buffer, rather than the frame being destroyed :P micah
Re: [O] org-capture-hook only when in frame?
Micah Anderson mi...@riseup.net writes: (defadvice capture-finalize (after delete-capture-frame activate) Advise capture-finalize to close the frame if it is the capture frame (if (equal capture (frame-parameter nil 'name)) (delete-frame))) (defadvice capture-destroy (after delete-capture-frame activate) Advise capture-destroy to close the frame if it is the rememeber frame (if (equal capture (frame-parameter nil 'name)) (delete-frame))) arg, these should be org-capture-finalize and org-capture-destroy... thats my problem. Sorry for the noise :) micah
Re: [Orgmode] Re: monthly report
* Carsten Dominik domi...@science.uva.nl [2009-03-18 04:42-0400]: On Mar 17, 2009, at 8:38 PM, Micah Anderson wrote: Carsten Dominik domi...@science.uva.nl writes: On May 25, 2007, at 3:41, Steven Lumos wrote: Being yet another planner switcher, I'm used to using planner- report- generate to assist me with writing a monthly activity report. I don't need fine-grained time tracking, or even most of what planner- report- generate does--it would be ideal to get just a list of TODOs that were closed between two dates and then I'll look at it while I type a few sentences in an email buffer. Is there already an easy way to get a list (I guess that a sparse tree would be most convenient for me) of TODOs marked as closed within some date range? [snip: lisp function (26 lines)] Ok, I tried this and I'm not sure what it did, if anything. I get the mini-buffer saying, 'Specified time is not representable' I've tried various date range possibilities, and can't get it to work. It seems that you are specifying the date in an invalid way. What are you typing when prompted for a date? Ok, I restarted emacs and tried again, and now I am not given this mini-buffer message at all. On restart, I found an error in my .emacs, which could have been causing this issue. Chalk that up to confused internal state I guess. However, org-closed-in-range still doesn't seem to be doing anything interesting, as far as I can tell. It folded up my org file, but thats about it. Maybe there is a better way for me to get at what I want, and I just haven't found it yet (I am pretty new at org) and debugging this might not be the best thing to do if there is something better to solve my need. I basically just need to, at the end of the week, produce a report of what I've worked on for that week, both things I finished, but also things that are still in progress. Including the time spent is useful too. I can go into the agenda and hit 'R' to get a time-table at the end of the page, but I need a more granual day-by-day breakdown (Monday: 4hrs, worked on X, Y and completed Z). thanks for your response! micah signature.asc Description: Digital signature ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: monthly report
Hi all, apologies for resurrecting an older thread, but I was searching for this very capability and found this post. Carsten Dominik domi...@science.uva.nl writes: On May 25, 2007, at 3:41, Steven Lumos wrote: Being yet another planner switcher, I'm used to using planner-report- generate to assist me with writing a monthly activity report. I don't need fine-grained time tracking, or even most of what planner-report- generate does--it would be ideal to get just a list of TODOs that were closed between two dates and then I'll look at it while I type a few sentences in an email buffer. Is there already an easy way to get a list (I guess that a sparse tree would be most convenient for me) of TODOs marked as closed within some date range? I have been trying to figure this one out myself. Thank goodness for list archives! You can use org-occur to create a tree with matches of CLOSED time stamps. And you can use the callback argument of org-occur to verify if a match is in a given time interval. Something like this: (defun org-closed-in-range () Sparse treee of items closed in a certain time range. (interactive) ;; Get the time interval from the user. (let* ((time1 (time-to-seconds (org-read-date nil 'to-time nil Starting date: ))) (time2 (time-to-seconds (org-read-date nil 'to-time nil End date:))) ;; callbakc function (callback (lambda () (let ((time (time-to-seconds (apply 'encode-time (org-parse-time-string (match-string 1)) ;; check if time in interval (and (= time time1) (= time time2)) ;; make tree, check each match with the callback (org-occur CLOSED: +\\[\\(.*?\\)\\] nil callback))) Ok, I tried this and I'm not sure what it did, if anything. I get the mini-buffer saying, 'Specified time is not representable' I've tried various date range possibilities, and can't get it to work. I did also change the '(org-occur CLOSED: +\\[\\(.*?\\)\\] nil callback)))' to be instead '(org-occur DONE +\\[\\(.*?\\)\\] nil callback)))' due to the way my org seems to represent finished items: ** DONE fix the apt puppet module to automatically add apt-keys, publish that new repository and deploy SCHEDULED: 2009-03-16 Mon - State DONE [2009-03-16 Mon 14:49] \\ made this a lot nicer CLOCK: [2009-03-16 Mon 14:21]--[2009-03-16 Mon 14:21] = 0:00 [2009-03-16 Mon] As far as I can tell, I did not setup this format. I tried to change the (org-occur CLOSED... to be DONE... instead, but no change here either. Thanks for any help! micah ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode