Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org
Subject: Re: message-sort-headers-1: Symbol's value as variable is void: sort-fold-case
Date: Tue, 10 Oct 2006 08:29:52 +0900	[thread overview]
Message-ID: <b4mr6xh5aq7.fsf@jpl.org> (raw)
In-Reply-To: <87hcydkfdl.fsf@baldur.nicundtas.de>

>>>>> In <87hcydkfdl.fsf@baldur.nicundtas.de> Tassilo Horn wrote:

> since a few days I sometimes get the message in the subject when I press
> RET on an article in *Summary*. The *Article* buffer then shows all
> headers without fontification.

> Even a `M-: (require 'sort)' doesn't fix it, although it's defined there
> (with `defcustom'). This seems to happen only if I start Gnus right
> after I started emacs...

> ,----[ C-h v sort-fold-case RET ]
>| sort-fold-case is a variable defined in `sort.el'.
>| It is void as a variable.
> `----

> A `(defvar sort-fold-case nil)' fixes it.

> If I start emacs and do `M-: (require 'sort)' before I start Gnus, it's
> properly set.

> ,----[ C-h v sort-fold-case RET ]
>| sort-fold-case is a variable defined in `sort.el'.
>| Its value is nil
> `----

You seem to load a program in which `sort-fold-case' is bound to
some value by `let' and uses some sort function to be autoloaded.
For instance, I can reproduce a similar error by `emacs -Q' and
the following form:

(with-temp-buffer
  (let ((sort-fold-case t))
    (sort-lines nil (point-min) (point-max)))
  (sort-lines nil (point-min) (point-max)))

The first `sort-lines' autoloads sort.elc which provides the
`sort-fold-case' variable, however the variable disappears after
exiting the `let' form.  After performing this, the feature
`sort' is provided, so the form `(require 'sort)' does nothing.
Such a code should be written like the following so that the
`sort-fold-case' variable may exist before it is bound by `let'.

  (require 'sort)
  (let ((sort-fold-case t))
    (sort-lines nil (point-min) (point-max)))

There is no culprit in the Gnus sources.  I guess you will
probably be able to find it by performing grep.  For example:

grep '(sort-fold-case' ~/.emacs ~/.gnus.el
grep '(sort-fold-case' /.../site-lisp/*.el



  reply	other threads:[~2006-10-09 23:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-09  9:28 Tassilo Horn
2006-10-09 23:29 ` Katsumi Yamaoka [this message]
2006-10-10  9:39   ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mr6xh5aq7.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).