docwhat's avatardocwhat's blog

It's All Text! v0.8.0

I have just released version 0.8.0 of ”It’s All Text!”, the Firefox extension that answers the age old question, “What happens when you give a yo-yo to a flock of flamingoes?”1

New Features

So, this version has several months of minor changes collected together. I kind of lost track of all of them, but here are the obvious ones from looking at the change log.

  • Hot Key support
  • Configure which corner to put the edit button on.
  • The edit button goes away when you aren’t hovering or focusing the textarea. This lets you click buttons under where the edit button appears.
  • An attempt to clean up possible memory problems.
  • Code is GPL v3

So, get it while it’s hot!

Ciao!

1 http://us.imdb.com/title/tt0120910/usercomments?start=100

Comments

Gravatar for zack weinberg
Zack Weinberg

I was looking at the readme and I saw something that made me cringe, in the bit about how to get .app editors working on OSX:

open -a /path/to/editor.app $*

$* is dangerous. If there ever happens to be a shell metacharacter or white space in any of the arguments IAT passes to the editor, the script will not work; depending on what the text was, it might do something completely unexpected. Now, the argument is under IAT’s control, and you may know that it never passes in anything unsafe, but example shell scripts should always be coded defensively so that people absorb good coding habits. Please change the readme so this line says instead

open -a /path/to/editor.app "$@"

(Even this is not perfectly safe, but it’s the best you can do as long as the “open” command doesn’t support the special ”—” argument, and as far as I can tell it doesn’t.)

Gravatar for docwhat
docwhat

Zack:

You’re quite right. I must have cut-and-pasted that from someplace. I habitually type ”$@” myself and therefore probably didn’t even give it a second glance.

You are also right in that the file arguments are under IAT’s control. They can never be badly formed. The only potential problem is spaces in the path, which using ”$@” would fix.

I have fixed this is my source control. Next version will have this fix. Thanks for pointing it out.

Ciao!

Gravatar for alex
Alex

I commented in earlier version about edit button appearing in nearly the same place as TWiki buttons. Checked and is the same in 0.8.

You replied about making the edit button disappear, but I must have explained badly because this is backwards. It’s the EDIT button which dappears under the buttons which TWiki is putting there, which was why I suggested being able to move the EDIT button.

If the EDIT button were on top, then your solution would suit me fine, too. Though the EDIT button does seem to disppear already when focus isn’t in the textarea.

I can just see the top of the EDIT button so it’s not a showstopper, and it’s still a great add-on!

Gravatar for alex
Alex

Ignore me - didn;t read the new features closely enough and I can move the button. Thank You!

Gravatar for docwhat
docwhat

Alex:

I’ll never ignore someone! Not when they provide helpful hints like you do. :-)

I forgot to bump up the Z-Index. I just updated the copy in version control; it’ll go out later in the next version.

Thanks for reminding me.

Ciao!

Gravatar for tore
Tore

Hi and thanks for your work!

I want to report a problem that I believe has shown up since a recent upgrade. When the hokey setting is set to its default (none), the AltGr key on my Norwegian keyboard works as a hotkey, which is quite annoying as it is used as a compound key needed to input common characters (@£$«»~ and so on). If I change the hotkey to something else (like F2), the AltGr key no longer functions as a hotkey and I can easily input such characters in the default text field without invoking the external editor.

Easy to work around so no big problem for me, thought I’d let you know though.

Tore

Gravatar for docwhat
docwhat

Tore:

I know exactly where that problem is and it’s entirely my bad. I saw it happening and put in the wrong fix. :-/

I’ll fix it and upload 0.8.1 today.

Ciao!

Gravatar for docwhat
docwhat

Okay. 0.8.1 is out. The hotkey problem should be fixed. And the z-index problem.

Ciao!

Gravatar for mr. gunn
Mr. Gunn

Using the recent version of crimson edit, all it does is open the editor. Nothing you type there ends up in the text box without copy/pasting.

Gravatar for docwhat
docwhat

Mr. Gunn:

Try this test:

  1. Type something in the textarea.
  2. Click the edit button.
  3. In your editor you should see what you typed into the textarea.
  4. Type some more stuff in your editor.
  5. In your editor, save the changes.
  6. If you wave the mouse over the textarea, it should update with what you typed in the editor.

Ciao!

Gravatar for mr. gunn
Mr. Gunn

Ah, you have to save it first. Got it, and thanks!

Gravatar for blixtor
Blixtor

I’m on Windows XP and want to edit my textareas using gvim with commandline options.

So I created a .cmd file as per the instruction in your FAQ. When I try to select the editor in the Preferences window (Browse) I get a regular ‘Open File’ dialogue with the filetype set to ‘Application’. Sadly, .cmd files are not shown with this filetype (and there are no other choices for filetype) so there is no way to select the command file I created. I only see all *.exe files.

The workaround is to type the filename of the .cmd file (with extension) literally into the filename field.

Maybe you could add that hint to your FAQ or fix the filetype so that files with the .cmd extension are also visible. Great extension btw! :)

Cheers, Torsten

Sideremark: I put the following into the .cmd file to open the textarea for editing in a new tab in an existing Vim window (requires Vim 7): [code lang=“shell” light=“true”]C:\path\to\vim\executable\gvim.exe -p —remote-tab-silent %1[/code]

Gravatar for docwhat
docwhat

Blixtor:

Thanks for the information. To be honest, I don’t own any copies of Windows at home so I don’t test it under windows. I made the (obviously incorrect) assumption that nsIFilePicker.filterApps would show .cmd and .com files.

Is there no box to change what you’re looking at? i.e. a drop down that says .exe or something that you can choose .* from?

Ciao!

Gravatar for blixtor
Blixtor

There is a dropdown list where I can choose a filetype but the only entry there is “Application” which shows *.exe files and nothing else (for me). I’m no Windows expert, so I don’t know if this is configurable somewhere or standard Windows behaviour - and as I’m @work I have no idea what extra configuring has been done for my machine.

The workaround is to enter the full filename or to enter ”*” as the filename and hit the button “Open”. Then Windows shows all the files in the directory - despite the file type still being shown as “Application” - that’s Windows for you :)

I’d suggest to change filterApps to filterAll and rely on the user picking a file of the correct type. Imho, when the user is changing the editor in the preferences you should be able assume that he knows what he is doing.

Cheers, Torsten

Gravatar for rh
RH

I love this extension, thanks so much — I use it all the time.

I have one case that always fails for me though. We use Jira (http://www.atlassian.com/software/jira/) for defect tracking, and it supports wiki-style formatting.

So I find myself using your extension to enter comments, saving, then using the Jira preview button to see how the wiki-formatting looks.

Once I’ve done a preview, the “edit” button disappears. If I reload my page, I lose everything I’ve typed so far.

I haven’t seen the same thing anywhere else, only with Jira. I’m using Firefox 2 on Windows XP.

If anyone has seen this or knows of a workaround, I’m interested.

Thanks again. RH Austin, TX

Gravatar for docwhat
docwhat

RH:

Thanks for reporting that.

Is there a demo page or something public where I can recreate the problem?

If not, can you do a ‘save page as…’, check that it recreates your problem, and then send that to me?

Thanks again. And keep Austin weird! ^_^

Ciao!

Gravatar for ivan
Ivan

Hi Doc! I just discovered yout extension and it’s something I was wondering about for a long time. Great idea along the lines of the KISS principle, just use an editor for editing text! One is left to wonder why popular apps like Firefox keep trying to reinvent the wheel in some aspects, instead of relying in existing, mature tools for the task.

The only (and I mean only) nit I have to pick is having to disable backup files created by Emacs, but I guess the editor is to blame for that.

Thanks a lot!

C-x C-s C-x C-c ;)

