mark :: blog

28 Dec 2010: alpine-disable-pavlovian.patch

You have a new email! (ping!)

Hold on a second. It might be important. I'd better go and read it. Oh it's just a note confirming some meeting for next week. Deleted. Now, what was I working on?

A few years ago, when I was analysing where my time was going, (and why I was working 60+ hour weeks), I figured out that the context switching caused by being unable to concentrate on a task for more than a few minutes was a major productivity drain.

It's hard to resist a new email. My new cellphone takes great delight in having 'push' email and would really like to beep on each new message I receive. The web is full of gmail notifier applications designed specifically to interrupt you to some important new mail. Even my favourite command-line email client, Alpine, likes to ping you about new mail arriving in your inbox even if you're busy in some other mailbox or composing a mail.

Alpine ought to have some sort of "don't notify me" option, but in the meantime I apply the brute-force patch below to disable it.

This 5-minute patch has saved me several hours of task switching every week, and although this means it can sometimes be an hour or two between me checking my inbox, no one has really noticed.

--- alpine-2.00/pith/newmail.c.orig	2010-07-19 16:47:01.127480500 +0100
+++ alpine-2.00/pith/newmail.c	2010-07-19 16:47:35.657602347 +0100
@@ -680,7 +680,7 @@
     }
 
     format_new_mail_msg(folder, number, e, intro, from, subject, subjtext, sizeof(subject));
-
+#if 0
     if(!for_new_mail_win)
       q_status_message5(SM_ASYNC | SM_DING, 0, 60,
 		      "%s%s%s%.80s%.80s", intro,
@@ -706,6 +706,7 @@
 #endif
     }
 #endif
+#endif
 
     if(pith_opt_icon_text){
 	if(F_ON(F_ENABLE_XTERM_NEWMAIL, ps_global)

Created: 28 Dec 2010
Tagged as: ,

0 comments (new comments disabled)

Hi! I'm Mark Cox. This blog gives my thoughts and opinions on my security work, open source, fedora, home automation, and other topics.