Re: tex-symb
Masayuki Ataka <[email protected]> Tue, 08 Mar 2005 05:03:43 +0900 (JST)
| Newsgroups | gmane.emacs.auc-tex |
|---|---|
| Message-ID | <[email protected]> |
From: Ralf Angeli <[email protected]> Subject: Re: tex-symb Date: Sat, 05 Mar 2005 13:43:33 +0100 > * Masayuki Ataka (2005-03-05) writes: > > > tex-symb.el is written to override tex-fold.el, so only have to > > do is load tex-symb.el and do tex-folding in your buffer. > > Mathematical macros will be folded into symbols (with unicode > > font). > > There currently are very few defaults in tex-fold.el to avoid > compromising speed of folding and to allow a user to customize it to > her taste by adding new macros. We discussed before that this can be > inconvenient especially for users who have needs not covered by the > defaults. In order to suit most people we concluded to add something > like folding classes specifying certain types of material to be > folded, e.g. labels/references or math. Once we have these classes > and can allow the user to switch them on and off as well as add his > own macros to class-specific lists we can populate them with content. > I haven't had time to do something like this and don't know if I > will. So if you are interested in doing this, please go ahead. How about preparing the buffer local variable, which holds which features are folded. For example, in tex-symb.el, TeX-symb-ascii-arrow-list has the fuature that allows are displayed with ascii text, where allows are displayed with unicode font, by default. We can choose how to display allows with ascii or unicode. Similarly, we can divide TeX-fold-macro-spec-list by section, item, footnote, ref, and label. And add their variables into TeX-fold-macro-spec-list, if we want to fold them. > We might also consider to allow the specification of material other > than macros. I know that Talcum (<URL:http://talcum.sarovar.org/>) is > able to fold stuff like ~, "- etc. because it allows to specify I tried Talcum, which has just been released 0.5.0 on 5th March. Good tool. Maybe, what Talcum do is the goal of tex-symb. > regular expressions for the content to be folded. When I wrote > tex-fold.el I decided against this because I wanted the user interface > for customization to be as simple as possible. But maybe one could > add a new customization option which accomodates for this. > Unexperienced users could use it to specify simple strings and those > comfortable with regular expressions could add regexps. Yes. Talcum is too difficult to start up and to customize, although its customization is very flexible. > > ** Slow! However, tex-symb is faster than Talcum ;) > Anyway, a main problem currently is that fontification of overlays > covering folded content may be wrong. The problem is explained at the > start of tex-fold.el and in the respective manual section. So it > would e.g. be nice to have a way to hook onto a jit-lock function and > do folding once this function has fontified the relevant parts of the > file. If we can achieve something like this, speed of the folding > algorithm will not be much of an issue because only parts which are > actually shown in the buffer have to be folded at one time. I don't > know if it is easily possible, though. And it doesn't cover the case > where font locking is disabled or does not use jit-lock. I'm not familiar with font-lock code, so jit-lock is hard road for me, either. But it is attractive for me not to check the speed of the folding algorithm. At present, I will work for fixing bug in tex-symb. I will think font-lock, later.