unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: text properties in tex mode
@ 2008-10-07  5:33 martin rudalics
  2008-10-07 12:56 ` Kostas Oikonomou
  0 siblings, 1 reply; 15+ messages in thread
From: martin rudalics @ 2008-10-07  5:33 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: ko

 > The only mode in which it doesn't work is TeX/LaTeX mode, and that's
 > what I am having problems with.  Sorry for not making this clear
 > earlier.

Could you please either try the recipe I posted earlier, namely putting
the following form into your .emacs

(add-hook 'latex-mode-hook
           (lambda ()
             (set (make-local-variable 'facemenu-add-face-function) nil)))

or file a bug report (because this is a bug, albeit a minor one).

martin





^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: text properties in tex mode
@ 2008-10-07  1:16 Kostas Oikonomou
  0 siblings, 0 replies; 15+ messages in thread
From: Kostas Oikonomou @ 2008-10-07  1:16 UTC (permalink / raw)
  To: harven, help-gnu-emacs

> Does Edit->Text Properties->Background Color->Other and then
> entering yellow (or another color) works ?

I should have clarified this earlier: this works fine 
(including yellow, or any other color) if the buffer is in 
fundamental mode, shell mode, emacs-lisp mode, and a bunch 
of other modes.
The only mode in which it doesn't work is TeX/LaTeX mode, 
and that's what I am having problems with.
Sorry for not making this clear earlier.

> Do you have something like (:background yellow)
> in your init file ? It should be (:background "yellow")

No.

> Consider launching emacs with emacs -q and try again, to see
> if the problem has to do with your config file. 

emacs -q makes no difference in TeX/LaTeX mode.  Problem is 
still there.

> If not, I guess that the problem has to do with your installation.






^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <mailman.320.1223253849.25473.help-gnu-emacs@gnu.org>]
* Re: text properties in tex mode
@ 2008-10-06  0:44 Kostas Oikonomou
  0 siblings, 0 replies; 15+ messages in thread
From: Kostas Oikonomou @ 2008-10-06  0:44 UTC (permalink / raw)
  To: harven; +Cc: help-gnu-emacs

> If I disable font-lock-mode, I get back the yellow face in the
> Background color menu, 

Same for me.

>and it works. 
Not for me.

> Do you get the error when you click on the Background color button ? 

Yes.

> Does it give you the menu with entries yellow/other ?

Yes.

> Maybe you can try to redefine the yellow face in TeX mode, by putting
> in your .emacs:
> (add-hook 'tex-mode-hook (lambda ()
>     (make-face 'yellow)
>     (set-face-background 'yellow "yellow")))

I did that, and it seems to me it should work, but I get the 
same error:
Face ((:background yellow)) not configured for TeX mode

Nevertheless, if I do Edit -> Text Properties -> Display 
Faces, the "yellow" face *does* show up,
as last in the list!

					Kostas






^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <mailman.292.1223226411.25473.help-gnu-emacs@gnu.org>]
* Re: text properties in tex mode
@ 2008-10-05 15:11 Kostas Oikonomou
  2008-10-05 17:53 ` Drew Adams
  0 siblings, 1 reply; 15+ messages in thread
From: Kostas Oikonomou @ 2008-10-05 15:11 UTC (permalink / raw)
  To: help-gnu-emacs

Harven,

Thank you for the reply.

 > Thus any face you set is overwritten by the font-lock 
processing.
 > Disabling font-lock-mode (M-x font-lock-mode) brings back 
the menu
 > you are interested in, but you will lose the coloring 
provided by
 > latex-mode.

I have indeed disabled font-lock mode everywhere by

(global-font-lock-mode -1)

in my init.el file.  I don't mind losing font-lock coloring 
in my Latex buffer.
But when I then do Edit -> Text Properties -> Background 
color, I get the error I posted.
Are you saying above that this should not be happening?

 > Another solution would be to use overlays instead of 
faces for region highlighting. That's what use the 
highlight-regexp command;
 > this command highlight words matching a regexp. I think 
there is
 > an extension called highlight.el, by Drew Adams, which 
provides easy access to overlays.
 > Have a look at the wiki 
http://www.emacswiki.org/cgi-bin/wiki/HighLight

I have looked at this, but it seems too complicated to me. 
Maybe because I don't know enough about Emacs.  I would 
prefer to use the already-existing Edit -> Text Properties 
menu, unless it is not possible.

                     Kostas




^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <mailman.225.1223135509.25473.help-gnu-emacs@gnu.org>]
* Re: text properties in tex mode
@ 2008-10-04 17:02 martin rudalics
  0 siblings, 0 replies; 15+ messages in thread
From: martin rudalics @ 2008-10-04 17:02 UTC (permalink / raw)
  To: k.oikonomou; +Cc: help-gnu-emacs

 > I use Emacs's plain TeX mode (i.e. not AucTeX), with font-lock deactivated. (And Emacs 22.3.)
 >
 > I'd like to be able to change the background color of a piece of text
 > to, say, yellow, by selecting it with the mouse, and then doing Edit ->
 > Text Properties -> Background Color.
 >
 > However this fails with a message "Face ((:background yellow)) not
 > configured for latex mode".  How do I get around this?

How about using

(add-hook 'latex-mode-hook
	  (lambda ()
	    (set (make-local-variable 'facemenu-add-face-function) nil)))

martin




^ permalink raw reply	[flat|nested] 15+ messages in thread
* text properties in tex mode
@ 2008-10-04 15:40 Kostas Oikonomou
  0 siblings, 0 replies; 15+ messages in thread
From: Kostas Oikonomou @ 2008-10-04 15:40 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I use Emacs's plain TeX mode (i.e. not AucTeX), with 
font-lock deactivated. (And Emacs 22.3.)

I'd like to be able to change the background color of a 
piece of text to, say, yellow, by selecting it with the 
mouse, and then doing Edit -> Text Properties -> Background 
Color.

However this fails with a message "Face ((:background 
yellow)) not configured for latex mode".
How do I get around this?

Thanks very much.

						Kostas




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

end of thread, other threads:[~2008-10-07 14:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07  5:33 text properties in tex mode martin rudalics
2008-10-07 12:56 ` Kostas Oikonomou
2008-10-07 13:03   ` Allan Gottlieb
2008-10-07 13:31   ` martin rudalics
2008-10-07 13:42     ` Kostas Oikonomou
2008-10-07 14:00       ` martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2008-10-07  1:16 Kostas Oikonomou
     [not found] <mailman.320.1223253849.25473.help-gnu-emacs@gnu.org>
2008-10-06  7:14 ` harven
2008-10-06  0:44 Kostas Oikonomou
     [not found] <mailman.292.1223226411.25473.help-gnu-emacs@gnu.org>
2008-10-05 17:57 ` harven
2008-10-05 15:11 Kostas Oikonomou
2008-10-05 17:53 ` Drew Adams
     [not found] <mailman.225.1223135509.25473.help-gnu-emacs@gnu.org>
2008-10-04 17:44 ` harven
2008-10-04 17:02 martin rudalics
2008-10-04 15:40 Kostas Oikonomou

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 read-only IMAP folder(s) and NNTP newsgroup(s).