Gravatar for peter barabas
Peter BARABAS

Hello,

Do you think it would be possible to add support for program arguments? With that we don’t need to create wrapper shell scripts to fire up the editor with the appropriate command line arguments.

Thank you in advance. Peter.

Gravatar for docwhat
docwhat

@Ivan:

I use emacs myself. I save off my emacs files in a different directory altogether, since I dislike them littering everyplace. I use these settings to configure backups. It’s part of my Homedir management system.

Ciao!

Gravatar for docwhat
docwhat

@Peter

It’s on my todo list. :-) It’s a pain to do in a way that is safe for newbies and yet powerful for experienced users. But I think I have an idea to try…

Ciao!

Gravatar for ivan
Ivan

Umm, interesting approach to backup files. I’d prefer setting up emacs to disable backups under certain sub-hierarchies, however. BTW, nice to see more and more people versioning their home dirs! :) (I use CVS for the “portable”, common part and Bazaar for data.)

Gravatar for docwhat
docwhat

@Ivan:

Heh…it may not be for everyone, but I like it. It also acts as an easy way to find files, etc…

BTW: Homedir is more than versioning… it’s an entire packaging system for your home-directory.

Ciao!

Gravatar for andrew
Andrew

(Firefox 2.0.0.8 | It’s All Text! 0.8.2 | Win XP SP2)

