unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Suggested font lock preferences for GNU Emacs
@ 2016-07-08  8:02 Davin Pearson
  2016-07-08  9:34 ` Yuri Khan
  2016-07-08 12:01 ` Emanuel Berg
  0 siblings, 2 replies; 27+ messages in thread
From: Davin Pearson @ 2016-07-08  8:02 UTC (permalink / raw)
  To: help-gnu-emacs

I would like to submit my screen shot for consideration by the developers of GNU Emacs as a replacement for the default Emacs fontification.

http://davin.50webs.com/emacs-screen-shot.png

Importantly the background colour if #f0f0f0 which makes it slightly darker than white, with the result that yellow background text (functions in my code) appears brighter then they would if a plain white background was used.

In my code, Java style comments are in red bold italics.

Ordinary Java commments are in dark green italics.

Java keywords are in bold black.

Numbers are in purple.

Strings are with a blue background and white text.

System.out.println statements are in green bold.

true, false and null are in red bold.

The above screen shot show fontification of my new langauge Java Training Wheels.  Note the d-speedbar on the RHS of the screen.  That was written by me as a replacement for the speedbar function that is build into GNU Emacs.

I believe these choices of colours represent an improvement over Emacs' build in fontification and that is why I am submitting it for your consideration.

I am using the same fontification preferences in my Website <http://davin.50webs.com>





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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-08  8:02 Suggested font lock preferences for GNU Emacs Davin Pearson
@ 2016-07-08  9:34 ` Yuri Khan
  2016-07-09  1:25   ` Davin Pearson
  2016-07-08 12:01 ` Emanuel Berg
  1 sibling, 1 reply; 27+ messages in thread
From: Yuri Khan @ 2016-07-08  9:34 UTC (permalink / raw)
  To: Davin Pearson; +Cc: help-gnu-emacs@gnu.org

On Fri, Jul 8, 2016 at 2:02 PM, Davin Pearson <davin.pearson@gmail.com> wrote:

> I would like to submit my screen shot for consideration by the developers of GNU Emacs as a replacement for the default Emacs fontification.
>
> http://davin.50webs.com/emacs-screen-shot.png

Consider contributing a custom theme instead.



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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-08  8:02 Suggested font lock preferences for GNU Emacs Davin Pearson
  2016-07-08  9:34 ` Yuri Khan
@ 2016-07-08 12:01 ` Emanuel Berg
  2016-07-08 12:20   ` Yuri Khan
       [not found]   ` <mailman.821.1467980455.26859.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-08 12:01 UTC (permalink / raw)
  To: help-gnu-emacs

Davin Pearson <davin.pearson@gmail.com> writes:

> I would like to submit my screen shot for
> consideration by the developers of GNU Emacs
> as a replacement for the default
> Emacs fontification.
>
> http://davin.50webs.com/emacs-screen-shot.png

In that case, I shouldn't be worse, so I submit
this screenshot as a much better replacement:

    http://user.it.uu.se/~embe8573/figures/emacs/font-lock-defaults.png

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-08 12:01 ` Emanuel Berg
@ 2016-07-08 12:20   ` Yuri Khan
       [not found]   ` <mailman.821.1467980455.26859.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 27+ messages in thread
From: Yuri Khan @ 2016-07-08 12:20 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs@gnu.org

On Fri, Jul 8, 2016 at 6:01 PM, Emanuel Berg <embe8573@student.uu.se> wrote:

> In that case, I shouldn't be worse, so I submit
> this screenshot as a much better replacement:
>
>     http://user.it.uu.se/~embe8573/figures/emacs/font-lock-defaults.png

Your gray-on-red line on the bottom is actually quite painful. Almost
no contrast in the Y channel.



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

* Re: Suggested font lock preferences for GNU Emacs
       [not found]   ` <mailman.821.1467980455.26859.help-gnu-emacs@gnu.org>
@ 2016-07-08 13:40     ` Emanuel Berg
  2016-07-08 14:12       ` Yuri Khan
       [not found]       ` <mailman.831.1467987165.26859.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-08 13:40 UTC (permalink / raw)
  To: help-gnu-emacs

Yuri Khan <yuri.v.khan@gmail.com> writes:

>> In that case, I shouldn't be worse, so
>> I submit this screenshot as a much better
>> replacement:
>>
>>     http://user.it.uu.se/~embe8573/figures/emacs/font-lock-defaults.png
>
> Your gray-on-red line on the bottom ...
> Almost no contrast in the Y channel.

That is by design because it is the
`mode-line-inactive' face, to indicate the
window isn't the selected one. As for reading,
yes, but you are suppose to *see*, not read.

Compare:

    http://user.it.uu.se/~embe8573/figures/emacs/white-on-red.png

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-08 13:40     ` Emanuel Berg
@ 2016-07-08 14:12       ` Yuri Khan
       [not found]       ` <mailman.831.1467987165.26859.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 27+ messages in thread
From: Yuri Khan @ 2016-07-08 14:12 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs@gnu.org

