Re: howto define dynamic color with gnus-summary-line-format

2008-02-25 Thread Bastien
haomiao <[EMAIL PROTECTED]> writes:

> On Feb 20, 3:16 pm, Bastien <[EMAIL PROTECTED]> wrote:
>> Try this instead:
>>
>> (defun gnus-user-format-function-z (header)
>>   "Test dynamic color"
>>   (let ((date-time (safe-date-to-time (mail-header-date header
>> (if (string= date-time (format-time-string "%m%d"))
>> (propertize date-time 'face my-red-face)
>>   (propertize date-time 'face my-blue-face
>>
>> And define `my-red-face' and `my-blue-face'.
>
> Still not worked, my code is
>
> --
> (copy-face 'default 'my-red-face)
> (set-face-foreground 'my-red-face "red")
> (copy-face 'default 'my-blue-face)
> (set-face-foreground 'my-blue-face "blue")
>
> (defun gnus-user-format-function-a (header)
>"Test dynamic color"
>(let  ((date-time (format-time-string "%m/%d" (safe-date-to-time
> (mail-header-date header)
>   (if (string= date-time (format-time-string "%m/%d"))
>  (propertize date-time 'face 'my-red-face 'mouse-face 'my-blue-
> face)
>  (propertize date-time 'face 'my-blue-face 'mouse-face 'my-red-
> face
>
> (setq gnus-summary-line-format "%U%R%z %ua: %1{%B%-23,23n%} %s\n")
> -
>
> It seems that gnus will modify the face property of the text
> returned,  but not the mouse-face property.

I tested and you're right, the 'mouse-face property is okay, but not the
'face property.  There is something weird in there.

Does someone can investigate this problem?

-- 
Bastien


___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: "You should byte-compile Gnus" ?

2008-02-25 Thread William Xu
"Charles philip Chan" <[EMAIL PROTECTED]> writes:

> No, it is not complaining about you gnus config file. Either your el
> files are newer then your elc files or you have another copy of gnus.el
> somewhere that is being picked up.

I use `describe-function gnus' for locating gnus.el, it is under: 
"/Users/william/share/emacs/22.1.91/lisp/gnus/":

,
| zen:~/share/emacs/22.1.91/lisp/gnus$ ls -lthr gnus.el*
| -rw-r--r--  1 william  staff36K  2  4 18:42 gnus.el.gz
| -rw-r--r--  1 william  staff   155K  2 21 20:02 gnus.elc
| zen:~/share/emacs/22.1.91/lisp/gnus$ 
`

The elc file is definitely newer than el file.

Actually when i start emacs with `-Q', then start gnus, it won't
complain that. So the problem looks like in my xwl-gnus.el. While, i
byte-compile all my config files, restart, the problem still
exists. What the hell...?
 
-- 
William

http://williamxu.net9.org



___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: "You should byte-compile Gnus" ?

2008-02-25 Thread Bastien
William Xu <[EMAIL PROTECTED]> writes:

> "Charles philip Chan" <[EMAIL PROTECTED]> writes:
>
>> No, it is not complaining about you gnus config file. Either your el
>> files are newer then your elc files or you have another copy of gnus.el
>> somewhere that is being picked up.
>
> I use `describe-function gnus' for locating gnus.el, it is under: 
> "/Users/william/share/emacs/22.1.91/lisp/gnus/":
>
> ,
> | zen:~/share/emacs/22.1.91/lisp/gnus$ ls -lthr gnus.el*
> | -rw-r--r--  1 william  staff36K  2  4 18:42 gnus.el.gz
> | -rw-r--r--  1 william  staff   155K  2 21 20:02 gnus.elc
> | zen:~/share/emacs/22.1.91/lisp/gnus$ 
> `
>
> The elc file is definitely newer than el file.
>
> Actually when i start emacs with `-Q', then start gnus, it won't
> complain that. So the problem looks like in my xwl-gnus.el. While, i
> byte-compile all my config files, restart, the problem still
> exists. What the hell...?

Maybe you should compare the location of C-h f gnus RET when running
emacs -Q against its location when you're running a normal emacs
session, with all your config.  

-- 
Bastien


___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: "You should byte-compile Gnus" ?

2008-02-25 Thread William Xu
Bastien <[EMAIL PROTECTED]> writes:

> Maybe you should compare the location of C-h f gnus RET when running
> emacs -Q against its location when you're running a normal emacs
> session, with all your config.  

Okay, I caught it. It is all because I have defadvice gnus in my config file:

,
| (defadvice gnus (around switch-or-start)
|   "Start `gnus' or switch to started *Group* buffer."
|   (if (gnus-alive-p)
|   (switch-to-buffer "*Group*")
| ad-do-it
| (gnus-demon-init)))
| 
| (ad-deactivate 'gnus)
`

When I removed the them, everything goes fine. 

I don't quite understand, though. A defadvice will forbid it from being
byte-compiled?
 
-- 
William

http://williamxu.net9.org



___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: "You should byte-compile Gnus" ?

2008-02-25 Thread Katsumi Yamaoka
> William Xu wrote:

> I don't quite understand, though. A defadvice will forbid it from being
> byte-compiled?

The default value of `ad-default-compilation-action' is `maybe'
which means not to compile advised functions if bytecomp.elc is
not loaded.  Though that advice to gnus seems needless now ;-),
there are several ways to force the byte-compilation:

1. Load bytecomp, i.e. (require 'bytecomp), before performing advice.
2. Add the `compile' flag to the arglist of defadvice.  E.g.;
   (defadvice FUNCTION (CLASS NAME ... compile) ...)
3. Set `ad-default-compilation-action' to `always'.

Regards,
___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: "You should byte-compile Gnus" ?

2008-02-25 Thread Katsumi Yamaoka
> Katsumi Yamaoka wrote:

> Though that advice to gnus seems needless now ;-),

Sorry, I meant `gnus-other-frame'.  (It is useful for finding out
the Gnus frame that is behind the other frames.)
___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: "You should byte-compile Gnus" ?

2008-02-25 Thread William Xu
Katsumi Yamaoka <[EMAIL PROTECTED]> writes:

> The default value of `ad-default-compilation-action' is `maybe'
> which means not to compile advised functions if bytecomp.elc is
> not loaded.  Though that advice to gnus seems needless now ;-),
> there are several ways to force the byte-compilation:
>
> 1. Load bytecomp, i.e. (require 'bytecomp), before performing advice.
> 2. Add the `compile' flag to the arglist of defadvice.  E.g.;
>(defadvice FUNCTION (CLASS NAME ... compile) ...)
> 3. Set `ad-default-compilation-action' to `always'.

Thanks for explaining!

As for switching to gnus, I replaced the defadvice with a lambda
function:

,
| (global-set-key (kbd "") (lambda ()
|(interactive)
|(let ((buf (get-buffer "*Group*")))
|  (if buf
|  (switch-to-buffer buf)
|(call-interactively 'gnus)
|(gnus-demon-init)
`

I dislike frames. Never use any. :P

-- 
William

http://williamxu.net9.org



___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


Adaptive scoring doesn't work

2008-02-25 Thread Guilherme Mesquita Gondim
I have this settings in my ~/.gnus:

(setq gnus-default-adaptive-score-alist
   '((gnus-unread-mark)
 (gnus-ticked-mark (from 4))
 (gnus-dormant-mark (from 5))
 (gnus-del-mark (from -4) (subject -1))
 (gnus-read-mark (from 4) (subject 2))
 (gnus-expirable-mark (from -1) (subject -1))
 (gnus-killed-mark (from -1) (subject -3))
 (gnus-kill-file-mark)
 (gnus-ancient-mark)
 (gnus-low-score-mark)
 (gnus-catchup-mark (from -1) (subject -1

(setq gnus-parameters
  '(("mail\\..*"
 (gnus-use-adaptive-scoring nil))
("gmane\\..*"
 (gnus-use-adaptive-scoring t

But these settings in gnus-parameters doesn't work, others settings it works
properly. 

If I do:

  (setq gnus-use-adaptive-scoring t)

The adaptive scoring works, but for all groups. :-/


Can anyone help me with this? :-D

Thanks,
semente

-- 
Guilherme Mesquita Gondim (semente)



___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: howto define dynamic color with gnus-summary-line-format

2008-02-25 Thread Johan Bockgård
haomiao <[EMAIL PROTECTED]> writes:

> (defun gnus-user-format-function-a (header)
>"Test dynamic color"
>(let  ((date-time (format-time-string "%m/%d" (safe-date-to-time
> (mail-header-date header)
>   (if (string= date-time (format-time-string "%m/%d"))
>  (propertize date-time 'face 'my-red-face 'mouse-face 'my-blue-
> face)
>  (propertize date-time 'face 'my-blue-face 'mouse-face 'my-red-
> face
>
> It seems that gnus will modify the face property of the text
> returned,  but not the mouse-face property.

Try

[...]
(propertize date-time 'face 'my-red-face 'mouse-face 'my-blue-face
'gnus-face t)
(propertize date-time 'face 'my-blue-face 'mouse-face 'my-red-face
'gnus-face t)

-- 
Johan Bockgård
___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: howto define dynamic color with gnus-summary-line-format

2008-02-25 Thread Bastien
[EMAIL PROTECTED] (Johan Bockgård) writes:

> haomiao <[EMAIL PROTECTED]> writes:
>
>> (defun gnus-user-format-function-a (header)
>>"Test dynamic color"
>>(let  ((date-time (format-time-string "%m/%d" (safe-date-to-time
>> (mail-header-date header)
>>   (if (string= date-time (format-time-string "%m/%d"))
>>  (propertize date-time 'face 'my-red-face 'mouse-face 'my-blue-
>> face)
>>  (propertize date-time 'face 'my-blue-face 'mouse-face 'my-red-
>> face
>>
>> It seems that gnus will modify the face property of the text
>> returned,  but not the mouse-face property.
>
> Try
>
> [...]
> (propertize date-time 'face 'my-red-face 'mouse-face 'my-blue-face
> 'gnus-face t)
> (propertize date-time 'face 'my-blue-face 'mouse-face 'my-red-face
> 'gnus-face t)

It works nice for me.  

Could you explain this a bit more?  Why is the 'gnus-face property
necessary so that the 'face property is taken into account?

BTW, I did notice that (global-font-lock-mode -1) doesn't prevent 
Gnus from being fontified.  Is it related to a specific handling of
faces in Gnus?

Thanks in advance for details,

-- 
Bastien


___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english


GNUS and Exchange 2007

2008-02-25 Thread Matthew
I was just starting to get into a groove using Gnus for mail so I
decided to switch my work mail account over to using it.
Unfortunately that means using the super duper Exchange 2007 server.
IMAP is enabled on the server and I have use several other clients
successfully against it(Thunderbird, Evolution and Mutt), so I figured
Gnus IMAP would "just work".  Wrong  According to this thread:
http://groups.google.com/group/gnus.ding/browse_thread/thread/a520458a53b70e6/a44321db1b82b60a
I am probably SOL.  Anyone successfully using Gnus against Exchange
2007 IMAP?
Thanks
___
info-gnus-english mailing list
info-gnus-english@gnu.org
http://lists.gnu.org/mailman/listinfo/info-gnus-english