unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* conditional font faces
@ 2010-02-28  0:55 Suvayu Ali
  2010-02-28  2:00 ` Tim Visher
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Suvayu Ali @ 2010-02-28  0:55 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Emacs users/experts,

I was trying to customise the font face to make everything more
visible. Usually I use Emacs with a GUI but quite often I need to use
no-window. The default face for the minibuffer-prompt is medium blue
in no-window which makes it very difficult for me to see. I however
like the defaults when using the GUI.

Is there some way I could keep the defaults when using GUI and set it
to something more readable when using no-window?

Thanks for any insights.

-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: conditional font faces
  2010-02-28  0:55 conditional font faces Suvayu Ali
@ 2010-02-28  2:00 ` Tim Visher
  2010-02-28 22:10   ` Suvayu Ali
  2010-03-01  9:50 ` Thamer Mahmoud
  2010-03-04 16:57 ` zwz
  2 siblings, 1 reply; 18+ messages in thread
From: Tim Visher @ 2010-02-28  2:00 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: help-gnu-emacs

On Sat, Feb 27, 2010 at 7:55 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> I was trying to customise the font face to make everything more
> visible. Usually I use Emacs with a GUI but quite often I need to use
> no-window. The default face for the minibuffer-prompt is medium blue
> in no-window which makes it very difficult for me to see. I however
> like the defaults when using the GUI.
>
> Is there some way I could keep the defaults when using GUI and set it
> to something more readable when using no-window?

I can't remember if it's built in or not but `C-h f emacs-type RET`.
You can then key off of that like so:

    (defun emacs-is-windowed ()
      "Returns non-nil if Emacs is running in Windowed mode."
      (string-match "window" (emacs-type)))

If you do any work on Apple boxes I had to patch it to correctly
detect it.  My patch can be found in my [.emacs
repo](http://github.com/timvisher/.emacs/blob/master/lisp/platform-detection.el#L11).

Hope that helps.

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail




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

* Re: conditional font faces
       [not found] <mailman.2015.1267318522.14305.help-gnu-emacs@gnu.org>
@ 2010-02-28  5:30 ` Stefan Monnier
  2010-02-28 22:11   ` Suvayu Ali
  0 siblings, 1 reply; 18+ messages in thread
From: Stefan Monnier @ 2010-02-28  5:30 UTC (permalink / raw)
  To: help-gnu-emacs

> no-window. The default face for the minibuffer-prompt is medium blue
> in no-window which makes it very difficult for me to see.

That's probably because Emacs fails to detect whether your terminal
emulator is using a dark or light background.
Try to customize `frame-background-mode'.  You can then customize
conditionally based on something like `window-system'.


        Stefan


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

* Re: conditional font faces
  2010-02-28  2:00 ` Tim Visher
@ 2010-02-28 22:10   ` Suvayu Ali
  2010-03-01  2:28     ` Tim Visher
  0 siblings, 1 reply; 18+ messages in thread
From: Suvayu Ali @ 2010-02-28 22:10 UTC (permalink / raw)
  To: Tim Visher; +Cc: help-gnu-emacs

On 28/02/10 03:00 AM, Tim Visher wrote:
> On Sat, Feb 27, 2010 at 7:55 PM, Suvayu Ali<fatkasuvayu+linux@gmail.com>  wrote:
>> I was trying to customise the font face to make everything more
>> visible. Usually I use Emacs with a GUI but quite often I need to use
>> no-window. The default face for the minibuffer-prompt is medium blue
>> in no-window which makes it very difficult for me to see. I however
>> like the defaults when using the GUI.
>>
>> Is there some way I could keep the defaults when using GUI and set it
>> to something more readable when using no-window?
>
> I can't remember if it's built in or not but `C-h f emacs-type RET`.

Its not. But I found the library:
http://malsyned.net/repos/dotemacs/site-lisp/emacs-type.el

> You can then key off of that like so:
>
>      (defun emacs-is-windowed ()
>        "Returns non-nil if Emacs is running in Windowed mode."
>        (string-match "window" (emacs-type)))