On Fri, Jul 8, 2016 at 7:40 PM, Emanuel Berg <embe8573@student.uu.se> wrote:
> Yuri Khan <yuri.v.khan@gmail.com> writes:
>
>> Your gray-on-red line on the bottom ...
>> Almost no contrast in the Y channel.
>
> That is by design because it is the
> `mode-line-inactive' face, to indicate the
> window isn't the selected one. As for reading,
> yes, but you are suppose to *see*, not read.

Hm, so you’re not supposed to read that? Then it’s way too loud.

Sorry for derailing the thread, I’ll stop now.



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

* Re: Suggested font lock preferences for GNU Emacs
       [not found]       ` <mailman.831.1467987165.26859.help-gnu-emacs@gnu.org>
@ 2016-07-08 18:19         ` Emanuel Berg
  2016-07-08 21:41         ` rotating the palette (was: Re: Suggested font lock preferences for GNU Emacs) Emanuel Berg
  1 sibling, 0 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-08 18:19 UTC (permalink / raw)
  To: help-gnu-emacs

Yuri Khan <yuri.v.khan@gmail.com> writes:

> Hm, so you’re not supposed to read that?
> Then it’s way too loud.

I just realized I didn't have a function to
output all possible combinations of plain and
bold colors as well as the background colors.

Well, now I do!

Take a look at the almost infinite range of
possibilities at your discretion:

    http://user.it.uu.se/~embe8573/figures/shell/plain-bold-background.png

The code:

    http://user.it.uu.se/~embe8573/conf/.zsh/vt (test-colors)
    http://user.it.uu.se/~embe8573/conf/.zsh/dump

> Sorry for derailing the thread, I’ll stop now.

Don't you think in all fairness you are
forgetting something, namely to show what it
looks like when you use mail?

Actually, as I happen to have a dump, so I'll
help you with that:

    http://user.it.uu.se/~embe8573/figures/mail.jpg

Honestly, I don't know, man...

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* rotating the palette (was: Re: Suggested font lock preferences for GNU Emacs)
       [not found]       ` <mailman.831.1467987165.26859.help-gnu-emacs@gnu.org>
  2016-07-08 18:19         ` Emanuel Berg
@ 2016-07-08 21:41         ` Emanuel Berg
  2016-07-08 23:57           ` Emanuel Berg
  1 sibling, 1 reply; 27+ messages in thread
From: Emanuel Berg @ 2016-07-08 21:41 UTC (permalink / raw)
  To: help-gnu-emacs

Stupid jokes, aside, this idea of outputting
a chart of all combinations is brilliant, it
makes it so much easier to see what probably
will work!

Here is yet another dump with the red replaced
with yellow-on-green. That way, it looks more
futuristic! But actually the future will be
even more modern...

    http://user.it.uu.se/~embe8573/figures/gnus/las-vegas.png

However, I looked for a similar function in
Emacs, but 1) it doesn't seem to work for me;
must be a configuration issue as it works with
'emacs -Q', and 2) it just shows the colors as
for- and backgrounds, not all combinations.
Is there another function?

Compare the output of my shell function:

    http://user.it.uu.se/~embe8573/figures/shell/plain-bold-background.png

By the way, running the shell function in the
Emacs shell doesn't show any colors at all!
Hah, to be I guy so much into colors, I sure
managed to brake them along the whole
"spectrum"...

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: rotating the palette (was: Re: Suggested font lock preferences for GNU Emacs)
  2016-07-08 21:41         ` rotating the palette (was: Re: Suggested font lock preferences for GNU Emacs) Emanuel Berg
@ 2016-07-08 23:57           ` Emanuel Berg
  2016-07-09  1:57             ` Emanuel Berg
  0 siblings, 1 reply; 27+ messages in thread
From: Emanuel Berg @ 2016-07-08 23:57 UTC (permalink / raw)
  To: help-gnu-emacs

This file breaks the `list-colors-display':

    http://user.it.uu.se/~embe8573/conf/emacs-init/help-font-lock.el

But I'm so pleased with the help looking good
so I won't change it. There seems to be
a problem getting both ways.

For some reason the normal method with
`font-lock-add-keywords' doesn't affect the
help-mode (?).

The other problem, the Emacs shell not showing
the colors of the shell function, which the
Linux VTs and xterm etc. do, this turned out
not a config issue after all: it is the same
with 'emacs -Q'. Have a look:

    http://user.it.uu.se/~embe8573/figures/emacs/emacs-shell-colorless.png

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-08  9:34 ` Yuri Khan
@ 2016-07-09  1:25   ` Davin Pearson
  2016-07-09 10:50     ` Alex Kost
  0 siblings, 1 reply; 27+ messages in thread
From: Davin Pearson @ 2016-07-09  1:25 UTC (permalink / raw)
  To: Yuri Khan; +Cc: help-gnu-emacs@gnu.org

On 8 July 2016 at 21:34, Yuri Khan <yuri.v.khan@gmail.com> wrote:

