Capture workaround...
Mar. 13th, 2013 10:04 amMy Lisp-fu never was my strong suit, so after making a good faith effort to figure out how to take what emacs gets from Windows via emacsclientw and have it pasted as UTF-8 in an emacs buffer, the furthest I've gotten is successfully saving a buffer filled with octal-encoded CP1251 without complaint, and a realization that the link between browser and emacs—at least in Windows—is a fragile thing: sometimes it works every time I use it (though I haven't tried anything like 20 captures in a row), and sometimes it seems to stall after the first capture. I just don't have the chops or the time to figure out why.
On the other hand, I've got about half of an Autohotkey macro written (the part that switches to the snippet buffer in emacs, pastes what's been cut, saves the snippet buffer, and restores the original buffer), and it only took me about five minutes. Writing "wrapper" code to actually switch to emacs and then back to where I was after the information has been pasted shouldn't take too long.
The good news is that once the text snipper I want to save is on the Windows clipboard (in any application, not just a browser), I'll be able to do so. Icing on the cake, in this case, would consist of, for example, also saving the URL of the page I'm viewing (if I'm in a browser) or the file name of the file I'm editing/viewing (if I'm in an office-productivity application such as Word or Acrobat).
Technically, I ought to be able to write a macro that grabs whatever's on the clipboard, saves that information as an array element, and then interacts with the application that's got focus so as to populate the rest of that array with other pertinent information. The array would then be used once focus has shifted to emacs.
Cheers...
On the other hand, I've got about half of an Autohotkey macro written (the part that switches to the snippet buffer in emacs, pastes what's been cut, saves the snippet buffer, and restores the original buffer), and it only took me about five minutes. Writing "wrapper" code to actually switch to emacs and then back to where I was after the information has been pasted shouldn't take too long.
The good news is that once the text snipper I want to save is on the Windows clipboard (in any application, not just a browser), I'll be able to do so. Icing on the cake, in this case, would consist of, for example, also saving the URL of the page I'm viewing (if I'm in a browser) or the file name of the file I'm editing/viewing (if I'm in an office-productivity application such as Word or Acrobat).
Technically, I ought to be able to write a macro that grabs whatever's on the clipboard, saves that information as an array element, and then interacts with the application that's got focus so as to populate the rest of that array with other pertinent information. The array would then be used once focus has shifted to emacs.
Cheers...