I just installed it, and opened the readme page. I then clicked the edit button, and it told me to set the editor. I clicked the Preferences button and set it (Notepad++ 4.5). I tried again, and it told me to set the editor (again). I then set it to notepad. It opened notepad, but after I closed it, the tab went blank (not to the standard BG color, but absolutely blank, and it will not close or open another URL. I set the editor back to N++, and it works now. However, there are two major bugs:

  1. Setting N++ as the editor didn’t work in that tab, but notepad did. That is very strange.
  2. There is now a tab I cannot close without closing the window.
Gravatar for fooman
fooman

I’ve been quite pleased with your extension, until now, when a particularly obnoxious bug has surfaced. I’m not sure if your extension is actually responsible, but I’m guessing you’ll know better than I will.

Whenever I press my WIN key while a text area is focused, an editor window pops up. This is infuriating, because I use my win key for a lot of keyboard short cuts.

I’m using Its All Text v.8, Firefox 2.0.0.3, and X11.

Gravatar for era
era

Recently when I edit a complex form without IAT I have noticed that it will jump up to the beginning of the form every once in a while. This also tends to result in weird cursor problems (disappearing text cursor, mostly).

I’m wondering if this might be related to IAT, since I think it started around the time I upgraded to 0.8.1 from some 0.7 or 0.6 series release.

Upgrading to 0.8.2 now BTW.

Gravatar for era
era

Following up; Seems to happen when a page in another tab loads or reloads. Noticed when I posted my previous comment that the open edit box in the Firefox window next to this one jumped up to the home position. It doesn’t happen in a different browser instance where I don’t have any extensions other than RSS Ticker and Noscript.

Gravatar for docwhat
docwhat

@fooman:

Upgrade to 0.8.1 or newer. That’ll fix the win-key problem. It was a stupidity on my part.

@era:

I think I know what you’re talking about. I’m working on another bug (involving some tabs never loading their content) and I suspect it’ll fix this bug too. I’m making changes to how IAT hooks into the page to load.

Before it was hooking into the entire window. Now it hooks into the window which adds hooks to each web-page.

I also found a bug that used extra memory when it didn’t need to. That may help some people too.

Ciao!

Gravatar for docwhat
docwhat

@Andrew:

I don’t know why Notepad++ didn’t work. I don’t use Windows so I can’t check that. :-(

However, the tab being stuck open is a (new) known bug. I’m working on it at the moment.

Ciao!

Gravatar for mike
Mike

I love this extension! However it doesn’t work for me with the new version of Gmail. (Currently, for me at least, Gmail has two versions available, and I have to click on “Older version” or “Newer version” in the upper-right-hand corner to switch between them.) It worked fine with the older version of Gmail, but now it doesn’t seem to recognize the textareas correctly. The floating edit button never appears. Sometimes the context menu contains the “It’s all text” menu, but if I try to edit it that way the changes I make in my editor never seem to get noticed by the textarea. I assume Gmail has some new javascript nonsense that’s confusing it… any idea what’s wrong?

Gravatar for docwhat
docwhat

Mike:

No, not at this time. I have a GMail account, so I’ll look at fixing it eventually.

However, right now I’m redoing the way the textareas are detected and how the refreshes happen. As a side effect the following things should happen:

  • It should use less memory (or allow memory to be garbage collected correctly).
  • It will detect changes in the HTML markup right away.
  • It should even detect changes that it currently misses (like GMail and Jira).

And it should make the code easier to work with. The monitor portion is a hairy bit of code, the new stuff should be easier.

Ciao!

Gravatar for rafael pi
Rafael Pi

What are the current options in the [Character Set] field in the [Preferences] dialog? I’ll rephrase: Is there really, really no hope for us people married to an editor with no Unicode support, like NoteTab Light (Windows ANSI only)? I would love to be able to use IAT without being forced to switch away from my every day editor (which kind of kills the concept, doesn’t it?). Anyway, thank you very much for all your work and responsiveness; best regards.

Gravatar for docwhat
docwhat

Rafael Pi:

The current options are platform independent. If you can find out what NoteTab Light’s character set is, you can enter it and it (in theory) should work.

I’m not familiar with that editor, so I can’t be much help. I usually use NOTEPAD++ when forced to use a Windows machine.

Ciao!

Gravatar for marek lugowski
Marek Lugowski

Nice work. Works flawlessly for me on Mac Os X 10.4.11 with Emacs 23 (Cocoa version) and Firemacs plug in (for the Emacs keybindings in text areas and input fields, esp. in Wikipedia), in Firefox 2.0.0.9

However, sorry to say, it is semi-broken in Firefox 2.0.0.10 on Windows XP with Emacs 23 from CVS (GNU Emacs 23.0.0.1 (i386-mingw-nt5.1.2600) of 2007-08-18 on TPAD) and Firemacs. Basically, the edit button does not show up, and there is no communication between the text area and Emacs. On startup (with context menu, where the add-on shows correctly, as it does in preferences), the content of the text area shows up in the Emacs buffer (in correct encoding — working with Wikipedia, I set it to UTF-8), but any furhter edits in the text area are not propagated to the Emacs buffer, and any further saved changes to the file are not propagated back to the text area… So, work is possible by copying and pasting by hand. However, other than that, it is very useful. Because I can use the power of Emacs to process the Wikipedia text, and return it unmangled in UTF-8 back by copying and pasting to Wikipedia. So, partial success. But it would be nice, if it played nice in Windows as is does in Mac Os X. Perhaps the newest Firefox version broke it, but I doubt it, as it was just a security update. Maybe it does not play nice with Firemacs add-on on Windows? Anyway, thanks… — Marek

Gravatar for marek lugowski
Marek Lugowski

Yup. It’s Firemacs on Windows, that interferes with It’s All Text! v0.8.2 — after disabling Firemacs, it works very nicely. I suppose the solution, baring resolving hte conflict, is to use partial Emacs bindings only (since I will be using mostly Emacs 23 externally here), by employing the modification of toolkit.jar, specificially the pathHTMLsomething.xml file that contains keybindings.

Gravatar for rafael pi
Rafael Pi

Problem solved (I hope this is useful for someone):

I just had to enter “Windows-1250” in the [Character Set] field in the [Preferences] dialog in order to make IAT work with NoteTab Light 5.5. I had tried “Windows 1250” (without the hyphen), but IAT just ignored it. May I suggest a list or combo box with the «official» character set names (if there is such a thing) for dumb or lazy users like me?

Anyway, all seems to be dandy now. This extension is just great. Thank you very, very much again!

Gravatar for docwhat
docwhat

Rafael Pi:

There is a list of IANA registered character sets. It contains about 254 character sets.

I haven’t added it because I’m lazy, most users (except English windows users) know “their” character set, the list is long, and most users wouldn’t know how to pick their character set out of the list.

But I’ll probably do it, eventually. Right now though, I need my new laptop to arrive and to pry my hard-drive out of my old one and recover the work I did on redesigning the monitor/watcher in IAT.

Ciao!

Gravatar for docwhat
docwhat

Marek Lugowski:

Thanks for heads up on Firemacs conflicting in 2.0.0.10. I added it to my todo list. Unfortunately, I am without laptop (or network) at the moment.

Ciao!

Gravatar for david sisson
David Sisson

Is there a way to get It’s All Text! to trigger on other kinds of boxes? For example a page I’ve been hitting is using CodePress as an editor and I’d love to be able to get It’s All Text! to trigger.

Hmm, maybe I can use GreaseMonkey to change the editor window back into a text area…

Gravatar for era
era

Any chance for a fix for the tab refresh problem? It’s pretty aggravating.

Gravatar for docwhat
docwhat

era:

I have my new laptop. I still need to yank the harddrive out of my old laptop and see what I can recover.

I have on my old laptop the beginning of what will be the next version of IAT. It refreshes in a totally different (and better and Mozilla approved) way. It seems to fix this problem.

As an added plus, my new laptop is a MacBook Pro, so I’ll see about fixing any Mac weirdnesses once and for all.

Ciao!

Gravatar for toschi
Toschi

I guess it’s too early to expect it to work with Firefox 3, but I’d like to point out that there’s a problem with the latest beta of Firefox 3 (minefield).

The options/preferences dialogue isn’t working at all if it’s started from the edit button. The buttons have no labels and there are no values in the input field. You DO get the normal options dialogue from within the addons menu, but even if you put in your editor there, it’s still not recognized and you get the broken options dialogue again (when trying the edit button).

Gravatar for leo
Leo

I use this wonderful extension all the time. I often need to enter data in multiple text boxes at the same time, so I would like to open up (say) two editor windows at once. Unfortunately I find that both windows are editing the very same file. So any change I make in one editor shows up in BOTH text boxes. I’m not sure how much control you have over the name of the file you use, but it would be a big help if you could make the file names more unique, to ensure that no two text boxes use the same file name.

Thanks for a great piece of software!

Gravatar for docwhat
docwhat

Leo:

That is a bug! Please give me a URL or an example page where that happens. I’ll make sure it is fixed.

Ciao!

Gravatar for leo
Leo

It happens repeatably on our internal Zimbra email system. I tried to make it happen on various public sites but I cannot. I even tried the public Zimbra site but they don’t seem to use text boxes there — strange. I could try to capture the html from these internal examples and send them to you but I am not sure what would be useful.

Gravatar for peter jenkins
Peter Jenkins

First off: this program is nothing short of amazing!

I’ve been wanting something like this for so long!

I’m afraid I have to second the request to have an option to turn off the yellow animation. It’s cool, I just find it distracting when I’m going in and out of the editor. Because my editor pops up on another monitor, I have a hard time staying focused on that monitor when there’s something moving (changing color) on the other monitor.

I know it’s already on your list, I just wanted to second the suggestion, and let you know it’s not that it’s a bad feature, I just have a hard time staying focused on what I’m doing when there’s something glowing on the other monitor :)

Thanks again, this program is quite invaluable and you’ve put out some great karma into the world by making it gpl’d.

Best, Peter

[edit: on the other hand, it’s actually nice when you exit out of the editor. If you could, you might make it so that you can turn off the animation when entering the editor separately from turning off the animation when you exit the editor. Then I’d probably leave on the exiting animation, but given both or nothing I’d probably have to choose nothing. Also, I don’t know how involved it would be, but you might have a speed setting to say how long the animation lasts. I’d definitely put that secondary on my list to being able to turn it off though. ]

[edit: I forgot it’s gpl’d and I might be able to make some changes myself… do you have a repository for it? I couldn’t see where to download the source code…]

Gravatar for docwhat
docwhat

re: Jenkins

Hello! Thanks for the positive.

I’ve been busy/tired/etc. of late. Between my new house, getting used to my new laptop and all the end of year festivities, etc. I have been busy.

Heck, I haven’t even gotten IAT to work on my laptop yet! gasp Of course, I mean I haven’t gotten my new latest-greatest version.

You can download the source from my Mercurial repository at http://hg.gerf.org/itsalltext/.

You’ll want to use the latest release tag to make changes against. You can try it from trunk, but I don’t think it works at the moment. :-(

Thanks again for the warm fuzzies. :-)

Ciao!

Gravatar for georg hoeren
Georg Hoeren

I have 2 problems with it’s All Text 0.8. I use Startoffice 8 as Texteditor. Now I have edit a Text in a Forum with a Hyperlink in SO8. After saving it, the text has lost the special german Keys ä,ü and ö and therefore there are sinless Key and the Hyperlink is not there. Only the text is shown.

Gravatar for docwhat
docwhat

Georg:

Hi! My middle name is Georg, also. ^_^

You have two issues:

  • You need to either save as UTF-8 or change the charset (see the reply to Rafael.)
  • Hyperlinks won't work because they get lost when you save as text. That'd be a StarOffice issue

Ciao!

Gravatar for john hall
John Hall

I’d love to use IAT more, but whenever it’s enabled and I use the “Back” button in FF to go back from a Twiki entry preview to the page with the textarea (which is how Twiki want’s you to do it), the FF tab (or window) hangs and never returns. This doesn’t happen with just a textarea on a normal page or even a textarea on a Twiki page, but only with the Twiki edit page. We’re using the Dragon skin (lots of Javascript), if it matters.

Unfortunately, the twiki version we’re using is quite old (TWiki engine: 02 Sep 2004 $Rev: 1742 $). It doesn’t happen with the current version of Twiki on twiki.org, so I can’t really point you to a working test case. I guess it’s just an FYI at this moment unless you can give me some debugging ideas to try or having the page load hang when using the back button to a page with a textarea rings a bell.

I’m also trying to get our twiki updated to the current version.

Gravatar for docwhat
docwhat

If you can send me your TWiki or a TWiki that reproduces the problem (maybe the same version), I’ll take a look.

Alternatively, you can try disabling various plugins to verify that it’s IAT and not something else.

I have a version that hooks into the page in a different way that I wan to release soon and maybe that’ll fix the problem. :-/

Ciao!

Gravatar for john hall
John Hall

Thanks for the suggestions. I don’t have access to the twiki source, but I’ll see if I can capture and sanitize a couple pages to create a test case. I have disabled all plugin’s except IAT and the problem still occurs (all FF v2.x versions and both Windows and Linux). When I disable IAT, the problem goes away, so it seems definitely related.

Gravatar for docwhat
docwhat

Whups! I got confused.

I thought TWiki was Tiddlywiki.

Yeah, don’t mail me that… :-D

Test case is great, though.

Ciao!

Gravatar for dg
Dg

Hello, I am using XUL with firefox 2.0.0.11 : In this XUL file i have used html textarea (using the XHTML namespace), but the edit button which opens up the editor doesn’t appear. If a plain html file is taken, it work’s perfectly. I have no idea where it is going wrong.

—dg

Gravatar for docwhat
docwhat

@Dg.:

When you say XUL, you mean a Firefox application or extension? Or do you mean something else?

Anyway, the problem is that with XUL it is much harder to insert the edit button and make it position correctly. I’m sure it’s possible, but I haven’t sat down and done it.

At the moment, you can use the API I wrote for Stylish to try to add an IAT button manually. See: API.js in the extension folder.

Ciao!

Gravatar for mike mcnally
Mike McNally

I think this is a wonderful extension. One minor issue I have is that the right-mouse action is occluded by the behavior of the “easyGestures” plug in. If there were some alternative way of bringing up that choice menu, that’d be nice. (Shift-click?)

Still - really, really nice and extremely welcome. Thank you for doing such a service for the community.

Gravatar for docwhat
docwhat

re: Mike McNally

So “easyGestures” co-opts the left click? Okay, I can add control click. That matches is the Mac OS X behavior, too.

Ciao!

Gravatar for docwhat
docwhat

re: Mike McNally

Hmm… actually, I’m not looking for left-click. I’m looking for “centextmenu” events. How you do you pull up the context menu in easyGestures (say, to view an image)? It should be the same for the edit button.

Ciao!

Gravatar for mike mcnally
Mike McNally

Actually easyGestures (like other such extensions) steals the contextmenu event; basically the gestures take over from what the context menu does. I’m not very familiar with the runtime model in the XUL domain.

As I said, this is not a major issue for me now. (Did I dream it or did I really read somewhere that I can set the file extension with an attribute on the textarea tag?)

Thanks again!

Gravatar for robert labbe
Robert Labbe

Hello,

I know its only in beta but i was wondering if you had any plans on making this extensions work with Firefox 3 Beta 3. I have tried it and it does not display the edit button.

Thanks

Gravatar for peter
Peter

Another FF 3.0 question:

Now that 3.0b3 is released, is there a timeframe where IAT will be be upgraded to work? Do you know when you’ll be looking at this?

Thanks,

-Peter

Gravatar for docwhat
docwhat

Peter:

I have a beta version that works. I couldn’t make my previously stable version work with 3.0. If you want to try it out, send me an email and I’ll add you to my beta tester list (that goes for anyone, actually — but you have to report bugs and problems!)

Ciao!

Gravatar for thomas baker
Thomas Baker

I use “It’s all text 0.8.2”. It’s great - my deep appreciation to docwhat for this nice piece of work!

I do however have one problem. I use “It’s all text” to configure Firefox to open a text editor editing *.txt files. My favorite editor is vim.

My problem is that I can get a WIN32-executable version of vim to work okay, but I cannot use a DOS batch file to call my Cygwin version of vim. When I associate E:\u\config\text.bat (see below) with TXT files, then click on a TXT file, I am getting a message in vim: [code] C:Documents New file It seems clear that the batch file is passing argument 1 as a filename starting with “C:\Documents and Settings” — a directory that I never use for editing files.

In other words, it looks to me like the name of the file to be edited is being passed on correctly to the WIN32-executable version of vim, but something funny happens when “It’s all text” runs a DOS batch file. Can anyone advise on this?


[code] e:/u/config/text.bat
@echo off

c:\cygwin\bin\bash.exe -i e:\u\config\text.sh "%1"

[/code]


[code] e:/u/config/text.sh
echo "Loading minimal profile, then opening "
source /cygdrive/e/u/config/bash-profile-minimal
vim "$1"

[/code]

[Note: I edited the formatting - Docwhat]

Gravatar for rh
RH

Thomas, I’m not sure why you want to have a batch file that runs a shell that invokes a shell script that calls your editor, but I guess you have your reasons.

If you don’t require this complication, just configure It’s All Text to use “gvim”.

The problem with having so many things calling each other is that command line parsing gets very complicated. “C:Documents” is the first argument in the command line when asking to edit “C:\Documents and Settings\user\Application Data\Mozilla\Firefox\Profiles\blah\itsalltext\blah.txt”

If you change the “%1” to %* (no quotes) in your text.bat, I think it will work for you.

Good luck!

RH Austin, TX

Gravatar for thomas baker
Thomas Baker

Thank you, RH. I actually am using gvim now (or rather the bundled console variant C:\Program Files\Vim\vim71\vim.exe).

The problem is that I would prefer to use my regular Cygwin vim (and .vimrc) — it runs on Cygwin, understands the Cygwin filename conventions, and calls external Cygwin commands that require the Cygwin DLL (such as /bin/fmt). If I keep using gvim, I would have to maintain separate vimrc configuration files.

(Some background: from http://cygwin.com: “Cygwin is a Linux-like environment for Windows. It consists of two parts: A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality. A collection of tools which provide Linux look and feel.“)

The problem is that while clicking on file://localhost/e:/foo/bar.txt in gvim’s vim.exe will call up “bar.txt”, clicking on the same using text.bat (see above) tries to call up “C:Documents” and exits with an error.

text.bat used to work fine with Mozex, so I went back to check my notes and see that I actually configured Mozex with:

E:\u\config\text.bat %t

So the problem is perhaps that the filename needs to be explicitly passed to text.bat, otherwise a default starting with “C:\Documents ” is used, leading to the results above.

However, if I configure “It’s all Text” using the additional “%t”, I get the error message “The path ‘e:\u\config\text.bat %t’ does not exist.”

Tom

Gravatar for docwhat
docwhat

Tom:

Yeah, you can’t set the way the argument is passed in IAT. This is because it either:

  1. requires IAT to know too much about all the platforms Firefox can possibly run on
  2. requires the user to know too much about how shells and arguments work.

Meanwhile, you can try to toubleshoot the problem by invoking the .bat file from the CMD line using a path that has a space in it. Use quoting, not backslashes to escape the spaces, that’s what IAT does.

Also, you could try to switch to a .cmd script instead of .bat; you’ll have more options for dealing with spaces.

Ciao!

Gravatar for rh
RH

Tom, did you trying changing your text.bat as I suggested above?

It works for me — I can open files from Windows Explorer or with IAT after I make that change.

Gravatar for thomas baker
Thomas Baker

RH - I just now tried your suggestion of changing “%1” to %* (no quotes) in text.bat and IT WORKS! Problem solved! Thank you!

The Cygwin vim shows me that I’m actually editing a file under “C:/Documents and Settings/…/Firefox/Profiles/…/itsalltext/…” Aha - this makes sense now.

docwhat - thank you for the debugging suggestions!

Gravatar for nem w. schlecht
Nem W. Schlecht

First off, I was a Mozex fan, but I’ve already uninstalled it. IAT is an awesome extension - thanks much!

I do have a question though - does IAT generate any events for the TEXTAREA when an update occurs? I’ve developed a site that has a couple TEXTAREAs that the user edits in, along with a “Preview” area that I currently update by setting an onKeyUp handler, which works great when editing within the TEXTAREA, but if I use IAT, the TEXTAREA updates but my preview does not. I tried adding an onChange handler, but that didn’t work.

Then I tried Event Spy and I see a bunch of mutation events (coloring the background of textarea), but I don’t know if I can set an event handler (or if I want to, with the many events the fading effect generates). I would think generating a ‘change’ event of some sort would be a desirable thing, but maybe others disagree.

Gravatar for docwhat
docwhat

Nem:

Change works, but only if it had focus and then lost focus.

I think what you want is to use addEventListener() to listen for DOMSubtreeModified (if Firefox supports it). If it doesn’t, then I could see adding a hack into IAT to dispatchEvent() that event to make sure it works.

This will be ignored by all other browsers, assuming you check to make sure addEventListener() exists prior to using it. :-)

Handy reference: Wikipedia DOM Events

Ciao!

Gravatar for matthew
Matthew

I’ve used this extension before, but I started a new profile a few weeks ago and just rediscovered this add-on again today.

I liked it before, but unfortunately I can’t seem to get this extension working in Firefox 3.0b4. No edit button, hotkey doesn’t work, etc. I know it’s entirely possible there may be something wrong on my setup. I can help troubleshoot if you’re interested, otherwise I’ll try again after the next update…

Gravatar for kirk
Kirk

I was looking forward to trying “It’s All Text” today, but after installing the latest release (0.82) under Firefox 1.5.0.12 on CentOS Linux 5, it just doesn’t work for me. No button appears on the text boxes. Right clicking text fields shows the pop-up menu, but choosing “It’s All Text” options (including Preferences) results in nothing at all. I tried closing and reopening Firefox, uninstalling and reinstalling “It’s All Text”, but nada. If I choose Tools > Extensions, select “It’s All Text” from the list, and click the Preferences button in the dialog box, then at least I get a Preferences dialog box for “It’s All Text”. But that’s it.

Can you help me out? I’d really love to use vim to edit text in these large textareas.

Many thanks.

Gravatar for pete s.
Pete S.

I just found this extension and it sounds like something that’d really make life easier, but…

FF 2.0.0.12 running under Mac OS X 10.5.2 IAT version 0.8.3

I’m getting a “Not compatible with Firefox 2.0.0.12” message.

Any thoughts?

Gravatar for pete s.
Pete S.

Ignore that last comment. I uninstalled, restarted Firefox, reinstalled and it seems to be working now. Sorry for the false alarm!

Gravatar for docwhat
docwhat

Well, it’s not because of the versioning. The version number says it should work with 3.0b5pre, which is the highest it can be set right now.

Just tried it out and it works for me.

Maybe there is a permissions problem on your Mac? You can try the Disk Utility and ask it to verify permissions.

Maybe the JavaScript console will show you more about what has gone wrong?

Ciao!

Gravatar for anonymous
anonymous

This one uses plain sh

! /bin/sh

/usr/bin/TERMINAL-EMULATOR -e /usr/bin/YOUR-CONSOLE-EDITOR ”$@”

On TERMINAL-EMULATOR you can put xterm, rxvt, urxvt, aterm, kterm, eterm, wterm, gnome-terminal…

On YOUR-CONSOLE-EDITOR you can put vim, emacs, ed, nano, joe, mcedit…

Gravatar for era
era

Anybody can edit wikipedia. I changed the script to use generic Bourne syntax since I too cringe at csh.

Gravatar for macguges
MacGuges

I’ve recently encountered a problem. I’ve emerged firefox 3.0b5 on Gentoo, and configured It’s All Text to use ”/usr/bin/emacsclient —alternate-editor=emacs” for my editor. Until just recently this worked fine, but after a recent rebuild of firefox (which might’ve been the update to b5) I’ve begun getting the error “Unable to open your editor” for the reason “The path … does not exist.” I’ve double-checked the command from my shell, and know the command does work.

Is this a bug in It’s All Text, or Firefox 3 beta, or am I missing something?

Gravatar for the_ghost
the_ghost

I have russian Windows XP and my windows login account is written in cyrillic. So, when i’m trying to use button “edit” my editor opens non-existing location, like this (screenshot) - http://clip2net.com/clip/m2737/1208678267-clip-8kb.png

I think problem is in russian name of windows login account. May be it’s worth to enter own path, where temp texts will be stored?

Gravatar for andre angelantoni
Andre Angelantoni

Hi, Christian. I could use some help.

I believe that I’ve followed all the instructions and yet I can’t get It’s All Text to launch the editor of my choice.

The setup: Mac OS X 10.5.2 Firefox 2.0.0.14 It’s All Text 0.8.4

Shell script:

#!/bin/sh # This is an example shell script for It's All Text!

open -a /Applications/TextMate.app ”$@”

Editor preference set to: /Users/aangel/Applications/ItsAllText/iat.sh

Result of ls -l:

-rwxr-xr-x@ 1 aangel staff 103 Apr 22 15:32 iat.sh

All directories leading to the shell script have -x.

If I empty the editor preference textbox, it loads using TextEdit with no trouble.

What could I be missing?

Thanks, Andre’

Gravatar for docwhat
docwhat

@MacGuges:

Hmmm… You are using as shell script? If not, then I have no idea how that worked before. IAT doesn’t currently support non-simple editor configuration.

There is a bug in for that in the future: http://trac.gerf.org/itsalltext/ticket/4

Ciao!

Gravatar for docwhat
docwhat

@the_ghost:

Whups! That is a bug. I have created a ticket for it.

I could see possibly adding a feature for changing that in the future, but meanwhile, that it a bug that should be fixed. :-)

