Hi,
I've tried to edit a post via the bloggin bundle. I was able to
retrieve the post, edited without problem, but at posting time, I get
a error to name the endpoint.
THe problem is that the Blog: header (of a moveable type blog) is
missing the #blog_id at the end, although is present in the config file.
Thanks,
--
Pedro Melo
JID: melo(a)simplicidade.org
I am trying to modify my view lists command. It is based on the TODO
bundle command, but I am trying to use string comparison instead of
regexp to test lines. As far as I can tell, the sorting is going ok,
but I'm having trouble with the output. It seems to show everything
except for the task itself (the content). Here is the code, any idea
what's going wrong? Thanks.
Mike
#!/usr/bin/env ruby
$myPath = ENV['TM_DIRECTORY']
$tags = [] #user defined contexts
def readContexts(a)
# processes contexts.gtd into script
context, tabCommand, tabString, regex, color = a.split(/\|/)
$tags.push({:label => context, :regexp => regex, :color =>
color, :matches => []})
end
require "#{ENV['TM_SUPPORT_PATH']}/lib/textmate"
require "erb"
include ERB::Util
def TextMate.file_link (file, line = 0)
return "txmt://open/?url=file://" +
file.gsub(/[^a-zA-Z0-9.-\/]/) { |m| sprintf("%%%02X", m[0]) } +
"&line=" + line.to_s
end
# the contexts.gtd file is read, and converted into $contexts
file = File.open($myPath+"/contexts.gtd", "r")
file.each do |line|
readContexts(line)
end
# sorting happens
$tags.each do |tag|
context = tag[:label]
myFiles = Dir.entries($myPath)
myFiles.each do |fileName|
if (fileName[-3,3] == "gtd") and (fileName != "contexts.gtd")
lineno = 0
mFile = File.open(fileName)
mFile.each do |line|
lineno = lineno + 1
re = /\s/
ctask = re.match(line)
if ctask.pre_match == context
results = {
:file => fileName[0..-5],
:line => lineno,
:content => ctask.post_match
}
results[:match] = html_escape($1)
tag[:matches] << results
end
end
end
end
end
tmpl_file = "#{ENV['TM_BUNDLE_SUPPORT']}/template.rhtml"
puts ERB.new(File.open(tmpl_file), 0, '<>').result
> It's not happening here. Is this consistent? Is it always the Finder,
> or whatever the “previous application” is?
Always the finder.
> Do you use any programs like LiteSwitchX? I do, but I don't know if
> this would affect things.
Nope. Fresh Tiger install, though I did copy over ~/Library/
Application Support/TextMate and ~/Library/Preferences/
com.macromates.textmate.plist.
> Do you notice this only with the date dialog, not with the choose
> context dialog or other dialogs?
Just tested the choose context dialog and got the same issue.
> Do you have your own CocoaDialog installed, or just the one that
> comes with TextMate?
Just the one that comes with TxMt.
Thanks for your assistance, hope this helps. Best regards,
Ben
I know I got turned onto the wonderful Vera monospaced font through
this list, so I thought folks might be interested that there's an
effort to greatly improve Vera.
Vera's an open source font, but is apparently not maintained by
Bitstream. So it's been forked as Deja Vu. From glancing at the
project's history page, and playing around with it a bit, it seems
every bit as good as Vera, and has far better international support
-- I noticed less-common diacriticals and Cyrillic glyphs, to start,
and it seems there are many more. They are intent on making it a
full Unicode font.
More info here:
http://dejavu.sourceforge.net/wiki/index.php/Main_Page
Although most of the installation instructions seem complicated, for
us OS X users it's easy: just download the zip file, and add the .ttf
fonts to your system.
--John
Hi peeps. I was told this was the best place to put this. I've had a
hunt round the mailing list archives and dug up an elegant solution
here or there for Vim-style comment block behaviour, but nothing
obsessive-compulsive enough to quite satisfy me. So here's mine! I
hope you find it useful.
#!/usr/bin/env ruby
# TextMate command to continue block comment
# Preserves whitespace before and after asterisk
# Save: Nothing
# Input: Selected Text / Line
# Output: Insert as Snippet
# Activation: Key Equivalent
# Scope: comment.block
line = ENV['TM_CURRENT_LINE']
caret = ENV['TM_LINE_INDEX'].to_i
before = (caret > 0) ? line[0..caret-1] : ''
after = line[caret..-1]
before =~ /^(\s*)(\/)?\*(\s*)/
if $&
spc = $2 ? ' ' : ''
printf before + "\n#{$1}#{spc}*#{$3}$0" + after
else
before =~ /^(\s*)/
printf before + "\n#{$1}$0" + after
end
This is also my first ever custom command, so it might look a bit
rough. Also, it doesn't insert the space after the asterisk by
default, but by its very indentation-preserving nature will happily
add it after you type one out on the first line.
I guess if there IS a way to do this with a snippet after all, I'm
going to look a bit silly.
Hi,
While tracking down some unrelated issue, I ran into a problem with svn
blame. It breaks when you apply it to files that are not versioned:
> NoMethodError
>
> reason: undefined method `+' for nil:NilClass
> trace:
> /Library/Application Support/TextMate/Bundles/Subversion.tmbundle/Support/format_blame.rb:49
> /Library/Application Support/TextMate/Bundles/Subversion.tmbundle/Support/format_blame.rb:43
Could someone please have a look at this?
Thanks,
Jeroen.
> I can't reproduce this here. Can you give us a precise step-by-step?
1. Open todo.gtd.
2. Create a project and an action
3. Hit "#"
4. Hit "Enter" to set the date to "today"
5. Focus goes back to Finder instead of TxMt
- Ben
After entering the date in the CocoaDialog popup, TxMt is losing
focus. The date is still getting written to the file. Any thoughts on
what might be the issue?
Ben