all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Electric Buffer mode too boring
@ 2008-04-24 19:49 Dan Espen
  2008-04-24 22:35 ` Drew Adams
       [not found] ` <mailman.10791.1209076628.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Dan Espen @ 2008-04-24 19:49 UTC (permalink / raw)
  To: help-gnu-emacs


Hi,

I've been using this with XEmacs for years:

(defconst Electric-buffer-menu-mode-font-lock-keywords
  (purecopy
   (list
    '("^ MR Buffer.*"                 . font-lock-preprocessor-face) ;hdr 1
       '("^ -- ------.*"              . font-lock-preprocessor-face) ;hdr 2
       '("^\\(....Man: .*\\)" 1 font-lock-variable-name-face t) ;Manpg (new)
       '("^[. ][*][^%].[^*].*"        . font-lock-comment-face)	;Mod x temp
       '("^....[*]Buffer List[*].*"   . font-lock-doc-string-face) ;Buffer list
       '("^\\(....[*]shell.*\\)"      1 font-lock-reference-face t) ;shell buff
       '("^....[*].*"                 . font-lock-string-face) ;Temp buffer
       '("^....[+].*"                 . font-lock-keyword-face) ;Mail buffer
       '("^....[A-Za-z0-9/]*[-][+].*" . font-lock-keyword-face) ;Mail buffer
       '(".*Dired.*"                  . font-lock-function-name-face)
       )))

; This hook run after buffer formatted, so it is necessary to re-fontify it..;
(add-hook 'electric-buffer-menu-mode-hook
	  '(lambda ()
	     (font-lock-mode 1)
	     (font-lock-fontify-buffer)))


I've never been able to figure out why it doesn't work with gnu emacs.
Help!


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

* RE: Electric Buffer mode too boring
  2008-04-24 19:49 Electric Buffer mode too boring Dan Espen
@ 2008-04-24 22:35 ` Drew Adams
       [not found] ` <mailman.10791.1209076628.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Drew Adams @ 2008-04-24 22:35 UTC (permalink / raw)
  To: 'Dan Espen', help-gnu-emacs

> I've been using this with XEmacs for years:
> 
> (defconst Electric-buffer-menu-mode-font-lock-keywords
>   (purecopy
>    (list
>     '("^ MR Buffer.*"                 . 
> font-lock-preprocessor-face) ;hdr 1
>        '("^ -- ------.*"              . 
> font-lock-preprocessor-face) ;hdr 2
>        '("^\\(....Man: .*\\)" 1 font-lock-variable-name-face 
> t) ;Manpg (new)
>        '("^[. ][*][^%].[^*].*"        . 
> font-lock-comment-face)	;Mod x temp
>        '("^....[*]Buffer List[*].*"   . 
> font-lock-doc-string-face) ;Buffer list
>        '("^\\(....[*]shell.*\\)"      1 
> font-lock-reference-face t) ;shell buff
>        '("^....[*].*"                 . 
> font-lock-string-face) ;Temp buffer
>        '("^....[+].*"                 . 
> font-lock-keyword-face) ;Mail buffer
>        '("^....[A-Za-z0-9/]*[-][+].*" . 
> font-lock-keyword-face) ;Mail buffer
>        '(".*Dired.*"                  . font-lock-function-name-face)
>        )))
> 
> ; This hook run after buffer formatted, so it is necessary to 
> re-fontify it..;
> (add-hook 'electric-buffer-menu-mode-hook
> 	  '(lambda ()
> 	     (font-lock-mode 1)
> 	     (font-lock-fontify-buffer)))
> 
> I've never been able to figure out why it doesn't work with gnu emacs.
> Help!

You might be interested in buff-menu+.el:
http://www.emacswiki.org/cgi-bin/wiki/BufferMenu#BufferMenuPlus

 





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

* Re: Electric Buffer mode too boring
       [not found] ` <mailman.10791.1209076628.18990.help-gnu-emacs@gnu.org>
@ 2008-04-24 23:12   ` Dan Espen
  2008-04-24 23:58     ` Drew Adams
       [not found]     ` <mailman.10793.1209081505.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Dan Espen @ 2008-04-24 23:12 UTC (permalink / raw)
  To: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

