🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3982

Re: is it really worth the time to go from vi to emacs?

#3982
From: Paul D. Smith
Date: Sat, 29 Jun 1996 00:00
56 lines
3401 bytes
%% brucet@leviathan.engr.sgi.com (Bruce A. Templeton) writes:

  >>> Fontifying is sometimes to slow...
  >> Use on-demand and stealthy fontification then (lazy-lock.el). 

  bat> It seems you have to choose between slow startup or slow(er)
  bat> scrolling.  Is there any way to combine the fontification
  bat> methods.  Ideally it would startup using on-demand fontification,
  bat> then fontify the rest of the buffer during idle time,

But... that's exactly what lazy-lock does...

  bat> and store it in the font info in the font-lock-chache file (also
  bat> during idle time ideally).

AFAIK you can't use both lazy-lock and fast-lock (caches font-lock info
in a file) at the same time.

  bat> Alternatively, is there a way to specify font-lock for files < x lines
  bat> and lazy-lock for larger files?

Sure:

 (defvar lazy-lock-minimum-size (* 25 1024)
   "*Minimum size of a buffer for demand-driven fontification.
 On-demand fontification occurs if the buffer size is greater than this value.
 If nil, means demand-driven fontification is never performed.
 If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
 where MAJOR-MODE is a symbol or t (meaning the default).  For example:
  ((c-mode . 25600) (c++-mode . 25600) (rmail-mode . 1048576))
 means that the minimum size is 25K for buffers in C or C++ modes, one megabyte
 for buffers in Rmail mode, and size is irrelevant otherwise.

 The value of this variable is used when Lazy Lock mode is turned on.")

  bat> Then you must not read news with emacs, that's what really grinds it to
  bat> a halt for me.

Odd, I have no problems whatsoever reading news with GNUS 5.x and
font-lock.  And I have the most aggressive angry fruit salad
fontification turned on, with full attribution fontification, etc.

Sure, articles over, say 500 lines take a few seconds, but anything less
than 250 or so is unnoticable.

Perhaps you should examine your setup more closely to be sure you're not
causing the slowdown inadvertently.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@baynetworks.com>         Network Management Development
 Senior Software Engineer                                   Bay Networks, Inc.
-----------------------------------------------==<http://www.baynetworks.com/>-
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
     These are my opinions--Bay Networks takes no responsibility for them.
Technical Details
Message-ID: <p53f3e6j9y.fsf@baynetworks.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <4qf5lo$lhk@knot.queensu.ca> <4quo35$8qv@murrow.corp.sgi.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102b9a,51d854ca9043b00f
X-Google-Attributes: gid102b9a,public
X-Google-Thread: 107393,51d854ca9043b00f
X-Google-Attributes: gid107393,public
X-Google-Thread: 103b8b,51d854ca9043b00f
X-Google-Attributes: gid103b8b,public
From: psmith@baynetworks.com (Paul D. Smith)
Subject: Re: is it really worth the time to go from vi to emacs?
Date: 1996/06/29
Message-ID: <p53f3e6j9y.fsf@baynetworks.com>
X-Deja-AN: 162875929
distribution: inet
sender: psmith@lemming
references: <4qf5lo$lhk@knot.queensu.ca> <4quo35$8qv@murrow.corp.sgi.com>
to: brucet@leviathan.engr.sgi.com (Bruce A. Templeton)
organization: Bay Networks, Inc.
reply-to: psmith@wellfleet.com
newsgroups: comp.editors,comp.emacs,gnu.emacs.help