I’m using xterm in 256-color mode since a month. And I noticed that whenever I log in to any of the remote boxen (via ssh) from my xterm, I started getting WARNING: terminal is not fully functional, whenever I use less, screen, etc. curses applications. So this means
xterm-256color (xterm in 256 color) terminfo is not available in the remote box. Now in most of the remote boxen, I don’t have superuser access, which means I can’t install this terminfo systemwide. So after going through terminfo(5) I figured out that I need to install this terminfo in my
$HOME (at remote end) to get desired functionality. For that I did:
% ssh server mkdir -p .terminfo/x
% scp /usr/share/terminfo/x/xterm-256color server:.terminfo/x/
Thats it. Now I don’t get that warning anymore and I can use Emacs/vim in 256-colors :) . What more do you want from 256-colors life…:)
Since a week or two, I noticed I suddenly started to get many spams (at the rate of around 10/day) delivered to my gmail inbox. I reported them every time, but that is of not much use. So tired of reporting spams, I started to create filters (in gmail) based on From address, ‘Subject’ etc. to delete them as soon they arrive, and I noticed that some of the ham mails also got deleted due to my filters. So, to get rid of this problem yesternight I installed SpamAssassin (which I’m afraid of installing earlier because I heard of its complex configuration) on my box integrated with postfix instance on my Gentoo GNU/Linux. The installation (thanks to portage) is very easy and integration with postfix is also quite easy and well documented on its wiki. And now, the best part, my SpamAssassin today recognized those mails as spam, which gmail‘s spam filters delivered into my inbox :).
Following is a Gnus hack to report spam as ham and ham as spam :
(gnus-summary-save-in-pipe "spamc -L spam")
;; substitute "nnmaildir:spam" with the name of group holding "spam"
(gnus-summary-move-article nil "nnmaildir:spam"))
(gnus-summary-save-in-pipe "spamc -L ham")
;; in summary mode use "B s" and "B h" keys to mark a mail as spam and ham
;; respectively for SpamAssassin to learn, and to also move to "spam" maildir
;; or respool mail accordingly
(define-key gnus-summary-mode-map (kbd "B s") 'my-gnus-mark-spam)
(define-key gnus-summary-mode-map (kbd "B h") 'my-gnus-mark-ham)
I could have used Gnus built-in spam filtering, but Gnus is not the only MUA I use ;) . Anyways, happy assassinating spam…;)
/me has pasted "blog.el -- the blog client for posting to wordpress blogs" at http://paste.lisp.org/display/69993
/me has pasted "metaweblog.el -- an emacs lisp library to access metaweblog capable blogs" at http://paste.lisp.org/display/69994
;; Add to ~/.gnus
"List of email address which only accept inline-PGP signed mails"
:type '(repeat string))
"Lists all recipients in the current buffer"
(setq list-of-recipients (split-string (concat (message-fetch-field "to") ","
(message-fetch-field "bcc") ","
(message-fetch-field "cc")) ","))
(dolist (recipient list-of-recipients)
(when (string-match "\\([[:alnum:].-]+@[[:alnum:].-]*\\)" recipient)
(add-to-list 'list-of-emails (match-string 1 recipient))))
"Sends a PGP signed mail depending on whether recipient allows PGP/MIME signed mails"
(let ((recipients (my-list-all-recipients))
(dolist (email my-inline-pgp-mails-list)
(when (member email recipients)
(message "Recipient found as %s" email)
(setq message-signed t)
(add-hook 'message-send-hook 'my-sign-mail)
Above Emacs Lisp code allows one to send PGP signed messages, in the way preferred by recipient. e.g. There are some lists which don’t allow multipart/signed message, so in order to post to those lists, one needs to send inline PGP signed messages. This piece of code takes care of all that. All you need to do is to specify email addresses which don’t acceptmultipart/signed messages using
M-x customize-variable my-inline-pgp-mails-list. Happy Gnusing… ;)
P.S. The code is also pasted at paste.lisp.org.
In one of my posting, I mentioned how, Emacs is able to render Devanagari script text flawlessly without any issue. But few days ago, I noticed that this is not true anymore. Rendering is not proper, probably something is broken between the builds, as I
emacs-cvs every two-three days. Following is the thumbnail of screenshot (click to enlarge) of issue I was facing.
I reported this issue on Emacs bugtracker. Anyways, I found a workaround against this issue after being pointed out by Kenichi Handa on how to view what font is used for rendering a particular character.
C-u C-x = is the keybinding, just move your
point to the desired character and do
C-u C-x =. On my box, Emacs was using
FreeSans (from GNU freefont) font to render the text. Probably, the appropriate font determination algorithm needs to be fixed in Emacs. Anyways, I hacked the following Emacs Lisp code for a workaround, which hints Emacs to use
Lohit Hindi-11 Xft font:
"Setup Hindi rendering"
(cons (decode-char 'ucs ?\x0900)
(decode-char 'ucs ?\x097f))
I’ve wrapped the code in
defun, because I’m looking for a proper fix. So whenever I need to fix that Devanagari script rendering issue, I do
M-x my-setup-hindi-rendering. Anyone who is experiencing similar issue, can try this and report any bugs. Happy operating Emacs system… ;)
UPDATE: As of now, this bug is fixed in Emacs CVS. I’m running
GNU Emacs 18.104.22.168 (x86_64-pc-linux-gnu, GTK+ Version 2.12.8) of 2008-05-29 on chateau .
Following is the Emacs LISP code, I hacked for ERC to use ctrlproxy:
"Setup Emacs for using ctrlproxy"
;; socks.el is part of GNU Emacs 23
(setq socks-noproxy '("localhost"))
(setq socks-override-functions 1)
(setq erc-server-connect-function 'socks-open-network-stream)
(setq socks-password "password")
;; ctrlproxy exposes itself a SOCKS 5 proxy
(setq socks-server '("ctrlproxy" "localhost" "6680" 5)))
Now, whenever I want to connect to IRC (using ERC) via ctrlproxy, I simply do
M-x setup-ctrlproxy which make ERC aware of ctrlproxy, then
M-x erc to start ERC and at the IRC Server prompt I enter the name of the ctrlproxy network I want to connect to. Thats it. Happy, Emacsing… :)