Ciao!

Gravatar for docwhat
docwhat

@Andre Angelantoni:

Okay, it looks like open doesn’t like the file not existing. You may have to change your script to: [code lang=“shell”]

!/bin/sh

if [ ! -f ”$1” ]; then touch ”$1” fi

exec open -a /Application/TextMate.app ”$1” [/code]

The big change being the if statements that check if the file exists. If it doesn’t then it touches it.

You should be able to run the script for the command line and it should work if you give it a filename that doesn’t exist, like /tmp/foobarbaz.txt

I have updated the wiki page.

Ciao!

[Updated: This info is now at https://github.com/docwhat/itsalltext]

Gravatar for andre
Andre

I went to make you change in the file and instead of using the same editor as before, I fired up vi.

It turns out there was just a CR but no LF…vi just showed ^M and the lines all ran together. The shell couldn’t parse the file.

Everything is working great now…thanks for your work on this program!

Gravatar for macguges
MacGuges

This feature does look nice, but I think all I need is for IAT to check the existence of its editor without barfing on a command-line argument. I don’t need to configure multiple settings for emacs from IAT, and I hadn’t been using a shell script before, though I am now. Since creating emacsclientemacs with

!/bin/sh

emacsclient —alternate-editor=emacs ”$@”

I can now use IAT like I used to.

I’d like to point out that changes to IAT’s settings haven’t taken effect for me until I restart firefox. When I would change my editing command to not use the argument “—alternate-editor=emacs”, the error message continued to show my original command.

Gravatar for andrew hyatt
Andrew Hyatt

I cannot get this to work on Mac OS X yet. I’m using the lastest version (0.8.4). If I browse to an executable, none are selectable. If I type a path in directly, whatever I type is ignored, and when I click on an edit button it uses TextEdit and the editor field in the preferences has been reset.

Gravatar for trevor
Trevor

Regarding the bug with file name uniqueness (http://docwhat.org/2007/10/its-all-text-v080/#comment-3946)

I have also run into this issue with editing > 1 text area in a single “domain”. We’re using DokuWiki, and all editing takes place in ”http://www.domain.com/wiki/doku.php”, so if the “random bit” on the end of the file name (www.domain.com.2p2if12e1i.txt) is based solely off of the URL, then this would be why there are collisions. I’m not sure if there is any other information you can grok from the page to add to the uniqueness, as my web development is limited at best.

Gravatar for docwhat
docwhat

@Trevor:

Yeah, I’ve debated that myself. I could try to use the POST data, but that gets really tricky because some of the variables are (usually) the data being submitted

Gravatar for docwhat
docwhat

@Trevor:

Yeah, I’ve had the problem where all the random-hashes are the same because POST variables are used for editing everything.

The problem with using POST variables to build the hash is that most pages use POST variables to pass in the data.

I’m not sure what the solution is except to allow users to write some sort of solution for their websites themselves. But it seems hacky and I really don’t want to add so much interface stuff.

I’ll keep thinking about it. If you come up with a solution, please tell. :-)

Ciao!

Gravatar for trevor
Trevor

@docwhat Agreed. Without writing some overly complicated code to parse out hidden input tags or something (which are COMPLETELY different in every application), this is just a bug that most people are just going to have to deal with. Either that or every time you generate the temp file, it’s a truly unique file. But then, that would break the “feature” half of this bug :)

