Headlines for Friday:

  1. Don Marti's e-mail productivity hack (246 words)
  2. Strange wikindx error (97 words)



1. Don Marti's e-mail productivity hack: 13:57

See http://www.linuxworld.com/community/?q=node/387 for inspiration.

;;;_+ Inbox anti-addiction hack
;; The following code implements the inbox productivity hack described
;; by Don Marti in http://www.linuxworld.com/community/?q=node/387 .
;; People are not allowed to check mail for more messages unless the
;; number of ticked items has decreased since the last time checked
;; or `sacha/gnus-inbox-time-threshold' seconds have passed.
;; Use ! (tick article) to mark articles as needing action.
;; Modify the logic if you move messages from your inbox into some kind
;; of archive (which is probably a better idea).

(defvar sacha/gnus-inbox-time-threshold (seconds-to-time (* 60 60 2))
  "*Number of seconds before you can check again if you haven't done any work.
Nil means don't use time.")
(defvar sacha/gnus-inbox-group "mail.misc"
  "*Group to consider as inbox.")

(defvar sacha/gnus-inbox-last-count nil "Number of ticked items in inbox.")
(defvar sacha/gnus-inbox-last-check nil "Timestamp of last check.")

(defun sacha/gnus-inbox-decreased-p ()
  "Return non-nil if you are allowed to check mail.
Based on http://www.linuxworld.com/community/?q=node/387"
  (or (not (numberp sacha/gnus-inbox-last-count)) ;; First time called
      (and sacha/gnus-inbox-last-check
           (not (time-less-p (time-since sacha/gnus-inbox-last-check)
      (or (= (sacha/gnus-inbox-count) 0)
          (< (sacha/gnus-inbox-count)

(defadvice gnus-group-get-new-news (around sacha/gnus-inbox-check-mail activate)
  "Allow only if the inbox count has decreased."
  (if (sacha/gnus-inbox-decreased-p)
    (error "Get your mail count below %d first." sacha/gnus-inbox-last-count))
  (setq sacha/gnus-inbox-last-count (sacha/gnus-inbox-count)
        sacha/gnus-inbox-last-check (current-time)))

(defun sacha/gnus-inbox-count ()
  "Return number of ticked items in `sacha/gnus-inbox-group'."
    (gnus-summary-read-group-1 sacha/gnus-inbox-group nil t nil t)
    (length gnus-newsgroup-marked)))

Random Emacs symbol: set-process-filter-multibyte - Function: Set multibyteness of the strings given to PROCESS's filter.

2. Strange wikindx error: 16:16

Whenever I post a note to wikindx, it pops up a dialog prompting me to save or edit index.php. This probably means that a file type is getting screwed up somewhere. However, index.php views fine by itself. I think that means that in the code that handles those particular functions, a content type is not getting set (or is getting set to something it shouldn't be).

Ah, I give up. I'll use Emacs to manage my bibliography and my quotes.

Random Emacs symbol: read-file-name - Function: Read file name, prompting with PROMPT and completing in directory DIR.


  1. Reply to Karen Quinn Fung - sent 8 days ago
  2. Reply to Simon Rowland - sent 4 days ago
  3. Reply to Dean Michael Berris - sent 3 days ago
  4. Reply to Michael McGuffin - sent 5 days ago
  5. E-mail to Richard Plana
  6. Reply to Evan Prodromou
  7. Reply to George Belotsky - sent 38 days ago
  8. Reply to Shane - sent 8 days ago
  9. Reply to Don Marti - sent 15 days ago
  10. Reply to Don Marti - sent 24 days ago
  11. Reply to Thomas Ott - sent today
  12. Reply to Gabriel Mansour - sent 13 days ago
  13. Reply to Paul Lussier - sent 15 days ago
  14. Reply to Mark Evans - sent 25 days ago
  15. Reply to Clair Ching - sent 25 days ago
  16. Reply to Andrew Plumb - sent 61 days ago
  17. Reply to Thomas Ott - sent 122 days ago
  18. Reply to Diego Rivera, Mark Chignell - sent 2 days ago
  19. Reply to "Diego Rivera"
  20. Reply to "Joyce Davis"
  21. Reply to "Martha J Mealy"
  22. Reply to Stephen Perelgut - sent today
  23. Reply to "Netfirms Billing"
  24. E-mail to MemberService
  25. E-mail to Leigh Honeywell
  26. E-mail to Jedediah Smith
  27. E-mail to Andrey Petrov