Hi,
I do not know if this request is a general one, but in the past it often happens to me that I want to get the content of a tooltip in order to do something with it. A simple example is the output of "Statistics of Doc/Sel". Sometimes I want to insert that info into my document.
[The same for the HTML tooltip (?)]
Is there a way to provide such a functionality? Now I do the following: Change the command's output behaviour to "Create New Doc", invoke the command again, and reset the command's output behaviour. But this is a bit annoying.
Of course, to find a proper key/mouse event could be a bit tricky. All key events are bound to text document except for ESC. Thus my question is: Does anyone have an idea?
Cheers,
--Hans
On 29 May 2008, at 09:46, Hans-Joerg Bibiko wrote:
[ copy contents of tool tip ] Of course, to find a proper key/mouse event could be a bit tricky. All key events are bound to text document except for ESC. Thus my question is: Does anyone have an idea?
I think finding a gesture to use, while the tool tip is showing, is difficult because tool tips are very elusive and do not respond to regular events (and if they did, they would often interfere).
Perhaps an easier approach is to just have alternative commands.
We already have ⌃⇧P → Show Scope (as tool tip) and ⌃⇧⌘P → Copy Scope (to clipboard).
One could do similar for the statistics command.
On 29 May 2008, at 12:56, Allan Odgaard wrote:
On 29 May 2008, at 09:46, Hans-Joerg Bibiko wrote:
[ copy contents of tool tip ] Of course, to find a proper key/mouse event could be a bit tricky. All key events are bound to text document except for ESC. Thus my question is: Does anyone have an idea?
I think finding a gesture to use, while the tool tip is showing, is difficult because tool tips are very elusive and do not respond to regular events (and if they did, they would often interfere). Perhaps an easier approach is to just have alternative commands.
We already have ⌃⇧P → Show Scope (as tool tip) and ⌃⇧⌘P → Copy Scope (to clipboard).
One could do similar for the statistics command.
Well, this would work for specific commands, but I asked for a general approach. Sometimes it would be nice to have the message of any command shown as tool tip in the clipboard etc.
OK. I know to find an event for this is very difficult.
But how about an option in TM's preference: "Write the content of any tool tip to /tmp/TM_tooltip.txt"
Then one could have a command à la "Get/Insert/Copy the content of the last tooltip".
This also could be done for the HTML output. There are some XXXmate commands which have a button "Copy content". By using such an option one inherits this automatically.
But firstly, this is a question how often that functionality will be used by other users.
Thanks,
--Hans
On 29/05/2008, at 9:15 PM, Hans-Joerg Bibiko wrote:
Well, this would work for specific commands, but I asked for a general approach. Sometimes it would be nice to have the message of any command shown as tool tip in the clipboard etc.
OK. I know to find an event for this is very difficult.
But how about an option in TM's preference: "Write the content of any tool tip to /tmp/TM_tooltip.txt"
Then one could have a command à la "Get/Insert/Copy the content of the last tooltip".
This also could be done for the HTML output. There are some XXXmate commands which have a button "Copy content". By using such an option one inherits this automatically.
But firstly, this is a question how often that functionality will be used by other users
+1 if this means we can have a command that replays a tooltip. I find that often a tooltip appears and I didn't catch what it said.
LD.
On May 29, 2008, at 7:15 AM, Hans-Joerg Bibiko wrote:
But firstly, this is a question how often that functionality will be used by other users.
I know I would use it for one. I have found myself in this situation many times.
Thanks,
--Hans
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On 29 May 2008, at 13:15, Hans-Joerg Bibiko wrote:
[...] We already have ⌃⇧P → Show Scope (as tool tip) and ⌃⇧⌘P → Copy Scope (to clipboard).
One could do similar for the statistics command.
Well, this would work for specific commands, but I asked for a general approach. Sometimes it would be nice to have the message of any command shown as tool tip in the clipboard etc.
I wasn’t necessary proposing we manually go and duplicate all commands with tool tip output, just that maybe the decision to run them with “capture to clipboard” could be made before the action is launched.
[...] But how about an option in TM's preference: "Write the content of any tool tip to /tmp/TM_tooltip.txt"
I think a log is an excellent idea. So basically all (command) tool tip output goes to ~/Library/Logs/ with a date stamp or similar, preferably with some newline escaping so a “repeat last tool tip” command would just tail -n1 «log», and similarly for a copy.
[...] This also could be done for the HTML output. There are some XXXmate commands which have a button "Copy content". By using such an option one inherits this automatically.
There’s lots of boiler plate in the script runners which you don’t want on the clipboard. So wouldn’t really work (and if you want to access the raw HTML you can do ⌥⌘U — so I think log should be restricted to tool tip / stderr maybe).
On Thu, May 29, 2008 at 1:50 PM, Allan Odgaard throw-away-2@macromates.com wrote:
On 29 May 2008, at 13:15, Hans-Joerg Bibiko wrote:
[...] We already have ⌃⇧P → Show Scope (as tool tip) and ⌃⇧⌘P → Copy Scope (to clipboard).
One could do similar for the statistics command.
Well, this would work for specific commands, but I asked for a general approach. Sometimes it would be nice to have the message of any command shown as tool tip in the clipboard etc.
I wasn't necessary proposing we manually go and duplicate all commands with tool tip output, just that maybe the decision to run them with "capture to clipboard" could be made before the action is launched.
[...] But how about an option in TM's preference: "Write the content of any tool tip to /tmp/TM_tooltip.txt"
I think a log is an excellent idea. So basically all (command) tool tip output goes to ~/Library/Logs/ with a date stamp or similar, preferably with some newline escaping so a "repeat last tool tip" command would just tail -n1 «log», and similarly for a copy.
If it is implemented as a log the one who implements it should not forget log-rotation. I guess a new log-file for every day would be best (old one shouldn't be deleted - maybe there should be an option how long those files should "live").
Niels
On 29 May 2008, at 13:57, Niels Kobschaetzki wrote:
On Thu, May 29, 2008 at 1:50 PM, Allan Odgaard throw-away-2@macromates.com wrote:
On 29 May 2008, at 13:15, Hans-Joerg Bibiko wrote:
[...] But how about an option in TM's preference: "Write the content of any tool tip to /tmp/TM_tooltip.txt"
I think a log is an excellent idea. So basically all (command) tool tip output goes to ~/Library/Logs/ with a date stamp or similar, preferably with some newline escaping so a "repeat last tool tip" command would just tail -n1 «log», and similarly for a copy.
If it is implemented as a log the one who implements it should not forget log-rotation. I guess a new log-file for every day would be best (old one shouldn't be deleted - maybe there should be an option how long those files should "live").
I agree in some sense. To do a log-file-like system would be nice.
Maybe better would be to have a log file which holds, let's say, up to ten tool tip contents. If the 11th will append, the first in the file will be deleted.
I mean, it isn't worth to have all contents of a tool tips at your hard disk. It is more or less a temporary situation like Luke mentioned. This also occurred to me that a tool tip poped up but I couldn't read it because I moved my mouse.
--Hans
On 29 May 2008, at 13:57, Niels Kobschaetzki wrote:
[...] If it is implemented as a log the one who implements it should not forget log-rotation. I guess a new log-file for every day would be best (old one shouldn't be deleted - maybe there should be an option how long those files should "live").
Say you get five tool tips each day, each consisting of 60 bytes. The log then grows by less than 100 kilo bytes per year — I think log rotation is perhaps not that super critical :)
But Apple has a x-man-page://3/asl/ which is still rather rudimentary but can handle log rotation and stuff, and is something they are devoted to improving (the logging framework), so while it might not immediately look that beneficial, probably that is what I should use.
Hi,
On May 29, 2008, at 12:15 PM, Hans-Joerg Bibiko wrote:
On 29 May 2008, at 12:56, Allan Odgaard wrote:
On 29 May 2008, at 09:46, Hans-Joerg Bibiko wrote:
[ copy contents of tool tip ] Of course, to find a proper key/mouse event could be a bit tricky. All key events are bound to text document except for ESC. Thus my question is: Does anyone have an idea?
I think finding a gesture to use, while the tool tip is showing, is difficult because tool tips are very elusive and do not respond to regular events (and if they did, they would often interfere). Perhaps an easier approach is to just have alternative commands.
We already have ⌃⇧P → Show Scope (as tool tip) and ⌃⇧⌘P → Copy Scope (to clipboard).
One could do similar for the statistics command.
Well, this would work for specific commands, but I asked for a general approach. Sometimes it would be nice to have the message of any command shown as tool tip in the clipboard etc.
OK. I know to find an event for this is very difficult.
But how about an option in TM's preference: "Write the content of any tool tip to /tmp/TM_tooltip.txt"
Better yet: use a named PasteBoard. See
http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Classes/NSPasteboard_Class/Reference/Reference.html#// apple_ref/occ/clm/NSPasteboard/pasteboardWithName:
and
http://developer.apple.com/documentation/Cocoa/Conceptual/ CopyandPaste/Articles/pbFundamentals.html#//apple_ref/doc/uid/ TP40004254-DontLinkElementID_2
for more details. TextMate could send the tooltip text to the com.macromates.textmate.tooltip-pb and then have a Ctrl-Cmd-V or something to paste it.
Best regards,