> On Fri, Jul 8, 2016 at 2:02 PM, Davin Pearson <davin.pearson@gmail.com>
> wrote:
>
> > I would like to submit my screen shot for consideration by the
> developers of GNU Emacs as a replacement for the default Emacs
> fontification.
> >
> > http://davin.50webs.com/emacs-screen-shot.png
>
> Consider contributing a custom theme instead.
>

Thanks for the tip.  What about this theme?

(deftheme davins
  "Created 2016-07-09.")

(custom-theme-set-faces
 'davins
 '(default ((t (:family "DejaVu Sans Mono" :foundry "unknown" :width normal
:height 150 :weight normal :slant normal :underline nil :overline nil
:strike-through nil :box nil :inverse-video nil :foreground "#000"
:background "#fff" :stipple nil :inherit nil))))
 '(cursor ((t (:foreground "black" :background "#000000"))))
 '(fixed-pitch ((t (:family "Monospace"))))
 '(variable-pitch ((t (:family "Sans Serif"))))
 '(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc))
(:foreground "magenta")) (t (:foreground "brown"))))
 '(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type
pc)) (:foreground "magenta")) (t (:foreground "medium blue"))))
 '(highlight ((t (:foreground "#fff" :background "#88f"))))
 '(region ((t (:foreground "#fff" :background "#f8a"))))
 '(shadow ((((class color grayscale) (min-colors 88) (background light))
(:foreground "grey50")) (((class color grayscale) (min-colors 88)
(background dark)) (:foreground "grey70")) (((class color) (min-colors 8)
(background light)) (:foreground "green")) (((class color) (min-colors 8)
(background dark)) (:foreground "yellow"))))
 '(secondary-selection ((t (:foreground "white" :background "#8888ff"))))
 '(trailing-whitespace ((((class color) (background light)) (:background
"red1")) (((class color) (background dark)) (:background "red1")) (t
(:inverse-video t))))
 '(font-lock-builtin-face ((t (:weight bold :foreground "#f00"))))
 '(font-lock-comment-delimiter-face ((default (:inherit
(font-lock-comment-face)))))
 '(font-lock-comment-face ((t (:weight normal :slant italic :foreground
"#060"))))
 '(font-lock-constant-face ((t (:weight bold :foreground "#f00"))))
 '(font-lock-doc-face ((t (:weight bold :slant italic :foreground "#f00"
:background "#fff" :inherit (font-lock-string-face)))))
 '(font-lock-function-name-face ((t (:weight bold :foreground "black"
:background "yellow"))))
 '(font-lock-keyword-face ((t (:weight bold :foreground "#000"))))
 '(font-lock-negation-char-face ((t nil)))
 '(font-lock-preprocessor-face ((t (:underline (:color foreground-color
:style line) :foreground "#888" :background "#eee" :inherit
(font-lock-builtin-face)))))
 '(font-lock-regexp-grouping-backslash ((t (:foreground "#080" :background
"#ccf" :inherit (bold)))))
 '(font-lock-regexp-grouping-construct ((t (:foreground "#080" :background
"#ccf" :inherit (bold)))))
 '(font-lock-string-face ((t (:weight bold :foreground "white" :background
"#8888ff"))))
 '(font-lock-type-face ((t (:weight bold :foreground "#0000ff" :background
"#fff"))))
 '(font-lock-variable-name-face ((t (:foreground "#0011ff"))))
 '(font-lock-warning-face ((t (:weight bold :foreground "red" :inherit
(error)))))
 '(button ((t (:inherit (link)))))
 '(link ((((class color) (min-colors 88) (background light)) (:underline
(:color foreground-color :style line) :foreground "RoyalBlue3")) (((class
color) (background light)) (:underline (:color foreground-color :style
line) :foreground "blue")) (((class color) (min-colors 88) (background
dark)) (:underline (:color foreground-color :style line) :foreground
"cyan1")) (((class color) (background dark)) (:underline (:color
foreground-color :style line) :foreground "cyan")) (t (:inherit
(underline)))))
 '(link-visited ((default (:inherit (link))) (((class color) (background
light)) (:foreground "magenta4")) (((class color) (background dark))
(:foreground "violet"))))
 '(fringe ((((class color) (background light)) (:background "grey95"))
(((class color) (background dark)) (:background "grey10")) (t (:background
"gray"))))
 '(header-line ((default (:inherit (mode-line))) (((type tty)) (:underline
(:color foreground-color :style line) :inverse-video nil)) (((class color
grayscale) (background light)) (:box nil :foreground "grey20" :background
"grey90")) (((class color grayscale) (background dark)) (:box nil
:foreground "grey90" :background "grey20")) (((class mono) (background
light)) (:underline (:color foreground-color :style line) :box nil
:inverse-video nil :foreground "black" :background "white")) (((class mono)
(background dark)) (:underline (:color foreground-color :style line) :box
nil :inverse-video nil :foreground "white" :background "black"))))
 '(tooltip ((((class color)) (:inherit (variable-pitch) :foreground "black"
:background "lightyellow")) (t (:inherit (variable-pitch)))))
 '(mode-line ((t (:box (:line-width -1 :color nil :style released-button)
