Thanks again for this fabulous bundle. A few small issues: 1) I was wondering if you could post the script you wrote in an earlier version of the bundle for moving the date ahead a day with a keystroke. It would be very handy for me. 2) When I go into Review--> Current Actions mode, there are check boxes ("Mark") next to each item. If I check one of these, how go I get it to sync back to my gtd file and make the item as completed.
Thanks.
On Nov 29, 2006, at 10:32 AM, Lawrence Goodman wrote:
Thanks again for this fabulous bundle. A few small issues:
- I was wondering if you could post the script you wrote in an
earlier version of the bundle for moving the date ahead a day with a keystroke. It would be very handy for me.
Well the script as is wouldn't run actually, because it called on some things that are not there any more. But it is just a question of creating a command that has input the current selection or line, output to replace selection, and it scans the current line for [\d{4} -\d{2}-\d{2}] and increases/decreases the appropriate thing. A good exercise in learning a bit about regular expressions ;)
Out of curiosity, why do you find this command useful? One of the reasons we removed it is that we didn't think it was used much. What workflow do you find benefiting from it?
- When I go into Review--> Current Actions mode, there are check
boxes ("Mark") next to each item. If I check one of these, how go I get it to sync back to my gtd file and make the item as completed.
This should have already marked the item as completed. You shouldn't have to do anything else. If it doesn't, then there's something wrong with the script.
Thanks.
Haris
Charilaos Skiadas <skiadas@...> writes:
On Nov 29, 2006, at 10:32 AM, Lawrence Goodman wrote:
Thanks again for this fabulous bundle. A few small issues:
- I was wondering if you could post the script you wrote in an
earlier version of the bundle for moving the date ahead a day with a keystroke. It would be very handy for me.
Out of curiosity, why do you find this command useful? One of the reasons we removed it is that we didn't think it was used much. What workflow do you find benefiting from it?
I also found the command quite useful (e.g., when jotting down a note containing a date I write today's date with a shortcut and then shift forwards or backwards as needed). As Haris says, it is quite easy to reproduce the commands in ruby. The following moves ahead one day:
#!/usr/bin/env ruby require 'date' print STDIN.read.sub(/(\d{4}-\d{2}-\d{2})/) {|text| "#{Date.parse(text)+1}"}
Use with Input: selected text or Line, Output: replace selected text. This command acts on a date in the format 2005-11-29 (if two dates are present on the line, only the first one is shifted). To decrease the day count by one, the command is of course
#!/usr/bin/env ruby require 'date' print STDIN.read.sub(/(\d{4}-\d{2}-\d{2})/) {|text| "#{Date.parse(text)-1}"}
and to insert today's date (with weekday)
#!/usr/bin/env ruby print Time.now.strftime("%Y-%m-%d %a ")
(Input: none, Output: Insert as text). Very simple.
Ruby is impressive, it makes everything so easy. As an exercise I just finished an I-Ching command (including interpretation, Wilhelm-style :))) If anyone is interested...
2) Also for me the checkbox works in strange ways. It is not consistent when the gtd window is updated after clicking in the checkbox; sometimes immediately, sometimes only after focus-out focus-in, and sometimes I must close the window and re-open it. But maybe I mis-interpreted something as usual
Piero
On Nov 29, 2006, at 7:31 PM, Piero D'Ancona wrote:
Charilaos Skiadas <skiadas@...> writes:
I also found the command quite useful (e.g., when jotting down a note containing a date I write today's date with a shortcut and then shift forwards or backwards as needed).
But how is that better than calling the current date command and typing the number of days you want to shift forward, or minus that number of days otherwise? i.e. if I want something due 4 days from today, I would just do: "#" followed by "4" and Return. If I want something 4 days earlier than what it currently is set to, then I would do: "#" followed by right arrow, "-4" and then Return.
- Also for me the checkbox works in strange ways. It is
not consistent when the gtd window is updated after clicking in the checkbox; sometimes immediately, sometimes only after focus-out focus-in, and sometimes I must close the window and re-open it. But maybe I mis-interpreted something as usual
It would definitely require taking the focus away from the gtd window, but that's an issue with TextMate's caching behavior. What clicking the box does is change the file in the hard disk by commenting the line. I don't have much control over when TM will update its document. Usually taking the focus away from textmate and then back should definitely do it. You could write a little command to do that via applescript.
Piero
Haris
Charilaos Skiadas <skiadas@...> writes:
But how is that better than calling the current date command and typing the number of days you want to shift forward, or minus that number of days otherwise?
Right, your new date command is amazing and it is perfect when adding a date to an action etc. But I very frequently add dates to other types of notes, I mean, not gtd files, and it is handy to have a quick shortcut to write today's date and shift it a little.
- Also for me the checkbox works in strange ways.
You could write a little command to do that via applescript.
Yes, the easiest is
osascript &>/dev/null \ -e 'tell app "SystemUIServer" to activate' \ -e 'tell app "TextMate" to activate' &
as in the bash_init.sh script. Actually you might add this to your command to ensure focus-out focus-in
Haris
Piero