Ok, this is it, I'm getting back to work. No, actually it's time for
a movie with my wife. Looks like I'll be working Sunday ;-).
This is a Wordpress plugin, a blogging.rb patch and a Search Posts
command. The plugin returns related posts with title, permalink and
ID. The blogging.rb patch/command will give you a dialog to enter a
search term or phrase (unless there is text selected) a dropdown to
pick a post, fetch it and open it in a new window.
I hope somebody finds it useful. I know I do.
Brett
This is a quick patch file for metaweblog. If you install the plugin
(seriously, it is, in my opinion, very cool), you'll need this to run
the command in TextMate.
I have gone a step further and modified the plugin by one tiny line
and now I can run a search for posts by keyword using the plugin, and
open them just like Fetch Post. Difference being I can open any post
I've ever written and I can narrow the field down instantly... I
will post the updated plugin, a patch for blogging.rb and a Search
Posts command all together.
Brett
In my enthusiasm I forgot that I made a 3 line addition to
metaweblog.rb in order to make the related posts plugin work. I'm
going to paste it here (sorry, Allan) but I will make a diff file in
a minute.
def getRelatedPosts(blog_id, username, password, data)
call("wordpress.getRelatedPosts", "#{blog_id}", "#{username}", "#
{password}", data)
end
Brett
Another unproductive day at the office yields more of my usual tricks.
I was writing a blog post and realized that I often want to link to
an article I've written myself. This tends to be a good practice,
even if just to keep new visitors delving a little deeper into your
site. But none of the current linking tools in TextMate were
especially good at handling this. So I started problem solving.
Solution 1: Lookup Word/Selection on blog and link. This command
was my first idea. It's just a modification of the google lucky
linking command that takes your selection, lets you choose which blog
from your endpoints and then runs a google search with a
site:your.blog.com in the search string. So it's limited to results
from your own site, and links to the first result returned.
Solution 2: That wasn't effective enough. Posts aren't always on
Google if they're too old or too new and there was no control over
which post was chosen. So I modified the Fetch Recent Posts command
to insert a link to the chosen post. If you run it without any input
it will ask you for the text of the link.
Solution 3: That wasn't complicated enough. This last solution is
for Wordpress users only, I'm afraid, but it's a doozy. The plugin
included here is a heavily modified version of the Related Posts
plugin. It runs a FULLTEXT search on your posts with your selected
text and returns relevant posts in an array. The whole thing is an
XMLRPC hook. No hacking required. I finally figured out how to do
this today, so I'm going to modify my Ultimate Tag Warrior hack to be
a plugin as well. I'll get to that later. There's a command with
this called "Link to Related Posts" that will query the database and
present the related posts in a dropdown.
Haven't seen anybody mention this yet. If you go to
Bundles->Textmate->Install Edit in Textmate, the instructions are a
very cool halloween theme. Not sure what kind of window this is
for..I looked at the help docs and they look normal. But yeah, pretty
cool
If you got away from the satanic animal sacrifice version, you here's
a screenshot: http://www.javaspot.net/images/textmate_halloween.png
http://www.randsinrepose.com/archives/2006/10/31/
bright_patient_design.html
<snip>
I'm not a power user, but I know what I expect out of a good editor
and, well, BBEdit is a good editor, but whenever I fire it up I feel
like I forgot to read some imaginary manual called, "BBEdit Rocks.
Really." I suspect the fact that I didn't grow up with BBEdit is part
of the issue. The fact that I'm a pure Mac OS X guy with zero pre-Mac
OS X experience probably contributes to feeling like I'm missing part
of the BBEdit joke. Yeah, Zap Gremlins. Ha ha. I get it. Clever, but
great design?
My BBEdit ambivalence allows me to check out new editors as they
stream across my consciousness and, to BBEdit's credit, it's lasted
four years. I've test driven several editors during that time and
BBEdit remained my technical tool of choice, but it was only a matter
of time until someone else knocked my socks off.
The buzz around TextMate started many months ago, but it's when folks
started to ask me to order it that I started to pay attention. There
is no copy protection known to man that any bright engineer can't
circumvent, so when an engineer asks you to purchase the software
they're saying, "This is the shit. We should pay these guys for this
fine piece of work."
You bet I downloaded it.
After two steady months of TextMate, I'm happy to declare it my
editor of choice because it demonstrates a design philosophy I love.
Bright, Patient Design. I'll explain
...
</snip>
j.
Hello,
is there any way to add support for non-image files when dragged onto
the TM window; these files should be linked and uploaded to the
serves as are images?!
thx,
Dan
>> something i didn't understood, suppose i write a wrapper to mate
>> "sudo_mate" even launching TextMate like that :
>>
>> sudo /Applications/TextMate/TextMate.app/Contents/MacOS/TextMate
>> blahblah
>>
>
> In my experience, any time I need to edit a file I don't have
> access to, TextMate will realize that and authenticate me so I can
> save the file. This probably requires you to be in the admin group,
> but then so does sudo (by default), right? The only possible
> drawback is that new files might not get root as the owner. But
> maybe in that case you could just do:
>
i just dis a small over a file on my desktop :
~/Desktop/sudo_textmate%> ls -al
-rw-rw-rw- 1 news admin 122 Nov 3 11:01 essai-sudo-config
i open it with TextMate, add "Hello world !" inside and save it.
TextMate didn't ask in authetification and the file has now those
user:group :
~/Desktop/sudo_textmate%> ls -al
-rw-rw-rw- 1 yvon yvon 140 Nov 3 18:16 essai-sudo-config
(yvon being my login name)
this should be considered as a bug afaik ?
TextMate would have either not open the file or ask for
authentification ...
I'm usinf TextMate Version 1.5.4 (1324).
also for mate it is, in my opinion, about the same because on my box
mate leaves in :
~/Desktop/sudo_textmate%> which mate
/opt/local/bin/mate
where all the bins are aware of which root|user opened a file...
best,
Yvon
Le 3 nov. 06 à 16:20, Rob McBroom a écrit :
> On Nov 3, 2006, at 12:06 AM, Une Bévue wrote:
>
>
>> something i didn't understood, suppose i write a wrapper to mate
>> "sudo_mate" even launching TextMate like that :
>>
>> sudo /Applications/TextMate/TextMate.app/Contents/MacOS/TextMate
>> blahblah
>>
>
> In my experience, any time I need to edit a file I don't have
> access to, TextMate will realize that and authenticate me so I can
> save the file. This probably requires you to be in the admin group,
> but then so does sudo (by default), right? The only possible
> drawback is that new files might not get root as the owner. But
> maybe in that case you could just do:
>
i just dis a small over a file on my desktop :
~/Desktop/sudo_textmate%> ls -al
-rw-rw-rw- 1 news admin 122 Nov 3 11:01 essai-sudo-config
i open it with TextMate, add "Hello world !" inside and save it.
TextMate didn't ask in authetification and the file has now those
user:group :
~/Desktop/sudo_textmate%> ls -al
-rw-rw-rw- 1 yvon yvon 140 Nov 3 18:16 essai-sudo-config
(yvon being my login name)
this should be considered as a bug afaik ?
TextMate would have either not open the file or ask for
authentification ...
I'm usinf TextMate Version 1.5.4 (1324).
also for mate it is, in my opinion, about the same because on my box
mate leaves in :
~/Desktop/sudo_textmate%> which mate
/opt/local/bin/mate
where all the bins are aware of which root|user opened a file...
HOWEVER other people don't have this experience with TextMate, they
have veryfied TextMate doesn't change file owber and asks for
authentification.
then the prob comes from my machine...
i'm wiping out TextMate and related to get a fresh install...
best,
Yvon
On Fri, 3 Nov 2006 05:24:16 +0100, Allan Odgaard wrote:
> On 3. Nov 2006, at 05:09, Une Bévue wrote:
>
>>> This calls mate as super user, but mate only passes a file name to
>>> TextMate, which is still running as your regular user -- so this
>>> doesn’t work as you expect.
>> ok thanks, and using :
>> sudo open -a <absolute_path_2_TextMate> <my_config_file> would open
>> another TextMate ?
>
> No, it would effectively do the same as mate (i.e. sending the
> filename to TextMate).
>
> There basically is no way you can currently do what you want -- but
> since ‘sudo mate’ is (by several users) expected to transfer the
> super user privileges to TextMate (for just that file), I will look
> into how this could possibly be pulled off sometime in the future (it
> would be a nice little feature).
One hack would be to use something like my RemoteEdit scripts.
The script would need to:
i) make a temporary copy of the file
ii) open the file in TextMate for editing
iii) On save or close, copy the temporary file back over the
original.
hrm. In fact, as my scripts use scp, and that works locally as well
as remotely, my remoteEdit script should work just fine for this. :)
http://www.cse.unsw.edu.au/~willu/RemoteEdit/
sudo remoteEdit /my/local/file
should just work... but it doesn't. sigh. It has problems
forwarding the ODB suite AppleEvents between root and the normal
user. It might not be too hard to work around that though.
*wanders off to think*
Cheers,
Will :-}
I often use TextMate's "anonymous project" feature, where I drop a
folder onto TextMate, and it automatically creates a project for me.
Unfortunately, I've noticed that if I rename this folder or move it
to the trash, TextMate gets confused. It apparently can't find the
project and displays all the files in the file drawer in red text.
Also, if I happen to have an unsaved file open beforehand, TextMate
insists that I type my administrator password (why?) every time I
switch apps, since I have the "Save files when focus is lost" setting
on.
This wouldn't be so bad, except that sometimes -- and I haven't
figured out what causes this -- TextMate prompts me for my password,
then beachballs permanently after I enter it, and I have to Force
Quit. This has happened to me on quite a few occasions, and just
happened again today. (I'm using version 1.5.3.) Has anyone else seen
this?
Anyway, shouldn't TextMate be able to track folder changes? I don't
understand why it has to get all confused just because I move or
rename a folder.
Trevor