Gravatar for joe clark
Joe Clark

On Firefox 3 Beta 5 & It’s All Text 0.8.4, when I click the edit button after selecting gvim as my editor, it says “Your editor has not been set.” I assume this is a FF3b5 issue? Any ideas on how/when to fix this? This is a great extension, so I hope it’ll be fixed soon.

Gravatar for trevor
Trevor

@Joe Clark

Just restart firefox. Should work after that.

Gravatar for nick thompson
Nick Thompson

Hi, I find this extension really useful. Is there a way to detect when a save has occurred? I have a page where i’d like to update a preview whenever the external editor does a save.

I figure i could add an onchange= event on the textarea that checks for the yellow glow to figure out if the change came from IAT. has anyone done this already?

Gravatar for docwhat
docwhat

@Nick Thompson:

That’s a good idea! I’ve added it as a feature request in TRAC.

I can’t think of a work around to use until that event exists. You could try the onchange, but telling the difference between a user and IAT will be hard if not impossible.

Ciao!

Gravatar for craig markwardt
Craig Markwardt

Hello, I’m having exactly the same problem as Andrew Hyatt above. IAT simply ignores what I type into the “Editor:” preference, and reverts to /usr/bin/open. Also, shell scripts are greyed out by the browser, so I can’t select them by mouse. Eventually I resorted to editing prefs.js directly, which worked. Mac OS X, Firefox 3rc3, IAT 0.8.5.

