* face issue in latest emacs snapshot @ 2013-01-08 23:46 Richard Riley 2013-01-09 0:45 ` Katsumi Yamaoka 2013-01-09 0:56 ` Wolfgang Jenkner 0 siblings, 2 replies; 7+ messages in thread From: Richard Riley @ 2013-01-08 23:46 UTC (permalink / raw) To: ding Not a lot to go on I Know, but before I try to re-learn elisp and Gnus changes/bisect I thought Id chance my arm: Following upgrade to latest emacs-snapshot I get this from stuff that worked for the past couple of years. ,---- | 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? Is this a known issue in Gnus or something more likely to be borked in the emacs-snapshot compilation? describe-face gives: ,---- | 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: green | Background: unspecified | Underline: unspecified | Overline: unspecified | Strike-through: unspecified | Box: unspecified | Inverse: unspecified | Stipple: unspecified | Font: unspecified | Fontset: unspecified | Inherit: unspecified | | [back] `---- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face issue in latest emacs snapshot 2013-01-08 23:46 face issue in latest emacs snapshot Richard Riley @ 2013-01-09 0:45 ` Katsumi Yamaoka 2013-01-09 4:34 ` Katsumi Yamaoka 2013-01-09 0:56 ` Wolfgang Jenkner 1 sibling, 1 reply; 7+ messages in thread From: Katsumi Yamaoka @ 2013-01-09 0:45 UTC (permalink / raw) To: ding Richard Riley wrote: > What does "where gnus-face is set" mean? The gnus-face text property will be set onto characters in Group (and Summary, etc.) lines with the value t when highlighting them with faces according to gnus-*-line-format so that they may not be overriden by other faces. >| 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) Does regenerating the format spec help? To do that, eval: (gnus-update-format-specifications t 'group) This regenerates the value of gnus-group-line-format-spec by gnus-group-line-format, and it will be saved to .newsrc.eld thereafter. Note that the Group buffer should be alive when evaluating the above form (IIUC). If you cannot, try resetting the value of gnus-group-line-format to the default temporarily. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face issue in latest emacs snapshot 2013-01-09 0:45 ` Katsumi Yamaoka @ 2013-01-09 4:34 ` Katsumi Yamaoka 0 siblings, 0 replies; 7+ messages in thread From: Katsumi Yamaoka @ 2013-01-09 4:34 UTC (permalink / raw) To: ding Katsumi Yamaoka wrote: > Does regenerating the format spec help? To do that, eval: > (gnus-update-format-specifications t 'group) [...] Please ignore that sentence. The modern Gnus always generates the format specs at the startup. So, what should be suspicious is Emacs, your group-line-format, or perhaps Gnus. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face issue in latest emacs snapshot 2013-01-08 23:46 face issue in latest emacs snapshot Richard Riley 2013-01-09 0:45 ` Katsumi Yamaoka @ 2013-01-09 0:56 ` Wolfgang Jenkner 2013-01-09 8:20 ` Richard Riley 1 sibling, 1 reply; 7+ messages in thread From: Wolfgang Jenkner @ 2013-01-09 0:56 UTC (permalink / raw) To: ding 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? > 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face issue in latest emacs snapshot 2013-01-09 0:56 ` Wolfgang Jenkner @ 2013-01-09 8:20 ` Richard Riley 2013-01-09 10:22 ` Katsumi Yamaoka 2013-01-09 19:33 ` Wolfgang Jenkner 0 siblings, 2 replies; 7+ messages in thread From: Richard Riley @ 2013-01-09 8:20 UTC (permalink / raw) To: ding 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 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face issue in latest emacs snapshot 2013-01-09 8:20 ` Richard Riley @ 2013-01-09 10:22 ` Katsumi Yamaoka 2013-01-09 19:33 ` Wolfgang Jenkner 1 sibling, 0 replies; 7+ messages in thread From: Katsumi Yamaoka @ 2013-01-09 10:22 UTC (permalink / raw) To: ding Richard Riley wrote: > Im assuming something here > | (propertize "\x2709" 'face (rgr/unread-face > | "my-inbox-icon-face") 'gnus-face t) > is the issue How about: (propertize "\x2709" 'face (list (rgr/unread-face "my-inbox-icon-face")) 'gnus-face t) This way, making a face a list, is just what Gnus does for gnus-face-N. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: face issue in latest emacs snapshot 2013-01-09 8:20 ` Richard Riley 2013-01-09 10:22 ` Katsumi Yamaoka @ 2013-01-09 19:33 ` Wolfgang Jenkner 1 sibling, 0 replies; 7+ messages in thread From: Wolfgang Jenkner @ 2013-01-09 19:33 UTC (permalink / raw) To: ding On Wed, Jan 09 2013, Richard Riley wrote: > possibly more pertinently:- > > ,---- > | gnus-group-line-format's value is "%M%S%p%P%-12uy%(%-60ug%) > `---- > > the ug part is the important bit. Thanks. > 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) Well, on the one hand the `gnus-face' text-property is not documented and really just an internal implementation artefact, I think. On the other hand there's likely nothing else to achieve the desired effect in a reasonable way. Does the following patch work for you? Wolfgang -- >8 -- Subject: [PATCH] Try to be compatible with old usage of gnus-face. --- lisp/gnus-spec.el | 4 ++-- lisp/gnus-util.el | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index 446e826..4337cb6 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -271,8 +271,8 @@ Return a list of updated types." ;; `gnus-add-text-properties' runs, since it will be modified ;; by `gnus-put-text-property-excluding-characters-with-faces'. (list ',(symbol-value (intern (format "gnus-face-%d" type))) 'default) - ;; Redundant now, but still convenient. - '(gnus-face t))))) + ;; Mark it as our own stuff. + '(gnus-face gnus-face--merge))))) (defun gnus-balloon-face-function (form type) `(gnus-put-text-property diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index df805c6..f93bbe8 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -872,9 +872,10 @@ If so, and PROP is `face', set the second element of its value to VAL. Otherwise, do nothing." (while (< beg end) ;; Property values are compared with `eq'. - (let ((stop (next-single-property-change beg 'face nil end))) - (if (get-text-property beg 'gnus-face) - (when (eq prop 'face) + (let ((stop (next-single-property-change beg 'face nil end)) + (what (get-text-property beg 'gnus-face))) + (if what + (when (and (eq prop 'face) (eq what 'gnus-face--merge)) (setcar (cdr (get-text-property beg 'face)) (or val 'default))) (inline (gnus-put-text-property beg stop prop val))) @@ -884,11 +885,12 @@ Otherwise, do nothing." "The same as `get-text-property', except where `gnus-face' is set. If so, and PROP is `face', return the second element of its value. Otherwise, return the value." - (let ((val (get-text-property pos prop))) - (if (and (get-text-property pos 'gnus-face) - (eq prop 'face)) - (cadr val) - (get-text-property pos prop)))) + (let ((val (get-text-property pos prop)) + (what (get-text-property pos 'gnus-face))) + (if what + (when (and (eq prop 'face) (eq what 'gnus-face--merge)) + (cadr val)) + val))) (defmacro gnus-faces-at (position) "Return a list of faces at POSITION." -- 1.8.0.3 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-01-09 19:33 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-01-08 23:46 face issue in latest emacs snapshot 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 2013-01-09 10:22 ` Katsumi Yamaoka 2013-01-09 19:33 ` Wolfgang Jenkner
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).