It returns a symbol, so I had to modify it like this:

  (require 'emacs-type)
  (defun emacs-is-windowed ()
    "Returns non-nil if Emacs is running in Windowed mode."
    (string-match "window" (symbol-name (emacs-type))))

  (if (emacs-is-windowed)
      (progn (set-face-background 'default "black")
  	      (set-face-foreground 'default "white")))

Now should I be putting above block in a hook? Or is there a better way 
to implement this? If using a hook is the proper solution, which should 
I be using? Something like find-file-hook is definitely inappropriate as
we can easily have buffers associated with no files (my lisp abilities
are limited at best). :(

> Hope that helps.
>

Thanks a lot. That was very helpful.
-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: conditional font faces
  2010-02-28  5:30 ` Stefan Monnier
@ 2010-02-28 22:11   ` Suvayu Ali
  0 siblings, 0 replies; 18+ messages in thread
From: Suvayu Ali @ 2010-02-28 22:11 UTC (permalink / raw)
  To: help-gnu-emacs

On 28/02/10 06:30 AM, Stefan Monnier wrote:
>> no-window. The default face for the minibuffer-prompt is medium blue
>> in no-window which makes it very difficult for me to see.
>
> That's probably because Emacs fails to detect whether your terminal
> emulator is using a dark or light background.
> Try to customize `frame-background-mode'.  You can then customize
> conditionally based on something like `window-system'.

This done funny things to the comment face in no-window. :(

>
>          Stefan

-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: conditional font faces
  2010-02-28 22:10   ` Suvayu Ali
@ 2010-03-01  2:28     ` Tim Visher
  2010-03-01 13:17       ` Suvayu Ali
  0 siblings, 1 reply; 18+ messages in thread
From: Tim Visher @ 2010-03-01  2:28 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: help-gnu-emacs

On Sun, Feb 28, 2010 at 5:10 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> On 28/02/10 03:00 AM, Tim Visher wrote:
>>
>> On Sat, Feb 27, 2010 at 7:55 PM, Suvayu Ali<fatkasuvayu+linux@gmail.com>
>>  wrote:
>>>
>>> I was trying to customise the font face to make everything more
>>> visible. Usually I use Emacs with a GUI but quite often I need to use
>>> no-window. The default face for the minibuffer-prompt is medium blue
>>> in no-window which makes it very difficult for me to see. I however
>>> like the defaults when using the GUI.
>>>
>>> Is there some way I could keep the defaults when using GUI and set it
>>> to something more readable when using no-window?
>>
>> I can't remember if it's built in or not but `C-h f emacs-type RET`.
>
> Its not. But I found the library:
> http://malsyned.net/repos/dotemacs/site-lisp/emacs-type.el
>
>> You can then key off of that like so:
>>
>>     (defun emacs-is-windowed ()
>>       "Returns non-nil if Emacs is running in Windowed mode."
>>       (string-match "window" (emacs-type)))
>
> It returns a symbol, so I had to modify it like this:
>
>  (require 'emacs-type)
>  (defun emacs-is-windowed ()
>   "Returns non-nil if Emacs is running in Windowed mode."
>   (string-match "window" (symbol-name (emacs-type))))
>
>  (if (emacs-is-windowed)
>     (progn (set-face-background 'default "black")
>              (set-face-foreground 'default "white")))

That's interesting.  The file I got from I not where returned strings.
 If you don't mind doing the conversion then you're more than welcome
to but you could download the version I use from my [GitHub
page](http://github.com/timvisher/.emacs/blob/master/site-lisp/emacs-type.el)
if you so desired.  Again, I had to override it like
[so](http://github.com/timvisher/.emacs/blob/master/lisp/platform-detection.el)
in order to correctly detect Macs.

> Now should I be putting above block in a hook? Or is there a better way to
> implement this? If using a hook is the proper solution, which should I be
> using? Something like find-file-hook is definitely inappropriate as
> we can easily have buffers associated with no files (my lisp abilities
> are limited at best). :(

If I were you I'd put it in my .emacs file.  That way it gets
evaluated for everything in the life of that emacs process.  This
works for me at least.  Here's a [very simple example of how I use
it](http://github.com/timvisher/.emacs/blob/master/lisp/my-config.el#L33).

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail




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

* Re: conditional font faces
  2010-02-28  0:55 conditional font faces Suvayu Ali
  2010-02-28  2:00 ` Tim Visher
@ 2010-03-01  9:50 ` Thamer Mahmoud
  2010-03-01 13:21   ` Suvayu Ali
  2010-03-01 21:58   ` Suvayu Ali
  2010-03-04 16:57 ` zwz
  2 siblings, 2 replies; 18+ messages in thread
From: Thamer Mahmoud @ 2010-03-01  9:50 UTC (permalink / raw)
  To: help-gnu-emacs

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> The default face for the minibuffer-prompt is medium blue in no-window
> which makes it very difficult for me to see.

> Is there some way I could keep the defaults when using GUI and set it
> to something more readable when using no-window?

Just add the following code to your .emacs file:

(when (not window-system)
  (set-face-foreground 'minibuffer-prompt "white")
  ;; more customizations for no-window mode ...
  )

However, this won't work when using emacsclient -t. So if you run server
or daemon mode, use this instead:

(defun my-color-customizations-for-nw (frame)
  "Runs after creating new frames"
  (select-frame frame)
  (when (not window-system)
    (set-face-foreground 'minibuffer-prompt "black" frame)))
(add-hook 'after-make-frame-functions 'my-color-customizations-for-nw)

--
Thamer





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

* Re: conditional font faces
  2010-03-01  2:28     ` Tim Visher
@ 2010-03-01 13:17       ` Suvayu Ali
  0 siblings, 0 replies; 18+ messages in thread
From: Suvayu Ali @ 2010-03-01 13:17 UTC (permalink / raw)
  To: Tim Visher; +Cc: help-gnu-emacs

On 01/03/10 03:28 AM, Tim Visher wrote:
> On Sun, Feb 28, 2010 at 5:10 PM, Suvayu Ali<fatkasuvayu+linux@gmail.com>  wrote:
>> On 28/02/10 03:00 AM, Tim Visher wrote:
>>>
>>> On Sat, Feb 27, 2010 at 7:55 PM, Suvayu Ali<fatkasuvayu+linux@gmail.com>
>>>   wrote:
>>>>
>>>> I was trying to customise the font face to make everything more
>>>> visible. Usually I use Emacs with a GUI but quite often I need to use
>>>> no-window. The default face for the minibuffer-prompt is medium blue
>>>> in no-window which makes it very difficult for me to see. I however
>>>> like the defaults when using the GUI.
>>>>
>>>> Is there some way I could keep the defaults when using GUI and set it
>>>> to something more readable when using no-window?
>>>
>>> I can't remember if it's built in or not but `C-h f emacs-type RET`.
>>
>> Its not. But I found the library:
>> http://malsyned.net/repos/dotemacs/site-lisp/emacs-type.el
>>
>>> You can then key off of that like so:
>>>
>>>      (defun emacs-is-windowed ()
>>>        "Returns non-nil if Emacs is running in Windowed mode."
>>>        (string-match "window" (emacs-type)))
>>
>> It returns a symbol, so I had to modify it like this:
>>
>>   (require 'emacs-type)
>>   (defun emacs-is-windowed ()
>>    "Returns non-nil if Emacs is running in Windowed mode."
>>    (string-match "window" (symbol-name (emacs-type))))
>>
>>   (if (emacs-is-windowed)
>>      (progn (set-face-background 'default "black")
>>               (set-face-foreground 'default "white")))
>
> That's interesting.  The file I got from I not where returned strings.
>   If you don't mind doing the conversion then you're more than welcome
> to but you could download the version I use from my [GitHub
> page](http://github.com/timvisher/.emacs/blob/master/site-lisp/emacs-type.el)
> if you so desired.  Again, I had to override it like
> [so](http://github.com/timvisher/.emacs/blob/master/lisp/platform-detection.el)
> in order to correctly detect Macs.
>
>> Now should I be putting above block in a hook? Or is there a better way to
>> implement this? If using a hook is the proper solution, which should I be
>> using? Something like find-file-hook is definitely inappropriate as
>> we can easily have buffers associated with no files (my lisp abilities
>> are limited at best). :(
>
> If I were you I'd put it in my .emacs file.  That way it gets
> evaluated for everything in the life of that emacs process.  This
> works for me at least.  Here's a [very simple example of how I use
> it](http://github.com/timvisher/.emacs/blob/master/lisp/my-config.el#L33).
>

Thanks for all the help Tim, I ended up using it like this:

> (require 'emacs-type)
> (defun emacs-is-windowed ()
>   "Returns non-nil if Emacs is running in Windowed mode."
>   ;; (string-match "window" (emacs-type)))
>   (string-match "window" (symbol-name (emacs-type))))
> (defun dark-looks()
>   (if (emacs-is-windowed)
>     (progn (set-face-background 'default "black")
> 	   (set-face-foreground 'default "white"))))
> (add-hook 'before-make-frame-hook 'dark-looks)
> (dark-looks)

I don't use Macs, so I don't need to worry about that aspect. ;)
-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: conditional font faces
  2010-03-01  9:50 ` Thamer Mahmoud
@ 2010-03-01 13:21   ` Suvayu Ali
  2010-03-01 21:58   ` Suvayu Ali
  1 sibling, 0 replies; 18+ messages in thread
From: Suvayu Ali @ 2010-03-01 13:21 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Thamer,

On 01/03/10 10:50 AM, Thamer Mahmoud wrote:
> Suvayu Ali<fatkasuvayu+linux@gmail.com>  writes:
>
>> The default face for the minibuffer-prompt is medium blue in no-window
>> which makes it very difficult for me to see.
>
>> Is there some way I could keep the defaults when using GUI and set it
>> to something more readable when using no-window?
>
> Just add the following code to your .emacs file:
>
> (when (not window-system)
>    (set-face-foreground 'minibuffer-prompt "white")
>    ;; more customizations for no-window mode ...
>    )
>
> However, this won't work when using emacsclient -t. So if you run server
> or daemon mode, use this instead:

This was my exact problem, maybe I should have stated it explicitly. I 
use server mode a lot. Thanks for posting this, I will try this out 
today and see which of the solutions (Tim's or the one below) serves my 
purpose better.

> (defun my-color-customizations-for-nw (frame)
>    "Runs after creating new frames"
>    (select-frame frame)
>    (when (not window-system)
>      (set-face-foreground 'minibuffer-prompt "black" frame)))
> (add-hook 'after-make-frame-functions 'my-color-customizations-for-nw)

Thank you very much! :)

>
> --
> Thamer
>

-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: conditional font faces
  2010-03-01  9:50 ` Thamer Mahmoud
  2010-03-01 13:21   ` Suvayu Ali
@ 2010-03-01 21:58   ` Suvayu Ali
  2010-03-02  1:25     ` Tim Visher
  1 sibling, 1 reply; 18+ messages in thread
From: Suvayu Ali @ 2010-03-01 21:58 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

On 01/03/10 10:50 AM, Thamer Mahmoud wrote:
> Suvayu Ali<fatkasuvayu+linux@gmail.com>  writes:
>
> However, this won't work when using emacsclient -t. So if you run server
> or daemon mode, use this instead:
>
> (defun my-color-customizations-for-nw (frame)
>    "Runs after creating new frames"
>    (select-frame frame)
>    (when (not window-system)
>      (set-face-foreground 'minibuffer-prompt "black" frame)))
> (add-hook 'after-make-frame-functions 'my-color-customizations-for-nw)

I have a small problem. If I start a no-window emacs in regular mode (as 
in no server) then this doesn't take effect for the first frame. However 
the change is as expected for any subsequent frame I create.

Even putting something like,

(my-color-customizations-for-nw (selected-frame))

doesn't help. Trying the same thing with

(when (window-system)
...)

doesn't have the same problem with a x-window (GUI) emacs.

Does anyone have any idea about this? Thanks in advance for any thoughts.

> --
> Thamer
>

-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: conditional font faces
  2010-03-01 21:58   ` Suvayu Ali
@ 2010-03-02  1:25     ` Tim Visher
  2010-03-02  2:51       ` Suvayu Ali
  0 siblings, 1 reply; 18+ messages in thread
From: Tim Visher @ 2010-03-02  1:25 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: help-gnu-emacs

On Mon, Mar 1, 2010 at 4:58 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> Hi,
>
> On 01/03/10 10:50 AM, Thamer Mahmoud wrote:
>>
>> Suvayu Ali<fatkasuvayu+linux@gmail.com>  writes:
>>
>> However, this won't work when using emacsclient -t. So if you run server
>> or daemon mode, use this instead:
>>
>> (defun my-color-customizations-for-nw (frame)
>>   "Runs after creating new frames"
>>   (select-frame frame)
>>   (when (not window-system)
>>     (set-face-foreground 'minibuffer-prompt "black" frame)))
>> (add-hook 'after-make-frame-functions 'my-color-customizations-for-nw)
>
> I have a small problem. If I start a no-window emacs in regular mode (as in
> no server) then this doesn't take effect for the first frame. However the
> change is as expected for any subsequent frame I create.
>
> Even putting something like,
>
> (my-color-customizations-for-nw (selected-frame))
>
> doesn't help. Trying the same thing with
>
> (when (window-system)
> ...)
>
> doesn't have the same problem with a x-window (GUI) emacs.
>
> Does anyone have any idea about this? Thanks in advance for any thoughts.

I believe you would need to put

    (my-color-customizations-for-nw (selected-frame))

or something along those lines in your .emacs file to get the first
frame created to display using those customizations.  Not sure about
the (selected-frame) portion though.  Best I could come up with on a
cursory look through the ELisp reference manual.

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail




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

* Re: conditional font faces
  2010-03-02  1:25     ` Tim Visher
@ 2010-03-02  2:51       ` Suvayu Ali
  0 siblings, 0 replies; 18+ messages in thread
From: Suvayu Ali @ 2010-03-02  2:51 UTC (permalink / raw)
  To: Tim Visher; +Cc: help-gnu-emacs

On 02/03/10 02:25 AM, Tim Visher wrote:
> On Mon, Mar 1, 2010 at 4:58 PM, Suvayu Ali<fatkasuvayu+linux@gmail.com>  wrote:
>> Hi,
>>
>> On 01/03/10 10:50 AM, Thamer Mahmoud wrote:
>>>
>>> Suvayu Ali<fatkasuvayu+linux@gmail.com>   writes:
>>>
>>> However, this won't work when using emacsclient -t. So if you run server
>>> or daemon mode, use this instead:
>>>
>>> (defun my-color-customizations-for-nw (frame)
>>>    "Runs after creating new frames"
>>>    (select-frame frame)
>>>    (when (not window-system)
>>>      (set-face-foreground 'minibuffer-prompt "black" frame)))
>>> (add-hook 'after-make-frame-functions 'my-color-customizations-for-nw)
>>
>> I have a small problem. If I start a no-window emacs in regular mode (as in
>> no server) then this doesn't take effect for the first frame. However the
>> change is as expected for any subsequent frame I create.
>>
>> Even putting something like,
>>
>> (my-color-customizations-for-nw (selected-frame))
>>
>> doesn't help. Trying the same thing with
>>
>> (when (window-system)
>> ...)
>>
>> doesn't have the same problem with a x-window (GUI) emacs.
>>
>> Does anyone have any idea about this? Thanks in advance for any thoughts.
>
> I believe you would need to put
>
>      (my-color-customizations-for-nw (selected-frame))

As I mentioned in my previous post, I have tried that. If I start the 
server either from the terminal or the gui, all my customisations work 
wonderfully. If I start regular emacs (no server) from the gui, it again 
works. But when I try to start regular emacs (no server) from the 
terminal, the first frame takes the default colours even though all the 
other ones have the appropriate customisations.

The following is the relevant code from my ~/.emacs:

> (defun windowed-stuff(frame)
>   (select-frame frame)
>   (when (window-system)
>     (set-face-foreground 'minibuffer-prompt "medium blue" frame)
> (add-hook 'after-make-frame-functions 'windowed-stuff)
> (windowed-stuff (selected-frame))
>
> (defun no-window-stuff(frame)
>   (select-frame frame)
>   (when (not window-system)
>     (set-face-foreground 'minibuffer-prompt "green" frame)))
> (add-hook 'after-make-frame-functions 'no-window-stuff)
> (no-window-stuff (selected-frame))

I think for some reason either `(selected-frame)' doesn't return a frame 
the first time when emacs is started from the terminal or the '(not 
window-system)' check fails. I have no clue why either of those could be 
possible. If I don't get this to work I can always try to pick some 
default colour which works for both colour schemes I guess. :-\ Would be 
difficult though.

Thanks everyone for all the suggestions so far. All of them were very 
helpful. :)

-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: conditional font faces
  2010-02-28  0:55 conditional font faces Suvayu Ali
  2010-02-28  2:00 ` Tim Visher
  2010-03-01  9:50 ` Thamer Mahmoud
@ 2010-03-04 16:57 ` zwz
  2010-03-04 20:50   ` Suvayu Ali
  2 siblings, 1 reply; 18+ messages in thread
From: zwz @ 2010-03-04 16:57 UTC (permalink / raw)
  To: help-gnu-emacs

Not cutting to your problem but hope it helps a little.

I work on tty quite much, and I have configured my emacs so that it
presents a similar view no matter windowed or no-windowed. I did this
based on the library "color-theme". And my consistent-theme is available
at http://www.emacswiki.org/emacs/zwz.


Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> Hi Emacs users/experts,
>
> I was trying to customise the font face to make everything more
> visible. Usually I use Emacs with a GUI but quite often I need to use
> no-window. The default face for the minibuffer-prompt is medium blue
> in no-window which makes it very difficult for me to see. I however
> like the defaults when using the GUI.
>
> Is there some way I could keep the defaults when using GUI and set it
> to something more readable when using no-window?
>
> Thanks for any insights.





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

* Re: conditional font faces
  2010-03-04 16:57 ` zwz
@ 2010-03-04 20:50   ` Suvayu Ali
  2010-03-05 16:02     ` zwz
  0 siblings, 1 reply; 18+ messages in thread
From: Suvayu Ali @ 2010-03-04 20:50 UTC (permalink / raw)
  To: help-gnu-emacs

On 04/03/10 05:57 PM, zwz wrote:
> Not cutting to your problem but hope it helps a little.
>
> I work on tty quite much, and I have configured my emacs so that it
> presents a similar view no matter windowed or no-windowed. I did this
> based on the library "color-theme". And my consistent-theme is available
> at http://www.emacswiki.org/emacs/zwz.

I'm glad you posted this, your colour theme almost suits my needs. That 
was exactly what I was aiming for, a consistent scheme for both 
no-window and x-window and I much prefer the no-window scheme except for 
some like the minibuffer prompt. I think I will use your theme with 
minor modifications. :)

Thanks a lot.

-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: conditional font faces
  2010-03-04 20:50   ` Suvayu Ali
@ 2010-03-05 16:02     ` zwz
  2010-03-05 16:37       ` Suvayu Ali
  0 siblings, 1 reply; 18+ messages in thread
From: zwz @ 2010-03-05 16:02 UTC (permalink / raw)
  To: help-gnu-emacs

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> On 04/03/10 05:57 PM, zwz wrote:
>> Not cutting to your problem but hope it helps a little.
>>
>> I work on tty quite much, and I have configured my emacs so that it
>> presents a similar view no matter windowed or no-windowed. I did this
>> based on the library "color-theme". And my consistent-theme is available
>> at http://www.emacswiki.org/emacs/zwz.
>
> I'm glad you posted this, your colour theme almost suits my needs. That was
> exactly what I was aiming for, a consistent scheme for both no-window and
> x-window and I much prefer the no-window scheme except for some like the
> minibuffer prompt. I think I will use your theme with minor modifications. :)
>
> Thanks a lot.

You are welcome. :)
I am happy that my work fits your need.
It takes me quite much time to figure out the theme that looks OK
(personally), as there are only 8 colors available on the tty (but I
don't know why, in fact I have enabled the framebuffer, and can watch
videos on the tty. I hope that someone can help me out on the problem.
If there are 256 colors, I think I can get a prettier theme easily).






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

* Re: conditional font faces
  2010-03-05 16:02     ` zwz
@ 2010-03-05 16:37       ` Suvayu Ali
  2010-03-05 17:03         ` zwz
  0 siblings, 1 reply; 18+ messages in thread
From: Suvayu Ali @ 2010-03-05 16:37 UTC (permalink / raw)
  To: help-gnu-emacs

On 05/03/10 05:02 PM, zwz wrote:
> Suvayu Ali<fatkasuvayu+linux@gmail.com>  writes:
>
>> On 04/03/10 05:57 PM, zwz wrote:
>>> Not cutting to your problem but hope it helps a little.
>>>
>>> I work on tty quite much, and I have configured my emacs so that it
>>> presents a similar view no matter windowed or no-windowed. I did this
>>> based on the library "color-theme". And my consistent-theme is available
>>> at http://www.emacswiki.org/emacs/zwz.
>>
>> I'm glad you posted this, your colour theme almost suits my needs. That was
>> exactly what I was aiming for, a consistent scheme for both no-window and
>> x-window and I much prefer the no-window scheme except for some like the
>> minibuffer prompt. I think I will use your theme with minor modifications. :)
>>
>> Thanks a lot.
>
> You are welcome. :)
> I am happy that my work fits your need.
> It takes me quite much time to figure out the theme that looks OK
> (personally), as there are only 8 colors available on the tty (but I
> don't know why, in fact I have enabled the framebuffer, and can watch
> videos on the tty. I hope that someone can help me out on the problem.
> If there are 256 colors, I think I can get a prettier theme easily).

... and I have a solution for you. Install the package ncurses-term 
(applicable for Ubuntu/Debian/Fedora and maybe others too but I'm not 
too sure). Then,

$ export TERM=xterm-256color

and vallah! you have 256 colours on an xterm. ;) I will be waiting for 
your theme update very eagerly.

-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: conditional font faces
  2010-03-05 16:37       ` Suvayu Ali
@ 2010-03-05 17:03         ` zwz
  2010-03-05 20:33           ` Suvayu Ali
  0 siblings, 1 reply; 18+ messages in thread
From: zwz @ 2010-03-05 17:03 UTC (permalink / raw)
  To: help-gnu-emacs

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> On 05/03/10 05:02 PM, zwz wrote:
>> Suvayu Ali<fatkasuvayu+linux@gmail.com>  writes:
>>
>>> On 04/03/10 05:57 PM, zwz wrote:
>>>> Not cutting to your problem but hope it helps a little.
>>>>
>>>> I work on tty quite much, and I have configured my emacs so that it
>>>> presents a similar view no matter windowed or no-windowed. I did this
>>>> based on the library "color-theme". And my consistent-theme is available
>>>> at http://www.emacswiki.org/emacs/zwz.
>>>
>>> I'm glad you posted this, your colour theme almost suits my needs. That was
>>> exactly what I was aiming for, a consistent scheme for both no-window and
>>> x-window and I much prefer the no-window scheme except for some like the
>>> minibuffer prompt. I think I will use your theme with minor modifications. :)
>>>
>>> Thanks a lot.
>>
>> You are welcome. :)
>> I am happy that my work fits your need.
>> It takes me quite much time to figure out the theme that looks OK
>> (personally), as there are only 8 colors available on the tty (but I
>> don't know why, in fact I have enabled the framebuffer, and can watch
>> videos on the tty. I hope that someone can help me out on the problem.
>> If there are 256 colors, I think I can get a prettier theme easily).
>
> ... and I have a solution for you. Install the package ncurses-term (applicable
> for Ubuntu/Debian/Fedora and maybe others too but I'm not too sure). Then,
>
> $ export TERM=xterm-256color

Yes, in this way I could get 256 colors on xterm. But sometimes I work
on a tty (I mean I do not start X at all), and I want to have a
consistent view in such case. The weird problem I described is that I
can watch videos (which are colorful) but can not get the 256 colors on
the tty.

>
> and vallah! you have 256 colours on an xterm. ;) I will be waiting for your
> theme update very eagerly.





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

* Re: conditional font faces
  2010-03-05 17:03         ` zwz
@ 2010-03-05 20:33           ` Suvayu Ali
  0 siblings, 0 replies; 18+ messages in thread
From: Suvayu Ali @ 2010-03-05 20:33 UTC (permalink / raw)
  To: help-gnu-emacs

On 05/03/10 06:03 PM, zwz wrote:
> Suvayu Ali<fatkasuvayu+linux@gmail.com>  writes:
>
>> On 05/03/10 05:02 PM, zwz wrote:
>>> Suvayu Ali<fatkasuvayu+linux@gmail.com>   writes:
>>>
>>>> On 04/03/10 05:57 PM, zwz wrote:
>>> It takes me quite much time to figure out the theme that looks OK
>>> (personally), as there are only 8 colors available on the tty (but I
>>> don't know why, in fact I have enabled the framebuffer, and can watch
>>> videos on the tty. I hope that someone can help me out on the problem.
>>> If there are 256 colors, I think I can get a prettier theme easily).
>>
>> ... and I have a solution for you. Install the package ncurses-term (applicable
>> for Ubuntu/Debian/Fedora and maybe others too but I'm not too sure). Then,
>>
>> $ export TERM=xterm-256color
>
> Yes, in this way I could get 256 colors on xterm. But sometimes I work
> on a tty (I mean I do not start X at all), and I want to have a
> consistent view in such case. The weird problem I described is that I
> can watch videos (which are colorful) but can not get the 256 colors on
> the tty.
>
By enabling framebuffer do you mean passing vga-modes as a kernel 
argument? If you haven't tried that, give it a shot. I have been 
successful in using w3m with full image support with vga modes like 
0x316 ...

The best suited mode will probably be different for you depending on 
your monitor resolution. I would put vga=ask and experiment with all the 
options the kernel provides.

However one word of caution, although w3m worked by itself, emacs-w3m 
failed to display the images in the text terminal. So YMMV.

GL

http://www.mjmwired.net/kernel/Documentation/fb/vesafb.txt
-- 
Suvayu

Open source is the future. It sets us free.




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

end of thread, other threads:[~2010-03-05 20:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-28  0:55 conditional font faces Suvayu Ali
2010-02-28  2:00 ` Tim Visher
2010-02-28 22:10   ` Suvayu Ali
2010-03-01  2:28     ` Tim Visher
2010-03-01 13:17       ` Suvayu Ali
2010-03-01  9:50 ` Thamer Mahmoud
2010-03-01 13:21   ` Suvayu Ali
2010-03-01 21:58   ` Suvayu Ali
2010-03-02  1:25     ` Tim Visher
2010-03-02  2:51       ` Suvayu Ali
2010-03-04 16:57 ` zwz
2010-03-04 20:50   ` Suvayu Ali
2010-03-05 16:02     ` zwz
2010-03-05 16:37       ` Suvayu Ali
2010-03-05 17:03         ` zwz
2010-03-05 20:33           ` Suvayu Ali
     [not found] <mailman.2015.1267318522.14305.help-gnu-emacs@gnu.org>
2010-02-28  5:30 ` Stefan Monnier
2010-02-28 22:11   ` Suvayu Ali

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).