Gravatar for cipher_nemo
cipher_nemo

“It’s All Text!” will not launch any text editor on my system:

Windows XP SP-3 Firefox 3.0.1 (Gecko/2008070208) It’s All Text 0.8.5

I’ve tried Notepad++, Visual Studio, Notepad, and Wordpad. Every time I browse to and set an editor, It’s All Text complains that it can’t launch the editor. I even tried putting in the full path when browsing.

I’m running as a user on my local system that is a member of the Administrators group.

I also have these Firefox add-ons enabled:

/FindBar/ Adblock Plus Better Gmail2 BugMeNot ColorfulTabs ColorZilla Download Statusbar DownThemAll! FireFTP Flagfox Flashblock Foxmarks Full Screen Homestar Runner Gmail Space Greasemonkey IE Tab It’s All Text! MeasureIt NoScript Remove It Permanently Web Developer WOT

I have a theme installed, but it is disabled (no theme active)

I can try it with my add-ons disabled, but it’s a pain to do so (hence looking to see if any know issues). Thanks!

Gravatar for cipher_nemo
cipher_nemo

I just created a new Firefox profile to test this problem from my last post. It is a brand-spanking new profile, with only “Its All Text!” 0.8.5 installed.

I still see the exact same problem. It looks like It’s All Text fails by default with WinXP SP-3 and FF 3.0.1. :-(

Gravatar for cipher_nemo
cipher_nemo

Update: After closing and opening Firefox at least 3 times, the “It’s All Text!” extension is now functioning. Very odd. All of a sudden it started working on my profile with all of the other add-ons enabled. It took at least 3 complete cycles of closing and relaunching FF (giving appropriate time between each one) to get this to work.

On this note, I think this is relevant: The other preferences were not being applied when this didn’t work. For example, the position of the Edit button (I moved it to the top left) would not save when the editor launch issue wasn’t working.

Therefore, I think this might have something to do with It’s All Text not saving preferences correctly until much later (after multiple restarts of Firefox).

Gravatar for brian of london
Brian of London

Am I just dim? I’m on a Mac, followed the instructions to create a shell script in my ~/ folder that runs fine.

When I put that into the Editor box in IAT (by hand, the browse option won’t let me select it) all looks good.

First time I click edit my choice is removed and /usr/bin/open returns. What am I missing?

Brian

Gravatar for docwhat
docwhat

@Brian of London

No, you aren’t dim. There is a bug in IAT under FF3. cipher_nemo refered to it above.

Basically, set the value via the about:config display. :-(

I’m sorry, I’ve been busy with a lot of other things and I haven’t used it as much in work so I haven’t bee working on IAT much at all.

Ciao!

Gravatar for brian of london
Brian of London

Thanks! I seem to have got it working by quiting and restarting Firefox which also seems to have worked. What a great plugin. I’m doing some heave Wiki editing and having a few decent tools in an editor is great.

Gravatar for cipher_nemo
cipher_nemo

Yes, it is a great plug-in after I got it working. It lets me laugh at the thought of editing text in a small textbox, without the inconvenience of launching an editor manually and doing a copy/paste.

Works nicely so far.

Gravatar for brian of london
Brian of London

Is there an easy way to change the default extension? I’m using this 99% of the time for wiki editing and my editor (I’m using Coda) does have a wiki highlight mode. How can I make the default export to Coda be in .wiki?

Gravatar for docwhat
docwhat

@Brian of London

Yup. Go into the preferences and change the list of extensions. The ‘default’ extension is the first extension.

Ciao!

Gravatar for cmon1701
cmon1701

I found a solution similar to the one of Thomas Baker.

What I wanted is opening the Editor GVim under andLinux (since I already have andLinux installed). The problem arised was that the file name with the full path was passed, and I needed a different path for gvim, since under andLinux, I access to the files over a shared folder, so /mnt/win/… and not C:\…

My solution is It’s all Text calls a batch file called gvim.cmd, the content of this file is:

andcmd gvim /mnt/win/Dokumente\ und\ Einstellungen//Anwendungsdaten/Mozilla/Firefox/Profiles//itsalltext/%~nx1

This command uses a selfdefined path plus the filename without the path (%~nx1)

Gravatar for cmon1701
cmon1701

Additional Comment:

andlinux uses iso8859-1 encoding due to windows compatibility. Vim also uses this as default. When I want to edit wiki text, which is in utf-8 encoding, I need to set vim’s encoding to utf-8. For not doing this manually everytime, I modified my script above to:

andcmd gvim -c “:set enc=utf-8” /mnt/win/Dokumente\ und\ Einstellungen//Anwendungsdaten/Mozilla/Firefox/Profiles//itsalltext/%~nx1

Gravatar for brianc
brianc

I noticed that Firefox 3.0.1 on Win XP Pro SP2 leaks a lot of memory when running with IAT 0.8.5 and Gmail (new version) in a tab. It can be as much as 200-600MB when running for a week or so.

I followed the advice at https://wiki.mozilla.org/QA:HomePage:Firefox3.0_TestPlan:Leaks:LeakTesting-How-To and kept removing add-ons and tabs until no leaks occurred. The minimum reproducible scenario is: FF 3.0.1 IAT 0.8.5 one tab open with Gmail

BTW, I really appreciate IAT and hope the leaks are simple to track down.

Gravatar for maxuser
maxuser

I initially had trouble getting IAT to work on my Mac (FF 3.0.1) since it kept silently failing when I tried using a hacked-together script of mine to get it to load inside vim in Terminal.app. I finally tracked it to escaping issues on my end. For anyone interested, you can save this as an executable text file and set it as IAT’s editor:

!/bin/bash

osascript -e ‘tell application “Terminal”^Mactivate^Mdo script with command “vim ”’”$@“’”; osascript -e ”tell application \”Firefox\”^Mactivate^Mend tell”; exit”^Mend tell’

This will switch focus to Terminal.app, open a new terminal window, run vim in that window with the IAT file opened in it; and when you quit from vim, the terminal window will be closed, and focus will return to Firefox.

I’m doubtful that the subtle escaping and line-feeds will survive copy-and-paste, so you can get the original at:

http://3dgreg.com/scripts/terminal-vim

(Note: “^M” in the script is a special character produced by hitting ctrl-V and then <return>. It gets interpreted as a line feed, which is very different from the characters ”^” and “M”.)

Make sure to use “Save Page As…” (and add execute permissions!), since copying-and-pasting from your browser would probably break it as well.

HTH, Greg

Gravatar for tacitdynamite
tacitdynamite

For all you other cygwin / ratpoison / gvim folks out there, I got it to work with these (it was kind of tricky). This assumes that you have XWin display settings identical to those below. Also note that ”%~f1” inserts the fully path qualified name in quotation marks as an argument to the shell script.

--------------text.bat-(associate text files with this) @echo off @echo off SET DISPLAY=127.0.0.1:0.0 SET CYGWINROOT=\cygwin SET RUN=%CYGWINROOT%\bin\run -p /usr/X11R6/bin SET PATH=.;%CYGWINROOT%\bin;%CYGWINROOT%\usr\X11R6\bin;%PATH% SET XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults SET XCMSDB=/usr/X11R6/lib/X11/Xcms.txt SET XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB SET XNLSPATH=/usr/X11R6/lib/X11/locale c:\cygwin\usr\local\bin\ratpoison.exe -c “exec /c/cygwin/home/scripts/text.sh ”%~f1””


--------------/c/cygwin/home/scripts/text.sh---- usr/bin/gvim cygpath --unix "$1"


Gravatar for tacitdynamite
tacitdynamite

Well, I’m actually a liar - It didn’t work the way I described before.
I finally got it to work with cygwin/ratpoison/gvim. This plugin rocks!

here’s the new versions:

—text.bat------------------------- —(associate this with ------------ —.txt in windows)-----------------

@echo off SET DISPLAY=127.0.0.1:0.0 SET CYGWINROOT=\cygwin SET RUN=%CYGWINROOT%\bin\run -p /usr/X11R6/bin SET PATH=.;%CYGWINROOT%\bin;%CYGWINROOT%\usr\X11R6\bin;%PATH% SET XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults SET XCMSDB=/usr/X11R6/lib/X11/Xcms.txt SET XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB SET XNLSPATH=/usr/X11R6/lib/X11/locale c:\cygwin\usr\local\bin\ratpoison.exe -c “exec /c/cygwin/home/scripts/text.sh ”%~f1””

----------------- end of text.bat -

—text.sh--------------------- /usr/bin/gvim ”cygpath --unix \"$1\"


cheers, tacitdynamite

Gravatar for tacitdynamite
tacitdynamite

… now if I could only get this to work with google docs, then I could code online … hm … perhaps greasemonkey …

Gravatar for docwhat
docwhat

@tacitdynamite: I don’t use google docs. Is it doing something like TinyMCE where it has an HTML area that is pretending to be a TEXTAREA?

Gravatar for ann
Ann

I am having some difficulties getting this working on my OSX laptop (Firefox 3.0.1, OSX 10.4.1, It’s All Text 0.8.5). I created the shell script as suggested because I want to use /usr/bin/vi as my editor, set execute permission, configured the plugin to use the shell script, and restarted FF. The result is that the edit button appears, but when I click on it, nothing happens. If I try to run the ‘exec /usr/bin/open -a …’ line in a shell (using Terminal), an error flashes quickly but I don’t have time to read it before the terminal is terminated (ps doesn’t show any odd detached processes). Does anyone have any suggestions on how I can fix this?

Gravatar for tacitdynamite
tacitdynamite

@Ann - Sorry, I’m not familiar really with OS-X, but I would GUESS that “open” is a specific version of the “exec” command, so you are being redundant by putting exec and open on the same line. I believe “open” is not part of bash per se, but it part of the apple flavor unix, whereas “exec” IS part of bash. Maybe try using “exec” and pointing it to the actual executable?

@docwhat - Thanks for the link to TinyMCE; I hadn’t seen that before. From what I can tell by a cursory glance at TinyMCE and from what I assume to be true about Google Docs, they are the same in principle, but not in practice. They both leverage javascript to generate html text. I have a feeling that Google Docs was created with Google Web Kit, which generates (cross-browser and OS compatible) javascript from java code. I have no idea how Google Docs actually captures keystrokes, though; if you open up a new Google Document and view the source, it’s close to two thousand lines, and a quick search for ‘textarea’ turns up nothing. I can picture an easy little greasemonkey script that would add a textarea, though, and then copy the value of the textarea edited in an external editor into the document (copy and paste work fine).

Hey everybody, in case you didn’t know, the “View Source With” plugin for firefox is a great sister plugin to this one. Once you’ve written your script to load text into gvim, you can use it with “View Source With” to easily view source in gvim by default - leveraging it’s pretty printing and formatting abilibities. Yay!

Gravatar for ann
Ann

@tacitdynamite - thanks for offering a suggestion, even if it isn’t your area of expertise (it’s not mine, either, obviously!).

I’ve tried a couple of scripts which were posted as possibly addressing the issue. For example, I’m now trying the script (it’s sh, not bash) which was posted under the name iat.sh at http://docwhat.org/2007/03/itsalltext_v06/. This version doesn’t have both an open and an exec. I think I’ve tried about three different scripts which have been posted.

When I run it from the command line, it gives the following error: 2008-10-13 12:40:11.304 open[2319] LSOpenFromURLSpec() returned -10827 for application /usr/bin/vi path /Users/ann/info/l. 2008-10-13 12:40:11.304 open[2319] Couldn’t open file: /Users/ann/info/l I touched the file, so it exists, but I still get the error.

When I try it from FF, nothing happens at all.

Gravatar for ann
Ann

I just wanted to write that I found a solution to my problem with OSX. I installed gvim. There’s a Darwin ports version here: http://www.akropolix.net/rik0/vim/

Happily using It’s All Text now :)

Gravatar for dirk
Dirk

I’m using Arch Linux and Vim for editing with your extension. It works all great, just good work! But is there possibility to style the button via CSS or something – or will there be such possibility? Would be really cool, to style the button to my needs (and moving it via negative maring values inside the text area g)

Kind regards, Dirk

Gravatar for docwhat
docwhat

@Dirk:

You should be able to style it with stylish. If you have Firebug or the DOM inspector you can see what the markup for the button looks like.

Ciao!

Gravatar for dirk
Dirk

@docwhat: Would be more easy, if the button would have a CSS class ;)

