unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* patch: notmuch-mua.el -- message-hidden-headers
@ 2011-07-27 20:51 Tomi Ollila
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Ollila @ 2011-07-27 20:51 UTC (permalink / raw)
  To: notmuch

Hi

As of 2011-07-27 ,the function notmuch-mua-add-more-hidden-headers 
will fail to work (or the file to byte-compile) on emacs 22.2.1. 
On emacs 23.2.1 the evaluation of (member header 'message-hidden-headers)
will always return 'nil'. examples (on emacs 22.2.1 scratch buffer):

(setq foo (list "x" "foo" "bar"))

(member "foo" 'foo)

backtrace buffer appears with content:
Debugger entered--Lisp error: (wrong-type-argument listp foo)
  member("foo" foo)
  eval((member "foo" (quote foo)))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp)

(member "foo" foo)

on mimibuffer: ("foo" "bar)

patch to fix this:

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 274c5da..8824b08 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -65,7 +65,7 @@ list."
 (defun notmuch-mua-add-more-hidden-headers ()
   "Add some headers to the list that are hidden by default."
   (mapc (lambda (header)
-         (when (not (member header 'message-hidden-headers))
+         (when (not (member header message-hidden-headers))
            (push header message-hidden-headers)))
        notmuch-mua-hidden-headers))

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* patch: notmuch-mua.el -- message-hidden-headers
@ 2011-07-30 21:46 Tomi Ollila
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Ollila @ 2011-07-30 21:46 UTC (permalink / raw)
  To: notmuch


notmuch-mua.el fails to byte-compile on emacs 22.2.1

The reason is bug in function notmuch-mua-add-more-hidden-headers;
on emacs 23.x it compiles ok, but works incorrectly: The check
which check whether the header is there already always returns nil.
Examples:

(setq foo (list "x" "foo" "bar"))

(member "foo" 'foo)

returns nil,

(member "foo" foo)

returns list ("foo" bar"), as expected.

the former on emacs 22.2.1; backtrace buffer appears with content:

Debugger entered--Lisp error: (wrong-type-argument listp foo)
  member("foo" foo)
  eval((member "foo" (quote foo)))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp)

patch to fix this:

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 274c5da..8824b08 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -65,7 +65,7 @@ list."
 (defun notmuch-mua-add-more-hidden-headers ()
   "Add some headers to the list that are hidden by default."
   (mapc (lambda (header)
-         (when (not (member header 'message-hidden-headers))
+         (when (not (member header message-hidden-headers))
            (push header message-hidden-headers)))
        notmuch-mua-hidden-headers))

Tomi

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-30 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 20:51 patch: notmuch-mua.el -- message-hidden-headers Tomi Ollila
  -- strict thread matches above, loose matches on Subject: below --
2011-07-30 21:46 Tomi Ollila

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).