:foreground "#000" :background "#8f8"))))
 '(mode-line-buffer-id ((t (:weight bold :foreground "#000" :background
"#8f8"))))
 '(mode-line-emphasis ((t (:weight bold))))
 '(mode-line-highlight ((((class color) (min-colors 88)) (:box (:line-width
2 :color "grey40" :style released-button))) (t (:inherit (highlight)))))
 '(mode-line-inactive ((default (:inherit (mode-line))) (((class color)
(min-colors 88) (background light)) (:background "grey90" :foreground
"grey20" :box (:line-width -1 :color "grey75" :style nil) :weight light))
(((class color) (min-colors 88) (background dark)) (:background "grey30"
:foreground "grey80" :box (:line-width -1 :color "grey40" :style nil)
:weight light))))
 '(isearch ((t (:weight bold :foreground "#ff0000" :background "#000000"))))
 '(isearch-fail ((((class color) (min-colors 88) (background light))
(:background "RosyBrown1")) (((class color) (min-colors 88) (background
dark)) (:background "red4")) (((class color) (min-colors 16)) (:background
"red")) (((class color) (min-colors 8)) (:background "red")) (((class color
grayscale)) (:foreground "grey")) (t (:inverse-video t))))
 '(lazy-highlight ((t (:foreground "#000000" :background "#0ff"))))
 '(match ((((class color) (min-colors 88) (background light)) (:background
"yellow1")) (((class color) (min-colors 88) (background dark)) (:background
"RoyalBlue3")) (((class color) (min-colors 8) (background light))
(:foreground "black" :background "yellow")) (((class color) (min-colors 8)
(background dark)) (:foreground "white" :background "blue")) (((type tty)
(class mono)) (:inverse-video t)) (t (:background "gray"))))
 '(next-error ((t (:inherit (region)))))
 '(query-replace ((t (:inherit (isearch))))))