Gravatar for dirk
Dirk

Well … okay … i tried

@namespace url(http://www.w3.org/1999/xhtml);

img[title=“It’s All Text!”] { width:200px; }

but it does not have any effect. The onl thing that seems to work is “visibility:hidden;” – no changing of position, size, or whatever possible :(

Gravatar for docwhat
docwhat

@Dirk:

You need a “!important” I think.

Ciao!

Gravatar for francoise
Francoise

/usr/bin/edit launched TextWrangler successfully on my mac

Gravatar for markus
Markus

Thanks for posting your script for Mac OS above, docwhat!

It works for me. To open my emacs, I just create a script called /usr/bin/start-emacs with the following content and put /usr/bin/start-emacs in the “Editor” preference in “It’s all text”. Here is the script content:

!/bin/sh

if [ ! -f “$1” ]; then touch “$1” fi

exec open -a /Applications/Emacs.app “$1”

Instead of using the script one could also just use “open” as editor application in the “it’s all text” preferences, but that opens TextEditor on my system, and I don’t know how to change the default editor to Emacs.

Gravatar for sam
Sam

Hi,

thanks for the great Add-on! I only discovered it recently, and am very excited.

I use Yahoo Mail. I know the text area for the message body is not really a text area, so I had no expectations here. But: the “To:”, “Cc:” and “Bcc:” fields are text areas, so the plugin works here.

The downside is that the YMail autocomplete feature in these fields stops working with IAT enabled. Normally, I would start typing a name/email address, and get a list of suggestions, based on my Address Book. However, with IAT, this does not work. (For the record, I am using the new YMail, as opposed to YMail Classic.)

Is there anything that needs to be done here? I was thinking that perhaps the IAT Preferences would allow me to define a list of web addresses for which IAT would be disabled… Similar to the IE Tab add-on, which allows me to define a list of addresses for which to use the IE engine by default.

Feel free to contact me if I can provide more info on this.

Thanks again for the great add-on.

Sam

Gravatar for docwhat
docwhat

Hi Sam!

The first thing I’d try is moving the edit button to a different corner. This fixes certain sites, depending on how they were written. I suspect they are using YUI and it’s probably getting upset that the autocomplete container is being moved.

Otherwise, feel free to open a bug at http://trac.gerf.org/itsalltext about it. Even if I don’t fix it ASAP, someone may give you a work around.

Ciao!

Gravatar for john
John

Hi,

I’m another Mac user having trouble getting this going.

Latest version of Leopard Latest Firefox Latest It’s all text

Trying to get IAT to use Aquamacs

IAT works fine when I let it default to textedit.

Created the following script to connect to Aquamacs

!/bin/sh

This is an example shell script for It’s All Text!

if [ ! -f ”$@” ]; then touch ”$@” fi

open -a /Applications/Aquamacs/“Aquamacs Emacs.app” ”$@”

The script starts Aquamacs when I run it from the shell in the terminal.

When I put:

/usr/bin/open -a ~/iat.sh

into the editor in IAT’s preferences. I get “The path does not exist”.

I’m sure there is something simple I’m doing wrong but if someone could offer some help I’d appreciate it.

Thanks for any help.

John

P.S. The tool works swell with textedit; I’d like to be able to use the emacs wikipedia mode though.

Gravatar for docwhat
docwhat
When I put: /usr/bin/open -a ~/iat.sh into the editor in IAT’s preferences. I get “The path does not exist”.

The editor field needs to only have a single script. You can’t pass additional arguments.

If you want to use the shell script, then just put in ”/Users/foobar/iat.sh“.

Alternatively, you can run Aquamacs and from the menu choose “Tools” -> “Install Command Line Tool”

Then you can just enter ”/usr/bin/aquamacs” in the editor field.

Ciao!

Gravatar for john
John

Thanks!

Works great now.

John

P.S. Sorry not to get back to you sooner. I appreciate the rapid response.

Gravatar for marc levoy
Marc Levoy

This is a great extension. I use Emacs (Carbon version on a Mac running Leopard). I can get IAT to launch Emacs and edit text; everything works as advertised. What I’d like better is, if Emacs is already running, it brings up a window in my already-running Emacs with the text to be edited in it. That way, if I use it to edit mail (in a browser, for my Gmail account), I don’t have to re-launch Emacs for every message I compose. I can do this from Thunderbird, using a no-longer-supported add-on called External Editor. I’d like to do it from IAT. I believe it involves using the server feature of Emacs. Have you run into this question before?

-Marc Levoy

Gravatar for marc levoy
Marc Levoy

Never mind, I got it working. In case someone else asks…

Under Carbon Emacs on the Mac, issue (server-start) inside Emacs, e.g. from your Emacs initialize file, then in IAT set the editor to /usr/bin/emacsclient. That’s all it takes! I have also set up hotkeys so with one keystroke I can jump from my Gmail compose window to a new frame in an already-running Emacs, and with another keystroke, which calls (server-done), I can jump back to my compose window with newly edited text.

I love it!

-Marc Levoy

Gravatar for medains
Medains

A feature suggestion:

Allow setting default extension based on the server domain.

I could then set tiddlyspot.com to use .tw and wikipedia.org to use .mediawiki - allowing me to detect filetype and automatically use the correct syntax highlighting in vim - whilst leaving other domains to use .txt

I’m sure this feature would also be useful for bloggers, who might want some slightly different behaviour for blog entry than for other editing tasks.

Gravatar for sam
Sam

Medains, perhaps your editor is able to detect the filetype from the filename, not just from the extension. Have you checked? (vim does that for me.) Sam

Gravatar for jason
Jason

I hope I am posting this in the right place. Back in the original 2007 thread someone brought up the problem of jEdit, which, being a Java program, doesn’t have an exe to which IAT can be pointed. The proposed solution was to create a .cmd file with syntax something like this:

“C:\Program Files\Java\jre6\bin\javaw.exe” -jar “C:\Program Files\jEdit\jedit.jar”

And point IAT to that cmd file instead of the jEdit program itself. The original poster of this question reported that the solution worked; for me, however, there are two problems:

  1. It opens the jEdit text editor but doesn’t load my text!
  2. It opens a new instance of jEdit instead of a new buffer in my already-running instance.

Any help/suggestions would be greatly appreciated.

P.S. I don’t know if you’re aware of this issue, but the font display of comment threads here is completely messed up in Firefox 3.6 on Windows 7. The font looks so bad I can just barely read it and had to zoom in just to type this. Thought you might want to know :-)

Gravatar for docwhat
docwhat

The suggested .cmd file isn’t working because the argument isn’t being passed in. I’m not much at Windows CMD, but I think it needs to have %1 added after the command to pass the name of the file to the java command.

As for the rest, I honestly don’t know. I don’t use jedit or even Java. So I’m not sure how to tell it to open an existing instance instead of a new one. The web page at http://www.jedit.org/users-guide/cli-usage.html implies there is a jedit command line tool that will do this for you, somehow.

I’ll talk to you off-line about the comment threading.

Gravatar for jason
Jason

I tried to post once but I don’t think it worked; if both show up, please delete the other one.

@docwhat I really appreciate the quick reply. Thanks!

After adding the %1 to fix the most salient issue, I resolved the multiple-instance problem by adding the -reuseview switch to the startup command, i.e.

“C:\Program Files\Java\jre6\bin\javaw.exe” -jar “C:\Program Files\jEdit\jedit.jar” -reuseview %1

It now works like a dream and will make my work with MODx (where your plugin is highly recommended) much easier!

Gravatar for docwhat
docwhat

I deleted the other one. The spam filters are sometimes slow. :-/

Glad it’s working!

Gravatar for david.p
David.P

Hi,

I tried to figure out what codepage sets are supported but can’t find any information about it.

I need to use Win32pad for specific reasons, but Win32pad doesn’t support UTF-8. Therefore, which character set would I have to use in It’s All Text in order for it to work correctly with Win32pad (including German Umlauts)?

Thanks already heaps for help, David.P

Gravatar for docwhat
docwhat

You need to find out what codepages Win32pad uses. It depends on the program, which is why I don’t provide a list. That and the list is rather long… :-)

If Firefox doesn’t understand the codepage, then it should return an error…but I haven’t played with it much since UTF-8 is soooo much easier to use.

Gravatar for david branner
David Branner

“wiki page” link is broken here. Thanks.

Gravatar for docwhat
docwhat

Whups. Sorry. I’ve updated the comment. The correct link is .

Ciao!

Submit a Comment

docwhat

The personal blog of Christian Höltje.
docwhat docwhat contact