all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* live programming
@ 2007-01-23 12:45 moueza
  2007-01-23 21:31 ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: moueza @ 2007-01-23 12:45 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 610 bytes --]


Usually, we modify .emacs files  for example to load a new color of
scroll-bar at the start of emacs.
But is it possible to change this color in real time when it is already
loaded, with a script in command-line of term.

Because I want it to change color in including it in a watch -n60 command :
so it should talk with the program emacs.

We can already do scripts but in command line of emacs to load lisp lines ,
not in Xterm or Konsole,I think.
-- 
View this message in context: http://www.nabble.com/live-programming-tf3063900.html#a8521030
Sent from the Emacs - Dev mailing list archive at Nabble.com.

[-- Attachment #1.2: Type: text/html, Size: 738 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* RE: live programming
  2007-01-23 12:45 live programming moueza
@ 2007-01-23 21:31 ` Drew Adams
  2007-01-25  8:44   ` moueza
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2007-01-23 21:31 UTC (permalink / raw)


> Usually, we modify .emacs files for example to load a new color of
> scroll-bar at the start of emacs. But is it possible to change this
> color in real time when it is already loaded...

I believe you can just `M-x customize-face scroll-bar RET', at least in
Emacs 22. Or use `M-x modify-face scroll-bar RET' or call `modify-face' or
`set-face-attribute' from Emacs-Lisp code.

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

* RE: live programming
  2007-01-23 21:31 ` Drew Adams
@ 2007-01-25  8:44   ` moueza
  2007-01-26 15:12     ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: moueza @ 2007-01-25  8:44 UTC (permalink / raw)
  To: Emacs-devel


Yes , but with M-x , it implies to load it manually.But I want an automatic
periodically change of colors.





Drew Adams wrote:
> 
>> Usually, we modify .emacs files for example to load a new color of
>> scroll-bar at the start of emacs. But is it possible to change this
>> color in real time when it is already loaded...
> 
> I believe you can just `M-x customize-face scroll-bar RET', at least in
> Emacs 22. Or use `M-x modify-face scroll-bar RET' or call `modify-face' or
> `set-face-attribute' from Emacs-Lisp code.
> 
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
> 
> 

-- 
View this message in context: http://www.nabble.com/live-programming-tf3063900.html#a8598159
Sent from the Emacs - Dev mailing list archive at Nabble.com.

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

* RE: live programming
  2007-01-25  8:44   ` moueza
@ 2007-01-26 15:12     ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2007-01-26 15:12 UTC (permalink / raw)
  To: moueza, Help-Gnu-Emacs; +Cc: Emacs-devel

> >> Usually, we modify .emacs files for example to load a new color of
> >> scroll-bar at the start of emacs. But is it possible to change this
> >> color in real time when it is already loaded...
> >
> > I believe you can just `M-x customize-face scroll-bar RET', at least in
> > Emacs 22. Or use `M-x modify-face scroll-bar RET' or call
> > `modify-face' or `set-face-attribute' from Emacs-Lisp code.
>
> Yes , but with M-x , it implies to load it manually.But I want an
> automatic periodically change of colors.

Sorry, I guess I didn't understand what you're asking. Please try again.

You mentioned "real-time", so I thought you wanted to change the color
interactively. Do you want to change it by Emacs-Lisp at runtime? If so, you
can use modify-face or set-face-attribute from Lisp, then save the change
using a custom function.

Check cus-edit.el to see if there is a function to save a changed face. I
don't see a `customize-save-face', however, so perhaps you'll have to write
one, using `customize-save-variable' as inspiration. In some of my code, I
do what I think you want this way:

  ;; change the background
  (if (fboundp 'set-face-attribute) ; Not available in Emacs 20
      (set-face-attribute face nil ':background new-background)
    (modify-face face nil new-background nil nil nil nil))
  ;; save the change
  (put face 'customized-face
            (list (list 't (list ':background new-background)))))
  (put face 'face-modified nil)

FYI - This is in my library doremi-frm.el:
http://www.emacswiki.org/cgi-bin/wiki/doremi-frm.el (code) and
http://www.emacswiki.org/cgi-bin/wiki/DoReMi (doc).

Perhaps someone else has a better suggestion. I'm moving this to the proper
list, help-gnu-emacs; please remove emacs-devel from the cc of any replies.

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

end of thread, other threads:[~2007-01-26 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23 12:45 live programming moueza
2007-01-23 21:31 ` Drew Adams
2007-01-25  8:44   ` moueza
2007-01-26 15:12     ` Drew Adams

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.