(provide-theme 'davins)

-- 
Sincerely and kindest regards, Davin.
Davin Pearson    http://davin.50webs.com


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

* Re: rotating the palette (was: Re: Suggested font lock preferences for GNU Emacs)
  2016-07-08 23:57           ` Emanuel Berg
@ 2016-07-09  1:57             ` Emanuel Berg
  2016-07-09 21:19               ` the dumb Emacs terminal (was: Re: rotating the palette) Emanuel Berg
  0 siblings, 1 reply; 27+ messages in thread
From: Emanuel Berg @ 2016-07-09  1:57 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> The other problem, the Emacs shell not showing
> the colors of the shell function, which the
> Linux VTs and xterm etc. do, this turned out
> not a config issue after all: it is the same
> with 'emacs -Q'. Have a look:
>
>     http://user.it.uu.se/~embe8573/figures/emacs/emacs-shell-colorless.png

The problem boils down to this, which doesn't
work in the Emacs shell but everywhere else:

    $ tput setaf 2 && echo green

There is no error message but the return code
is 1 (i.e., an error).

Perhaps tput cannot be used in dumb
terminals...?

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-09  1:25   ` Davin Pearson
@ 2016-07-09 10:50     ` Alex Kost
  2016-07-10  1:14       ` Davin Pearson
                         ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Alex Kost @ 2016-07-09 10:50 UTC (permalink / raw)
  To: Davin Pearson; +Cc: help-gnu-emacs@gnu.org, Yuri Khan

Davin Pearson (2016-07-09 04:25 +0300) wrote:

> On 8 July 2016 at 21:34, Yuri Khan <yuri.v.khan@gmail.com> wrote:
>
>> On Fri, Jul 8, 2016 at 2:02 PM, Davin Pearson <davin.pearson@gmail.com>
>> wrote:
>>
>> > I would like to submit my screen shot for consideration by the
>> developers of GNU Emacs as a replacement for the default Emacs
>> fontification.
>> >
>> > http://davin.50webs.com/emacs-screen-shot.png
>>
>> Consider contributing a custom theme instead.
>>
>
> Thanks for the tip.  What about this theme?

If you want to make your theme available for other people, you can make
a package for it and contribute it to MELPA for example (there are a lot
of themes there).

-- 
Alex



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

* the dumb Emacs terminal (was: Re: rotating the palette)
  2016-07-09  1:57             ` Emanuel Berg
@ 2016-07-09 21:19               ` Emanuel Berg
  2016-07-09 22:02                 ` John Mastro
       [not found]                 ` <mailman.949.1468101798.26859.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-09 21:19 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> The problem boils down to this, which doesn't
> work in the Emacs shell but everywhere else:
>
>     $ tput setaf 2 && echo green
>
> There is no error message but the return code
> is 1 (i.e., an error).
>
> Perhaps tput cannot be used in dumb
> terminals...?

If you do

    $ infocmp dumb

you get:

    #	Reconstructed via infocmp from file: /lib/terminfo/d/dumb
    dumb|80-column dumb tty,
       am,
       cols#80,
       bel=^G, cr=^M, cud1=^J, ind=^J,

but If you do

    $ infocmp screen

you get:

    #	Reconstructed via infocmp from file: /lib/terminfo/s/screen
    screen|VT 100/ANSI X3.64 virtual terminal,
       am, km, mir, msgr, xenl,
       colors#8, cols#80, it#8, lines#24, ncv@, pairs#64,
       acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
       bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
       clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
       csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
       cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
       cvvis=\E[34l, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
       dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
       flash=\Eg, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@,
       il=\E[%p1%dL, il1=\E[L, ind=^J, is2=\E)0, kbs=\177,
       kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
       kdch1=\E[3~, kend=\E[4~, kf1=\EOP, kf10=\E[21~,
       kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
       kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
       khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
       nel=\EE, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
       rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[23m,
       rmul=\E[24m, rs2=\Ec\E[?1000l\E[?25h, sc=\E7,
       setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
       sgr=\E[0%?%p6%t;1%;%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
       sgr0=\E[m\017, smacs=^N, smcup=\E[?1049h, smir=\E[4h,
       smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m, tbc=\E[3g,

So tputting 'setaf' has no effect in the dumb
Emacs terminal/shell, as it isn't defined as
a terminal alias, or whatever those entry codes
are called!

Besides, in /usr/share/terminfo as well as
/lib/terminfo on my Raspbian system, there are
so many terminals defined it is mind-boggling!
What is the meaning of it all? Were they all
once physical computers or why are there so
many? Who uses them?

And does the Emacs terminal have to be dumb?

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: the dumb Emacs terminal (was: Re: rotating the palette)
  2016-07-09 21:19               ` the dumb Emacs terminal (was: Re: rotating the palette) Emanuel Berg
@ 2016-07-09 22:02                 ` John Mastro
  2016-07-11 12:05                   ` the dumb Emacs terminal Dmitry Alexandrov
       [not found]                 ` <mailman.949.1468101798.26859.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 27+ messages in thread
From: John Mastro @ 2016-07-09 22:02 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Emanuel Berg <embe8573@student.uu.se> wrote:
> And does the Emacs terminal have to be dumb?

M-x shell isn't really a terminal (emulator) at all, which is also why
you can't run e.g. htop there.

If you try "tput setaf 2 && echo green" in either M-x term or M-x
ansi-term, you'll see that it does work there.

I nonetheless prefer M-x shell over Emacs's terminal emulators.

        John



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

* Re: the dumb Emacs terminal
       [not found]                 ` <mailman.949.1468101798.26859.help-gnu-emacs@gnu.org>
@ 2016-07-09 22:38                   ` Emanuel Berg
  2016-07-10  0:01                     ` John Mastro
       [not found]                     ` <mailman.954.1468108922.26859.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-09 22:38 UTC (permalink / raw)
  To: help-gnu-emacs

John Mastro <john.b.mastro@gmail.com> writes:

>> And does the Emacs terminal have to be dumb?
>
> M-x shell isn't really a terminal (emulator)
> at all, which is also why you can't run e.g.
> htop there.

Right, you can't use even more basic stuff like
'clear'. Is it just able to output new lines,
not change the state of what has already
been outputted?

> If you try "tput setaf 2 && echo green" in
> either M-x term or M-x ansi-term, you'll see
> that it does work there.

Now it is beyond Las Vegas - it is a *circus*!

    http://user.it.uu.se/~embe8573/figures/emacs/emacs-terminal-emulator.png

> I nonetheless prefer M-x shell over Emacs's
> terminal emulators.

Why go into the small workshop, when there is
a big?

Only a lot of shortcuts including M-x seem to
be shadowed by the shell, that must be dealt
with as I seldom or never use them with the
shell but with Emacs I do it all the time
obviously. So it should be mergable that way,
God willing.

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: the dumb Emacs terminal
  2016-07-09 22:38                   ` Emanuel Berg
@ 2016-07-10  0:01                     ` John Mastro
       [not found]                     ` <mailman.954.1468108922.26859.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 27+ messages in thread
From: John Mastro @ 2016-07-10  0:01 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Emanuel Berg <embe8573@student.uu.se> wrote:
>> M-x shell isn't really a terminal (emulator)
>> at all, which is also why you can't run e.g.
>> htop there.
>
> Right, you can't use even more basic stuff like
> 'clear'. Is it just able to output new lines,
> not change the state of what has already
> been outputted?

Yes, pretty much - it just sends a line of input and then prints the
output.

>> I nonetheless prefer M-x shell over Emacs's
>> terminal emulators.
>
> Why go into the small workshop, when there is
> a big?

I like the simplicity and that I can work in/with the *shell* buffer
just like any "normal" buffer. I do, of course, sometimes use programs
that don't work there, but it's rare enough that I don't mind switching
to a separate terminal emulator on those occasions.

Many of the things I previously would have done in a terminal emulator
that wouldn't have worked well in M-x shell I now do in various Emacs
modes anyway. (Mail, some version control tasks, reading man pages,
etc.)

> Only a lot of shortcuts including M-x seem to
> be shadowed by the shell, that must be dealt
> with as I seldom or never use them with the
> shell but with Emacs I do it all the time
> obviously. So it should be mergable that way,
> God willing.

Both term and ansi-term make a distinction between "line mode" and "char
mode", which send input to the shell a line at a time or a character at
a time respectively. They start out in char mode by default; you can
switch to line mode with C-c C-j and back to char mode with C-c C-k.
Line mode is more similar to M-x shell and using it, when possible,
helps close some of the distance.

        John



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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-09 10:50     ` Alex Kost
@ 2016-07-10  1:14       ` Davin Pearson
  2016-07-10  4:30       ` Davin Pearson
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 27+ messages in thread
From: Davin Pearson @ 2016-07-10  1:14 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-gnu-emacs@gnu.org, Yuri Khan

When I run my package davins-theme.el it turns the fonts into ugly
proportional fonts.

This is *not* what I want my package to do.


On 9 July 2016 at 22:50, Alex Kost <alezost@gmail.com> wrote:

> Davin Pearson (2016-07-09 04:25 +0300) wrote:
>
> > On 8 July 2016 at 21:34, Yuri Khan <yuri.v.khan@gmail.com> wrote:
> >
> >> On Fri, Jul 8, 2016 at 2:02 PM, Davin Pearson <davin.pearson@gmail.com>
> >> wrote:
> >>
> >> > I would like to submit my screen shot for consideration by the
> >> developers of GNU Emacs as a replacement for the default Emacs
> >> fontification.
> >> >
> >> > http://davin.50webs.com/emacs-screen-shot.png
> >>
> >> Consider contributing a custom theme instead.
> >>
> >
> > Thanks for the tip.  What about this theme?
>
> If you want to make your theme available for other people, you can make
> a package for it and contribute it to MELPA for example (there are a lot
> of themes there).
>
> --
> Alex
>



-- 
Sincerely and kindest regards, Davin.
Davin Pearson    http://davin.50webs.com


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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-09 10:50     ` Alex Kost
  2016-07-10  1:14       ` Davin Pearson
@ 2016-07-10  4:30       ` Davin Pearson
       [not found]       ` <mailman.966.1468125047.26859.help-gnu-emacs@gnu.org>
       [not found]       ` <mailman.959.1468113265.26859.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 27+ messages in thread
From: Davin Pearson @ 2016-07-10  4:30 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-gnu-emacs@gnu.org, Yuri Khan

I am unfamiliar with MELPA and ELPA.

Would it be worth my time learning MELPA when I could just learn ELPA?

On 9 July 2016 at 22:50, Alex Kost <alezost@gmail.com> wrote:

> Davin Pearson (2016-07-09 04:25 +0300) wrote:
>
> > On 8 July 2016 at 21:34, Yuri Khan <yuri.v.khan@gmail.com> wrote:
> >
> >> On Fri, Jul 8, 2016 at 2:02 PM, Davin Pearson <davin.pearson@gmail.com>
> >> wrote:
> >>
> >> > I would like to submit my screen shot for consideration by the
> >> developers of GNU Emacs as a replacement for the default Emacs
> >> fontification.
> >> >
> >> > http://davin.50webs.com/emacs-screen-shot.png
> >>
> >> Consider contributing a custom theme instead.
> >>
> >
> > Thanks for the tip.  What about this theme?
>
> If you want to make your theme available for other people, you can make
> a package for it and contribute it to MELPA for example (there are a lot
> of themes there).
>
> --
> Alex
>



-- 
Sincerely and kindest regards, Davin.
Davin Pearson    http://davin.50webs.com


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

* Re: Suggested font lock preferences for GNU Emacs
       [not found]       ` <mailman.966.1468125047.26859.help-gnu-emacs@gnu.org>
@ 2016-07-10  5:19         ` Emanuel Berg
  2016-07-10 14:50           ` Stefan Monnier
       [not found]           ` <mailman.986.1468162252.26859.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-10  5:19 UTC (permalink / raw)
  To: help-gnu-emacs

Davin Pearson <davin.pearson@gmail.com> writes:

> I am unfamiliar with MELPA and ELPA.

You don't say...

> Would it be worth my time learning MELPA when
> I could just learn ELPA?

You can have both. Have a look:

    (package-initialize)

    (setq-default tabulated-list-use-header-line nil)

    (defun elpa ()
      (interactive)
      (package-list-packages) )

    (defvar package-archives)
    (setq package-archives
          '(( "elpa" . "http://elpa.gnu.org/packages/")
            ("melpa" . "http://melpa.milkbox.net/packages/") ))

The function name "elpa" should perhaps be
renamed "elpas"...

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: the dumb Emacs terminal
       [not found]                     ` <mailman.954.1468108922.26859.help-gnu-emacs@gnu.org>
@ 2016-07-10  5:29                       ` Emanuel Berg
  2016-07-10 22:46                       ` Emanuel Berg
  1 sibling, 0 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-10  5:29 UTC (permalink / raw)
  To: help-gnu-emacs

John Mastro <john.b.mastro@gmail.com> writes:

> I like the simplicity and that I can work
> in/with the *shell* buffer just like any
> "normal" buffer.

Yeah, no, I think with the line mode it is very
much a normal buffer. I think that in all
essence is it, rather than the
line/char distinction.

I put it (the switch to line mode) in the
`term-mode-hook', and the hook executes all
well, but I still have to change it manually -
perhaps the hook is run at a time when it
doesn't take, so the first (automatic)
invocation for this reason doesn't work.

> Many of the things I previously would have
> done in a terminal emulator that wouldn't
> have worked well in M-x shell I now do in
> various Emacs modes anyway. (Mail, some
> version control tasks, reading man
> pages, etc.)

Indeed, however I think the shell is the
exception to the rule it is better to do
everything in Emacs. The reason I want the
shell (a terminal) in Emacs is that sometimes
I want to use the output from a shell tool in
Emacs, or the other way around, run a shell
tool on some piece of data I have in an Emacs
buffer, and tho I can make the transition Emacs
to/from the shell with no loss, having it all
in Emacs start-to-finish just simplifies this
even more.

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: Suggested font lock preferences for GNU Emacs
       [not found]       ` <mailman.959.1468113265.26859.help-gnu-emacs@gnu.org>
@ 2016-07-10  5:33         ` Emanuel Berg
  0 siblings, 0 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-10  5:33 UTC (permalink / raw)
  To: help-gnu-emacs

Davin Pearson <davin.pearson@gmail.com> writes:

> When I run my package davins-theme.el it
> turns the fonts into ugly proportional fonts.
>
> This is *not* what I want my package to do.

If you prefer the precision of your everyday
Elisp, you can put all that in a file and add
`provide' last with all the comments uphill and
voila, that is a package to. "Theme" is just
a word and it doesn't even start with an e like
everything does...

(defun check-package-style ()
  (interactive)
  (checkdoc-current-buffer t) ; TAKE-NOTES
  (message "Style check done.") )

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-10  5:19         ` Emanuel Berg
@ 2016-07-10 14:50           ` Stefan Monnier
       [not found]           ` <mailman.986.1468162252.26859.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 27+ messages in thread
From: Stefan Monnier @ 2016-07-10 14:50 UTC (permalink / raw)
  To: help-gnu-emacs

>> I am unfamiliar with MELPA and ELPA.

This is not quite the right choice.  The choice is between MELPA and GNU
ELPA, both of which are subtypes of ELPA.

>> Would it be worth my time learning MELPA when
>> I could just learn ELPA?

Not sure what you mean by that.  If you mean "learn how to package my
code for (GNUD|M)ELPA", then my opinion is that it probably isn't since
GNU ELPA comes pre-configured in Emacs, so everyone has access to it
without any extra setup, whereas MELPA is only accessible to users after
they set their `package-archives` accordingly.

>           '(( "elpa" . "http://elpa.gnu.org/packages/")
                 ^^^^
                 gnu


        Stefan




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

* Re: Suggested font lock preferences for GNU Emacs
       [not found]           ` <mailman.986.1468162252.26859.help-gnu-emacs@gnu.org>
@ 2016-07-10 21:24             ` Emanuel Berg
  2016-07-10 21:29               ` Stefan Monnier
       [not found]               ` <mailman.1063.1468186213.26859.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-10 21:24 UTC (permalink / raw)
  To: help-gnu-emacs

Stefan Monnier <monnier@iro.umontreal.ca>
writes:

>> '(( "elpa" . "http://elpa.gnu.org/packages/")
> ^^^^ gnu

OK:

    (package-initialize)

    (setq-default tabulated-list-use-header-line nil)

    (defun elpas ()
      (interactive)
      (package-list-packages) )
    (defalias 'elpa 'elpas)

    (defvar package-archives)
    (setq package-archives
          '(( "gnu elpa" . "http://elpa.gnu.org/packages/")
            ( "melpa"    . "http://melpa.milkbox.net/packages/") ))

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: Suggested font lock preferences for GNU Emacs
  2016-07-10 21:24             ` Emanuel Berg
@ 2016-07-10 21:29               ` Stefan Monnier
       [not found]               ` <mailman.1063.1468186213.26859.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 27+ messages in thread
From: Stefan Monnier @ 2016-07-10 21:29 UTC (permalink / raw)
  To: help-gnu-emacs

>     (setq package-archives
>           '(( "gnu elpa" . "http://elpa.gnu.org/packages/")
>             ( "melpa"    . "http://melpa.milkbox.net/packages/") ))

Why not simply

      (add-to-list 'package-archives
                   '("melpa" . "http://melpa.milkbox.net/packages/"))


-- Stefan




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

* Re: Suggested font lock preferences for GNU Emacs
       [not found]               ` <mailman.1063.1468186213.26859.help-gnu-emacs@gnu.org>
@ 2016-07-10 21:46                 ` Emanuel Berg
  0 siblings, 0 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-10 21:46 UTC (permalink / raw)
  To: help-gnu-emacs

Stefan Monnier <monnier@iro.umontreal.ca>
writes:

> Why not simply
>
>       (add-to-list 'package-archives '("melpa"
> . "http://melpa.milkbox.net/packages/"))

Well, you can - it is not wrong.

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: the dumb Emacs terminal
       [not found]                     ` <mailman.954.1468108922.26859.help-gnu-emacs@gnu.org>
  2016-07-10  5:29                       ` Emanuel Berg
@ 2016-07-10 22:46                       ` Emanuel Berg
  1 sibling, 0 replies; 27+ messages in thread
From: Emanuel Berg @ 2016-07-10 22:46 UTC (permalink / raw)
  To: help-gnu-emacs

John Mastro <john.b.mastro@gmail.com> writes:

> in/with the *shell* buffer just like any
> "normal" buffer.

(define-key term-mode-map "\C-a"  #'term-send-home)

(defun terminator ()
  (interactive)
  (set-buffer (make-term "terminal" (getenv "SHELL")))
  (term-mode)
  (term-line-mode)
  (switch-to-buffer "*terminal*") )

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


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

* Re: the dumb Emacs terminal
  2016-07-09 22:02                 ` John Mastro
@ 2016-07-11 12:05                   ` Dmitry Alexandrov
  0 siblings, 0 replies; 27+ messages in thread
From: Dmitry Alexandrov @ 2016-07-11 12:05 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

John Mastro <john.b.mastro@gmail.com> writes:

> Emanuel Berg <embe8573@student.uu.se> wrote:
>> And does the Emacs terminal have to be dumb?
>
> M-x shell isn't really a terminal (emulator) at all, which is also why
> you can't run e.g. htop there.

Which does not mean that it does not support basic coloring though.  It
does, but hides that fact from any program.

--8<---------------cut here---------------start------------->8---
$ for i in {1..8} {30..37}; do
    printf '\e[%dmA\e[0m ' $i
done
echo
--8<---------------cut here---------------end--------------->8---

‘--color=always’ with GNU (Core|Find|...)utils and other utilities that
support it should also work.

Thus providing its own termcap file for comint-mode (and eshell-mode
also) instead of using ‘dumb’ indeed would be reasonable.

> If you try "tput setaf 2 && echo green" in either M-x term or M-x
> ansi-term, you'll see that it does work there.
>
> I nonetheless prefer M-x shell over Emacs's terminal emulators.



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

end of thread, other threads:[~2016-07-11 12:05 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-08  8:02 Suggested font lock preferences for GNU Emacs Davin Pearson
2016-07-08  9:34 ` Yuri Khan
2016-07-09  1:25   ` Davin Pearson
2016-07-09 10:50     ` Alex Kost
2016-07-10  1:14       ` Davin Pearson
2016-07-10  4:30       ` Davin Pearson
     [not found]       ` <mailman.966.1468125047.26859.help-gnu-emacs@gnu.org>
2016-07-10  5:19         ` Emanuel Berg
2016-07-10 14:50           ` Stefan Monnier
     [not found]           ` <mailman.986.1468162252.26859.help-gnu-emacs@gnu.org>
2016-07-10 21:24             ` Emanuel Berg
2016-07-10 21:29               ` Stefan Monnier
     [not found]               ` <mailman.1063.1468186213.26859.help-gnu-emacs@gnu.org>
2016-07-10 21:46                 ` Emanuel Berg
     [not found]       ` <mailman.959.1468113265.26859.help-gnu-emacs@gnu.org>
2016-07-10  5:33         ` Emanuel Berg
2016-07-08 12:01 ` Emanuel Berg
2016-07-08 12:20   ` Yuri Khan
     [not found]   ` <mailman.821.1467980455.26859.help-gnu-emacs@gnu.org>
2016-07-08 13:40     ` Emanuel Berg
2016-07-08 14:12       ` Yuri Khan
     [not found]       ` <mailman.831.1467987165.26859.help-gnu-emacs@gnu.org>
2016-07-08 18:19         ` Emanuel Berg
2016-07-08 21:41         ` rotating the palette (was: Re: Suggested font lock preferences for GNU Emacs) Emanuel Berg
2016-07-08 23:57           ` Emanuel Berg
2016-07-09  1:57             ` Emanuel Berg
2016-07-09 21:19               ` the dumb Emacs terminal (was: Re: rotating the palette) Emanuel Berg
2016-07-09 22:02                 ` John Mastro
2016-07-11 12:05                   ` the dumb Emacs terminal Dmitry Alexandrov
     [not found]                 ` <mailman.949.1468101798.26859.help-gnu-emacs@gnu.org>
2016-07-09 22:38                   ` Emanuel Berg
2016-07-10  0:01                     ` John Mastro
     [not found]                     ` <mailman.954.1468108922.26859.help-gnu-emacs@gnu.org>
2016-07-10  5:29                       ` Emanuel Berg
2016-07-10 22:46                       ` Emanuel Berg

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