>> I've been using this with XEmacs for years:
>> 
>> (defconst Electric-buffer-menu-mode-font-lock-keywords
>> 
>> I've never been able to figure out why it doesn't work with gnu emacs.
>> Help!
>
> You might be interested in buff-menu+.el:

It's not bad.
It wouldn't load in XEmacs.

My fingers are really trained to Electric Buffer List.
I suppose I could try to change the bindings.

Hmm...


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

* RE: Electric Buffer mode too boring
  2008-04-24 23:12   ` Dan Espen
@ 2008-04-24 23:58     ` Drew Adams
       [not found]     ` <mailman.10793.1209081505.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Drew Adams @ 2008-04-24 23:58 UTC (permalink / raw)
  To: 'Dan Espen', help-gnu-emacs

> >> I've been using this with XEmacs for years:
> >> 
> >> (defconst Electric-buffer-menu-mode-font-lock-keywords
> >> 
> >> I've never been able to figure out why it doesn't work 
> with gnu emacs.
> >> Help!
> >
> > You might be interested in buff-menu+.el:
> 
> It's not bad.
> It wouldn't load in XEmacs.

You said you were trying to make Electric-* work in GNU Emacs.

> My fingers are really trained to Electric Buffer List.
> I suppose I could try to change the bindings.
> Hmm...





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

* Re: Electric Buffer mode too boring
       [not found]     ` <mailman.10793.1209081505.18990.help-gnu-emacs@gnu.org>
@ 2008-04-25  1:22       ` Dan Espen
  2008-04-25  1:25       ` Dan Espen
  1 sibling, 0 replies; 14+ messages in thread
From: Dan Espen @ 2008-04-25  1:22 UTC (permalink / raw)
  To: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

>> >> I've been using this with XEmacs for years:
>> >> 
>> >> (defconst Electric-buffer-menu-mode-font-lock-keywords
>> >> 
>> >> I've never been able to figure out why it doesn't work 
>> with gnu emacs.
>> >> Help!
>> >
>> > You might be interested in buff-menu+.el:
>> 
>> It's not bad.
>> It wouldn't load in XEmacs.
>
> You said you were trying to make Electric-* work in GNU Emacs.

Yes, I also said I've been using Electric Buffer list in XEmacs
for years.

It would help me transition if I could get something
working with both editors.

It looks to me like the XEmacs project is slowing down and
I'm considering moving back to gnu emacs but I want to get
all the things I'm used to working in gnu emacs.
Little differences don't bother me but the lack of color
in buffer switching isn't little (for me).


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

* Re: Electric Buffer mode too boring
       [not found]     ` <mailman.10793.1209081505.18990.help-gnu-emacs@gnu.org>
  2008-04-25  1:22       ` Dan Espen
@ 2008-04-25  1:25       ` Dan Espen
  2008-04-25  3:59         ` Kevin Rodgers
       [not found]         ` <mailman.10796.1209096000.18990.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 14+ messages in thread
From: Dan Espen @ 2008-04-25  1:25 UTC (permalink / raw)
  To: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

>> >> I've been using this with XEmacs for years:
>> >> 
>> >> (defconst Electric-buffer-menu-mode-font-lock-keywords
>> >> 
>> >> I've never been able to figure out why it doesn't work 
>> with gnu emacs.
>> >> Help!
>> >
>> > You might be interested in buff-menu+.el:
>> 
>> It's not bad.
>> It wouldn't load in XEmacs.
>
> You said you were trying to make Electric-* work in GNU Emacs.
>
>> My fingers are really trained to Electric Buffer List.
>> I suppose I could try to change the bindings.
>> Hmm...

Maybe I'm missing something basic.
Doesn't font lock always automatically look for font lock
keywords with the same name as the mode with the 'font-lock-keywords'
suffix?

It seems to with XEmacs.


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

* Re: Electric Buffer mode too boring
  2008-04-25  1:25       ` Dan Espen
@ 2008-04-25  3:59         ` Kevin Rodgers
       [not found]         ` <mailman.10796.1209096000.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Kevin Rodgers @ 2008-04-25  3:59 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Espen wrote:
> "Drew Adams" <drew.adams@oracle.com> writes:
> 
>>>>> I've been using this with XEmacs for years:
>>>>>
>>>>> (defconst Electric-buffer-menu-mode-font-lock-keywords
>>>>>
>>>>> I've never been able to figure out why it doesn't work 
>>> with gnu emacs.
>>>>> Help!
...
> Maybe I'm missing something basic.
> Doesn't font lock always automatically look for font lock
> keywords with the same name as the mode with the 'font-lock-keywords'
> suffix?
> 
> It seems to with XEmacs.

I think major modes follow the convention of defining a global variable
with such a name, but also make sure to set the buffer-local variable
font-lock-keywords to reference it.

-- 
Kevin Rodgers
Denver, Colorado, USA





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

* Re: Electric Buffer mode too boring
       [not found]         ` <mailman.10796.1209096000.18990.help-gnu-emacs@gnu.org>
@ 2008-04-25 12:15           ` Dan Espen
  2008-04-25 14:55             ` Lennart Borgman (gmail)
       [not found]             ` <mailman.10809.1209135366.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Dan Espen @ 2008-04-25 12:15 UTC (permalink / raw)
  To: help-gnu-emacs

Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:

> Dan Espen wrote:
>> "Drew Adams" <drew.adams@oracle.com> writes:
>>
>>>>>> I've been using this with XEmacs for years:
>>>>>>
>>>>>> (defconst Electric-buffer-menu-mode-font-lock-keywords
>>>>>>
>>>>>> I've never been able to figure out why it doesn't work
>>>> with gnu emacs.
>>>>>> Help!
> ...
>> Maybe I'm missing something basic.
>> Doesn't font lock always automatically look for font lock
>> keywords with the same name as the mode with the 'font-lock-keywords'
>> suffix?
>> It seems to with XEmacs.
>
> I think major modes follow the convention of defining a global variable
> with such a name, but also make sure to set the buffer-local variable
> font-lock-keywords to reference it.

Well, I did:

(add-hook 'electric-buffer-menu-mode-hook
	  '(lambda ()
	     (font-lock-mode 1)
	     (setq font-lock-keywords Electric-buffer-menu-mode-font-lock-keywords)
	     (font-lock-fontify-buffer)))

In XEmacs, I hit ^h^v to see a variables value.
Just figured out I need M-x describe-variable.
(A difference I can adapt to.)

So now I can see I have font-lock-mode on and
font-lock-keywords set as desired but no decoration.

Then I noticed that if I type in a line, for example "S" for (save)
the line changes color but not to the color I want.

I think the emacs version of electric buffer list is doing it's own
thing to the highlighting.

Not happy.


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

* Re: Electric Buffer mode too boring
  2008-04-25 12:15           ` Dan Espen
@ 2008-04-25 14:55             ` Lennart Borgman (gmail)
       [not found]             ` <mailman.10809.1209135366.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Lennart Borgman (gmail) @ 2008-04-25 14:55 UTC (permalink / raw)
  Cc: help-gnu-emacs

Dan Espen wrote:
> In XEmacs, I hit ^h^v to see a variables value.
> Just figured out I need M-x describe-variable.
> (A difference I can adapt to.)

It seems like you have "adapted to" it ;-)

The default in GNU Emacs is that C-h C-v is bound to describe-variable.




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

* Re: Electric Buffer mode too boring
       [not found]             ` <mailman.10809.1209135366.18990.help-gnu-emacs@gnu.org>
@ 2008-04-25 15:16               ` Dan Espen
  2008-04-25 15:55                 ` Lennart Borgman (gmail)
  2008-04-25 15:20               ` Sven Joachim
  1 sibling, 1 reply; 14+ messages in thread
From: Dan Espen @ 2008-04-25 15:16 UTC (permalink / raw)
  To: help-gnu-emacs

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Dan Espen wrote:
>> In XEmacs, I hit ^h^v to see a variables value.
>> Just figured out I need M-x describe-variable.
>> (A difference I can adapt to.)
>
> It seems like you have "adapted to" it ;-)
>
> The default in GNU Emacs is that C-h C-v is bound to describe-variable.

Really, then what the hell am I running?

emacs -q

^h k ^h ^v

gives me C-h C-v is undefined.

GNU Emacs 21.4.1.

Sorry, but you know how beginners are.  :)


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

* Re: Electric Buffer mode too boring
       [not found]             ` <mailman.10809.1209135366.18990.help-gnu-emacs@gnu.org>
  2008-04-25 15:16               ` Dan Espen
@ 2008-04-25 15:20               ` Sven Joachim
  2008-04-25 15:38                 ` Dan Espen
  2008-04-25 15:53                 ` Lennart Borgman (gmail)
  1 sibling, 2 replies; 14+ messages in thread
From: Sven Joachim @ 2008-04-25 15:20 UTC (permalink / raw)
  To: help-gnu-emacs

On 2008-04-25 16:55 +0200, Lennart Borgman (gmail) wrote:

> The default in GNU Emacs is that C-h C-v is bound to describe-variable.

Actually, it's C-h v, while C-h C-v is not bound by default.

Sven


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

* Re: Electric Buffer mode too boring
  2008-04-25 15:20               ` Sven Joachim
@ 2008-04-25 15:38                 ` Dan Espen
  2008-04-25 15:53                 ` Lennart Borgman (gmail)
  1 sibling, 0 replies; 14+ messages in thread
From: Dan Espen @ 2008-04-25 15:38 UTC (permalink / raw)
  To: help-gnu-emacs

Sven Joachim <svenjoac@gmx.de> writes:

> On 2008-04-25 16:55 +0200, Lennart Borgman (gmail) wrote:
>
>> The default in GNU Emacs is that C-h C-v is bound to describe-variable.
>
> Actually, it's C-h v, while C-h C-v is not bound by default.

Yep, beginner confused.
Expected it to work in Electric Buffer Mode but it doesn't.
In either emacs.


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

* Re: Electric Buffer mode too boring
  2008-04-25 15:20               ` Sven Joachim
  2008-04-25 15:38                 ` Dan Espen
@ 2008-04-25 15:53                 ` Lennart Borgman (gmail)
  1 sibling, 0 replies; 14+ messages in thread
From: Lennart Borgman (gmail) @ 2008-04-25 15:53 UTC (permalink / raw)
  To: Sven Joachim; +Cc: help-gnu-emacs

Sven Joachim wrote:
> On 2008-04-25 16:55 +0200, Lennart Borgman (gmail) wrote:
> 
>> The default in GNU Emacs is that C-h C-v is bound to describe-variable.
> 
> Actually, it's C-h v, while C-h C-v is not bound by default.
> 
> Sven

Eh, yes. Thanks Sven.




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

* Re: Electric Buffer mode too boring
  2008-04-25 15:16               ` Dan Espen
@ 2008-04-25 15:55                 ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 14+ messages in thread
From: Lennart Borgman (gmail) @ 2008-04-25 15:55 UTC (permalink / raw)
  Cc: help-gnu-emacs

Dan Espen wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>> Dan Espen wrote:
>>> In XEmacs, I hit ^h^v to see a variables value.
>>> Just figured out I need M-x describe-variable.
>>> (A difference I can adapt to.)
>> It seems like you have "adapted to" it ;-)
>>
>> The default in GNU Emacs is that C-h C-v is bound to describe-variable.
> 
> Really, then what the hell am I running?
> 
> emacs -q
> 
> ^h k ^h ^v
> 
> gives me C-h C-v is undefined.
> 
> GNU Emacs 21.4.1.
> 
> Sorry, but you know how beginners are.  :)

Sometimes it does not help to know how things are ;-)

It is C-h v that is bound to describe-variable as Sven pointed out.




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

end of thread, other threads:[~2008-04-25 15:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-24 19:49 Electric Buffer mode too boring Dan Espen
2008-04-24 22:35 ` Drew Adams
     [not found] ` <mailman.10791.1209076628.18990.help-gnu-emacs@gnu.org>
2008-04-24 23:12   ` Dan Espen
2008-04-24 23:58     ` Drew Adams
     [not found]     ` <mailman.10793.1209081505.18990.help-gnu-emacs@gnu.org>
2008-04-25  1:22       ` Dan Espen
2008-04-25  1:25       ` Dan Espen
2008-04-25  3:59         ` Kevin Rodgers
     [not found]         ` <mailman.10796.1209096000.18990.help-gnu-emacs@gnu.org>
2008-04-25 12:15           ` Dan Espen
2008-04-25 14:55             ` Lennart Borgman (gmail)
     [not found]             ` <mailman.10809.1209135366.18990.help-gnu-emacs@gnu.org>
2008-04-25 15:16               ` Dan Espen
2008-04-25 15:55                 ` Lennart Borgman (gmail)
2008-04-25 15:20               ` Sven Joachim
2008-04-25 15:38                 ` Dan Espen
2008-04-25 15:53                 ` Lennart Borgman (gmail)

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.