From: Richard Riley <rileyrg@gmail.com>
To: ding@gnus.org
Subject: Re: face issue in latest emacs snapshot
Date: Wed, 09 Jan 2013 08:20:09 +0000 [thread overview]
Message-ID: <mmehhuzs1y.fsf@news.eternal-september.org> (raw)
In-Reply-To: <85ehhv5g2v.fsf@iznogoud.viz>
Wolfgang Jenkner <wjenkner@inode.at> writes:
> On Wed, Jan 09 2013, Richard Riley wrote:
>
>> | Debugger entered--Lisp error: (wrong-type-argument listp my-inbox-icon-face-unread)
>> | gnus-put-text-property-excluding-characters-with-faces(1 79 face gnus-group-mail-1)
>> | gnus-group-highlight-line("root-email" 1 79)
>> | gnus-group-insert-group-line("root-email" 1 ((seen (1 . 270))) 1 nil)
>> | gnus-topic-prepare-topic((("Email" visible nil ((visible . t))) (("Mailing Lists" visible nil nil)) (("Trips" visible nil nil))) 1 1 nil nil 1 nil)
>> | gnus-topic-prepare-topic((("Gnus" visible nil nil) (("misc" visible nil
>> | nil)) (("News" visible nil nil)) (("Email" visible nil ((visible . t)))
>> | (("Mailing Lists" visible nil nil)) (("Trips" visible nil nil))) (("Gnu"
>> | visible nil nil) (("General" visible nil nil)) (("Emacs" visible nil nil)))
>> | (("Programming" visible nil nil) (("Linux" visible nil nil)) (("PHP" visible
>> | nil nil) (("Javascript" invisible nil nil))))) 0 1 nil nil 1 nil)
>> | gnus-group-prepare-topics(1 nil nil)
>> `----
>>
>> The docstring doesnt really make much sense to me I'm afraid:-
>>
>> ,----
>> | gnus-put-text-property-excluding-characters-with-faces is a compiled Lisp
>> | function.
>> |
>> | (gnus-put-text-property-excluding-characters-with-faces BEG END PROP VAL)
>> |
>> | The same as `put-text-property', except where `gnus-face' is set.
>> | If so, and PROP is `face', set the second element of its value to VAL.
>> | Otherwise, do nothing.
>> `----
>>
>> What does "where gnus-face is set" mean?
>
> That means characters which have a `gnus-face' text-property with
> a non-nil value. Such a `gnus-face' property is put on those parts of
> a summary line which are highlighted with a gnus-face-N (for some
> non-negative integer N) and which are indicated by the %N{ ... %} format
> specifiers in gnus-summary-line-format.
>
> The new thing is that the value of the `face' text-property on such
> characters ought to be a list...
>
> Could you please show the value of your gnus-summary-line-format?
Hopefully this might help without posting the entire .el :
,----
| "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
`----
possibly more pertinently:-
,----
| gnus-group-line-format's value is "%M%S%p%P%-12uy%(%-60ug%)
`----
the ug part is the important bit.
function to format: (my elisp is patchy to say the least : the important
bit is the propertize call which sets to an unread face if no messages
and also sticks an enevlope icon in for inboxs.)
,----
| (defun gnus-user-format-function-g (headers) ;; gnus-group-line-format use %ug to call this func! e.g "%M%S%p%P%(%-40,40ug%)%-5uy %ud\n"
| ;; split full group protocol-server:group into three parts.
| ;;(message "format function g for group %s" gnus-tmp-group)
| (string-match "\\(^.*\\)\\+\\(.*\\):\\(.*\\)" gnus-tmp-group)
| ;; map the first two letters of the server name to a more friendly and cuddly display name
| (let* ((match-ok (match-string 2 gnus-tmp-group))
| (server-key (if (null match-ok) nil (upcase(substring match-ok 0 2)))))
| (if (zerop (length server-key))
| gnus-tmp-group
| ;; construct new group format line with a small envelope taking the place of any INBOX
| (concat
| (propertize
| (format "%-8s" (cdr (assoc server-key rgr/server-name-maps)))
| 'face (rgr/unread-face "my-group-server-face") 'face (rgr/unread-face (concat "my-group-server-face-" server-key)) 'gnus-face t)
| " - "
| (if (or (string-match "mail.misc" (match-string 3 gnus-tmp-group) )(string-match "INBOX" (match-string 3 gnus-tmp-group) ))
| (propertize "\x2709" 'face (rgr/unread-face "my-inbox-icon-face") 'gnus-face t)
| (propertize (match-string 3 gnus-tmp-group) 'face (rgr/unread-face "my-group-face") 'gnus-face t) )
| ))))
`----
Im assuming something here
| (propertize "\x2709" 'face (rgr/unread-face
| "my-inbox-icon-face") 'gnus-face t)
is the issue
commenting out the intern line below I can still run Gnus. (This all
worked for ages before latest emacs snapshot)
,----
| (defun rgr/unread-face (f)
| (intern (if (> (string-to-number gnus-tmp-number-of-unread) 0) (concat f "-unread") f))
| )
`----
and the faces
,----
| Face: my-inbox-icon-face-unread (sample) (customize this face)
|
| Documentation:
| Not documented as a face.
|
| Family: unspecified
| Foundry: unspecified
| Width: unspecified
| Height: unspecified
| Weight: unspecified
| Slant: unspecified
| Foreground: darkgrey
| Background: unspecified
| Underline: unspecified
| Overline: unspecified
| Strike-through: unspecified
| Box: unspecified
| Inverse: unspecified
| Stipple: unspecified
| Font: unspecified
| Fontset: unspecified
| Inherit: my-inbox-icon-face
|
`----
,----
| Face: my-inbox-icon-face (sample) (customize this face)
|
| Documentation:
| Not documented as a face.
|
| Family: unspecified
| Foundry: unspecified
| Width: unspecified
| Height: unspecified
| Weight: unspecified
| Slant: unspecified
| Foreground: green
| Background: unspecified
| Underline: unspecified
| Overline: unspecified
| Strike-through: unspecified
| Box: unspecified
| Inverse: unspecified
| Stipple: unspecified
| Font: unspecified
| Fontset: unspecified
| Inherit: unspecified
`----
>
>> Is this a known issue in Gnus or something more likely to be borked in
>> the emacs-snapshot compilation?
>
> Please see
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12451
>
> Wolfgang
>
next prev parent reply other threads:[~2013-01-09 8:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 23:46 Richard Riley
2013-01-09 0:45 ` Katsumi Yamaoka
2013-01-09 4:34 ` Katsumi Yamaoka
2013-01-09 0:56 ` Wolfgang Jenkner
2013-01-09 8:20 ` Richard Riley [this message]
2013-01-09 10:22 ` Katsumi Yamaoka
2013-01-09 19:33 ` Wolfgang Jenkner
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=mmehhuzs1y.fsf@news.eternal-september.org \
--to=rileyrg@gmail.com \
--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).