Managing Google Groups headaches

rusi rustompmody at gmail.com
Thu Nov 28 14:52:21 CET 2013


This silly google-groups does not reflect changed subject lines!!
That means that GG users who may want to read this may not see it.
So reposting as a new thread:
--------------------------------------
Here's what I do to manage the GG-headaches:

1. Firefox needs to have the "Its all text" addon installed
https://addons.mozilla.org/en-US/firefox/addon/its-all-text/

2. Set the editor in "Its all text" to emacs
   [You can use anything… including pure python… more on that below]

3. Put the following into your emacs init
-----------------
;; Clean up Google Groups extra newlines containing only "> "

(defun clean-gg ()
  (interactive)
  (replace-regexp "^> *\n> *\n> *$" "-=\=-" nil 0 (point-max))
  (flush-lines "> *$" 0 (point-max))
  (replace-regexp "-=\=-" "" nil 0 (point-max))
;  (save-buffers-kill-terminal t)
)


(global-set-key (kbd "<f9>") 'clean-gg)

;(push 'clean-gg find-file-hook)
----------------

Now firefox will show a small new "edit" edit button in the text window.
Clicking that puts you into emacs with the text of the message.

F9 will cleanup the double-spaces.

Depending on whether you are comfortable with emacs or not you can do 
either of:

1. Continue editing in emacs.
   M-q and/or auto-fill-mode will clean up long-line paras
   Save-quit will put you back into firefox with cleaned up text

2. Not comfortable with emacs? Just F9 and save-quit will get you back
   to emacs with cleaned up double-spaced text.
   The long lines problem remains in this case.

Dont like emacs?

1. If you know how to write similar code for vi (or whatever) you are
   set.
2. You can also setup emacs to cleanup and close immediately
3. You can also setup your 'editor' to be a pure python script
   [Ive not got round to doing it because I'm not sure how to
   catch-report errors in a proper cross-platform way.]
4. If you are a javascript/greasemonkey expert I guess you can convert
   the emacs-code to JS/GM code and that would be a zero-click
   solution.

Usually use emacs? (ie have it running usually)
You may prefer emacsclient to emacs for the editor.
It will be more instantaneous.



More information about the Python-list mailing list