I have an action "@tum GPC-Daten/wässrig mit nach hause nehmen" which cannot be marked as done via the html-list of nextactions (set its mark). Btw, the odd symbols were an umlaut which either got killed somehere in the GTDAlt bundle.
Yeah, I know, those guys with the weird keyboard layouts… ;)
Dan
On Jul 28, 2006, at 11:13 AM, Daniel Käsmayr wrote:
Yeah, I know, those guys with the weird keyboard layouts… ;)
My thoughts precisely ;)
In this case the problem I think is the weird characters, nothing to do with your keyboard layout. I am guessing they are not escaped properly. In general I must admit that throughout the code I am making the implicit assumption that I am not dealing with any weird unicode characters, since Ruby's unicode support is not sterling by default. I'll see what I can do in this particular case.
Dan
Haris
Am 28. Jul 2006 um 22:46 schrieb Charilaos Skiadas:
Yeah, I know, those guys with the weird keyboard layouts… ;)
My thoughts precisely ;)
I just added the line since many of those keyboard shortcuts are just not useful on a german keyboard - all the {}-fu and such…
But: the bundle is great!
What I would love to see in it is some way to keep someday/maybe projects in it as well, but hidden from the next action lists… and, of course, backpackit-synch ;) and some weird snippet/command with a keystroke of apple-alt-shift-43 or so ;) ticklers? a shells script that can be run with cron so it keeps everything up- to-date and synched ;) and of course growl-support and widgets and a pretty icon
Dan, being silly, just a bit. …how many more gtd-clichés can we get into the bundle?
On 28/7/2006, at 22:46, Charilaos Skiadas wrote:
[...] since Ruby's unicode support is not sterling by default. I'll see what I can do in this particular case.
What does the code do? Normally no special unicode support should be necessary to work with strings.
Though if the strings contain non-ASCII code points then these will be stored as two ore more bytes, so never do str[0] and expect to extract one code point unless you already know that it’s an ASCII character.
Set $KCODE = 'U' or give -KU as argument (e.g. in shebang) to make regular expressions multi-byte aware. This means having ‘.’ match multi-byte characters (as one code point) etc.
Should you need to explode a string into code points then either do str.unpack('U*') or if you have set KCODE you can also do str.split (//) -- the former splits into Fixnums the latter into Strings.
On Jul 28, 2006, at 4:38 PM, Allan Odgaard wrote:
On 28/7/2006, at 22:46, Charilaos Skiadas wrote:
[...] since Ruby's unicode support is not sterling by default. I'll see what I can do in this particular case.
What does the code do? Normally no special unicode support should be necessary to work with strings.
Here is the code that creates the link, which is what causes the problem:
def mark_completed_link(attributes={}) s = "<input type="checkbox" href="#"" attributes.each do |key,value| s << " #{key.to_s}="#{value.to_s}"" end pathToScript = File.join(ENV ['TM_BUNDLE_SUPPORT'],"bin","mark_completed.rb") string_to_execute = (e_js_sh pathToScript) + " #{e_js_sh self.name} #{e_js_sh self.file.to_s} #{e_js_sh self.line}" s << " onClick='TextMate.system("2>/dev/console # {string_to_execute}", null); return false;'" s << ">Mark!</a>" end
Haris
Should have included the code for the escaping. Here it is:
def e_sh(str) str.to_s.gsub(/[^a-zA-Z0-9_./]/, "\\\0") end # first escape for use in the shell, then escape for use in a JS string def e_js_sh(str) (e_sh str).gsub("\", "\\\\") end
Here is the code that creates the link, which is what causes the problem:
def mark_completed_link(attributes={}) s = "<input type="checkbox" href="#"" attributes.each do |key,value| s << " #{key.to_s}="#{value.to_s}"" end pathToScript = File.join(ENV ['TM_BUNDLE_SUPPORT'],"bin","mark_completed.rb") string_to_execute = (e_js_sh pathToScript) + " #{e_js_sh self.name} #{e_js_sh self.file.to_s} #{e_js_sh self.line}" s << " onClick='TextMate.system("2>/dev/console # {string_to_execute}", null); return false;'" s << ">Mark!</a>" end
Haris
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Haris
On 29/7/2006, at 0:24, Charilaos Skiadas wrote:
Should have included the code for the escaping. Here it is:
def e_sh(str) str.to_s.gsub(/[^a-zA-Z0-9_./]/, "\\\0") end
I reckon this is from Support/lib/escape.rb?
Try this version instead:
def e_sh(str) str.to_s.gsub(/(?=[^a-zA-Z0-9_./-\x7F-\xFF])/, '\') end
On Jul 28, 2006, at 6:29 PM, Allan Odgaard wrote:
On 29/7/2006, at 0:24, Charilaos Skiadas wrote:
Should have included the code for the escaping. Here it is:
def e_sh(str) str.to_s.gsub(/[^a-zA-Z0-9_./]/, "\\\0") end
I reckon this is from Support/lib/escape.rb?
Try this version instead:
def e_sh(str) str.to_s.gsub(/(?=[^a-zA-Z0-9_.\/\-\x7F-\xFF])/, '\\') end
I just committed it. Dan, can you update and see if this behaves better?
Haris