all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
[parent not found: <<<<<7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default>]
[parent not found: <<<7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default>]
[parent not found: <<7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default>]
* Idea: Be able to use text properties as face attributes
@ 2017-03-26 19:14 Drew Adams
  2017-03-26 20:01 ` Clément Pit-Claudel
                   ` (3 more replies)
  0 siblings, 4 replies; 37+ messages in thread
From: Drew Adams @ 2017-03-26 19:14 UTC (permalink / raw)
  To: emacs-devel

Proposal for discussion.  I think it could be a useful
feature.

(It would no doubt involve Emacs C code, which I wouldn't be
helping with.  I could help with updating the doc, though.)

The idea is to allow the use of text properties as
attributes for the text (and overlay) properties `face',
`font-lock-face', and `mouse-face'.  This would apply to
faces used in strings (e.g., `propertize') as well as in
buffers.

It would let you, for example, use a property such as
`invisible', `keymap', or `read-only' (even `display'?) as
part of a face definition.

Any properties that either cannot be implemented or do not
make sense for faces would be excluded (i.e., ignored).  But
I'm guessing that most could be accommodated.

Setting such a face attribute would have the effect that all
occurrences of text with that face, when redisplayed, would
appear as if the text property were applied directly to the
text that has that face.

For example, this would make all doc strings invisible:

  (set-face-attribute 'font-lock-doc-face nil 'invisible t)

Face merging is already well defined, in particular for
cases where there is a conflict between the values of the
same attribute, so I don't expect any problem there.

One open question would be whether to allow the text
properties `face', `font-lock-face', and `mouse-face' as
properties for themselves and each other.  E.g., be able
to do this:

  (set-face-attribute 'face-1 nil 'face 'face-2)

or this:

  (set-face-attribute 'face-1 nil 'font-lock-face 'face-1)

These properties could be excluded (ignored), but allowing
them might prove useful.  It would provide a simple way to
(e.g. temporarily) substitute one face for another or to
give control over a face to font-lock (change `face' to
`font-lock-face') or vice versa.

WDOT?  Is this something that would be useful?  If so, would
someone like to work on implementing it?



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

end of thread, other threads:[~2017-03-29 17:08 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <<<<7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default>
     [not found] ` <<<<83h92e93ip.fsf@gnu.org>
     [not found]   ` <<<8080a162-700f-42cc-aec9-5fdd7c646297@default>
     [not found]     ` <<<8360iu8sdm.fsf@gnu.org>
     [not found]       ` <<19e94d18-656f-4a8f-8843-4d46ffdd037b@default>
     [not found]         ` <<83shlx782i.fsf@gnu.org>
2017-03-28 21:39           ` Idea: Be able to use text properties as face attributes Drew Adams
2017-03-29 14:51             ` Eli Zaretskii
2017-03-29 15:21               ` Lars Ingebrigtsen
2017-03-29 15:36                 ` Clément Pit-Claudel
2017-03-29 17:08                   ` Drew Adams
2017-03-29 15:41                 ` Andreas Politz
2017-03-29 17:08                 ` Drew Adams
     [not found] <<<<<7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default>
     [not found] ` <<<<<83h92e93ip.fsf@gnu.org>
     [not found]   ` <<<<8080a162-700f-42cc-aec9-5fdd7c646297@default>
     [not found]     ` <<<<8360iu8sdm.fsf@gnu.org>
     [not found]       ` <<<19e94d18-656f-4a8f-8843-4d46ffdd037b@default>
     [not found]         ` <<<83shlx782i.fsf@gnu.org>
     [not found]           ` <<403a3ff2-464f-4eb5-9843-60592e786955@default>
     [not found]             ` <<83a8846srr.fsf@gnu.org>
2017-03-29 17:06               ` Drew Adams
     [not found] <<<7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default>
     [not found] ` <<<83h92e93ip.fsf@gnu.org>
     [not found]   ` <<8080a162-700f-42cc-aec9-5fdd7c646297@default>
     [not found]     ` <<8360iu8sdm.fsf@gnu.org>
2017-03-27 20:01       ` Drew Adams
2017-03-28 15:08         ` Eli Zaretskii
     [not found] <<7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default>
     [not found] ` <<83h92e93ip.fsf@gnu.org>
2017-03-27 16:22   ` Drew Adams
2017-03-27 18:52     ` Eli Zaretskii
2017-03-26 19:14 Drew Adams
2017-03-26 20:01 ` Clément Pit-Claudel
2017-03-26 21:42   ` Drew Adams
2017-03-26 22:14     ` Clément Pit-Claudel
2017-03-26 23:26       ` Drew Adams
2017-03-27  1:23         ` Clément Pit-Claudel
2017-03-27 14:54   ` Eli Zaretskii
2017-03-27  4:51 ` Drew Adams
2017-03-27 14:01   ` Drew Adams
2017-03-27 14:57     ` Eli Zaretskii
     [not found]   ` <<30eb5a49-2d98-4f37-8f8c-32a88cd76827@default>
     [not found]     ` <<83bmsm938f.fsf@gnu.org>
2017-03-27 15:49       ` Drew Adams
2017-03-27 18:59         ` Eli Zaretskii
     [not found]   ` <<<30eb5a49-2d98-4f37-8f8c-32a88cd76827@default>
     [not found]     ` <<<83bmsm938f.fsf@gnu.org>
     [not found]       ` <<7f98847c-9b5e-47cf-85f2-247c2045d0af@default>
     [not found]         ` <<834lye8s1k.fsf@gnu.org>
2017-03-27 20:01           ` Drew Adams
2017-03-28 15:06             ` Eli Zaretskii
2017-03-28 15:26               ` Stefan Monnier
2017-03-28 21:40                 ` Drew Adams
2017-03-28 22:45                   ` Stefan Monnier
2017-03-28 23:10                     ` Drew Adams
2017-03-29  1:36                       ` Stefan Monnier
2017-03-29  5:32                         ` Drew Adams
     [not found]   ` <<<<30eb5a49-2d98-4f37-8f8c-32a88cd76827@default>
     [not found]     ` <<<<83bmsm938f.fsf@gnu.org>
     [not found]       ` <<<7f98847c-9b5e-47cf-85f2-247c2045d0af@default>
     [not found]         ` <<<834lye8s1k.fsf@gnu.org>
     [not found]           ` <<93aa220a-35c8-4be1-bfb5-299c46c9eba9@default>
     [not found]             ` <<83tw6d785i.fsf@gnu.org>
2017-03-28 21:39               ` Drew Adams
2017-03-27  7:56 ` Yuri Khan
2017-03-27 14:01   ` Drew Adams
2017-03-27 14:55   ` Eli Zaretskii
2017-03-27 14:51 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.