OT: Simple (short) HOWTO or tutorial on folding/outlining in XEMACS

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

OT: Simple (short) HOWTO or tutorial on folding/outlining in XEMACS

rhkramer
I know this is OT, but since I belong to this list, I thought I'd start
by asking here.

Dumb as this sounds, I should point out that, so far, I don't like
(X)EMACS for various reasons--the terminology, display, and actions are
far outside my background/experience.  For 7+ years, my favorite editor
in Linux has been nedit, but its lack of folding capability is very
frustrating, so I'd like to make one more try at (folding in) (X)EMACS.

Initially, I'd just like to see how it works--that means, load some file
(maybe a .c file) for which outline mode automatically recognizes
sections to fold, and thus I can play briefly with the fold / unfold
interface.  (Do I get icons to click on in a left hand gutter margin?)

Presuming I'm reasonably happy with that, then I'd need to customize the
folding for my own files which use a variation of TWiki markup and
should fold based on that markup.  At the simplest level, that markup
looks like:

---+ Level 1 Heading
...
---++++++ Level 6 Heading

But I'd also like to fold on other things, like bulleted or numbered
lists:

<multiples of 3 spaces>* bullet list at different levels
<multiples of 3 spaces>n numbered list at different levels
e.g.,
   * is a bulleted list item in a top level list
      * is a bulleted list item in a lower level list
         3 is a numbered list item in a still lower level list
...

Tables, whose markup is prefixed by a "\n|"

I'm sure I will desire others in the future.

And finally (for now) my file format has multiple "records" per file,
where the general file format is like an mbox file and each record
(corresponding to an email) is prefixed by several lines of (mbox/mail)
headers as the record separator--I also want to fold at the record
level.

So, to customize at this level, must I write Lisp code, or do I do
something like define something like a syntax highlighting "definition"
file?

Thanks for any help, including pointers to (a) more appropriate list(s)!

Randy Kramer
--
I didn't have time to write a short letter, so I created a video
instead.--with apologies to Cicero, et.al.

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: OT: Simple (short) HOWTO or tutorial on folding/outlining in XEMACS

mhoenicka
Quoting Randy Kramer <[hidden email]>:

> So, to customize at this level, must I write Lisp code, or do I do
> something like define something like a syntax highlighting "definition"
> file?
>

It's not "either Lisp, or definition file". Every customization in  
Emacs is implemented in Lisp. This is what makes Emacs customization  
daunting at first, and fairly simple and consistent when you get used  
to it. No matter what you try to do, there is just one syntax  
involved. Also, as just about everything in Emacs is implemented in  
Lisp as well, there's a lot of code to steal from. You may get pretty  
far by deriving (or copying) a new mode from outline-mode (outline.el  
in the lisp dir of your Emacs installation).

HTH
Markus

--
Markus Hoenicka
[hidden email]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de


_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: OT: Simple (short) HOWTO or tutorial on folding/outlining in XEMACS

rhkramer
On Tuesday 16 December 2008 09:14 am, Markus Hoenicka wrote:
> You may get pretty  
> far by deriving (or copying) a new mode from outline-mode (outline.el  
> in the lisp dir of your Emacs installation).

Thanks! I'll take a (superficial, no doubt) look at that code shortly
after sending this email.

Just for the record though, I'm still looking for some simple
introduction to using outline mode (as a user) in XEMACS.

Oh, one further question for anybody using outline mode--has anybody
used it on (what I consider to be) fairly large files--some of my files
are around 10 MB with on the order of 5000 records (i.e., emails)--will
I experience performance problems with files of that size?

Randy Kramer
--
I didn't have time to write a short letter, so I created a video
instead.--with apologies to Cicero, et.al.

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: OT: Simple (short) HOWT O or tutorial on folding/outlining in XEMACS

Chris McMahan-3
Not to start a flame war or anything, but why Xemacs and not Emacs?

Also, I sounds as if outline mode, out of the box, will fill your
needs. You can get some documentation on how it works here:

- http://www.emacswiki.org/cgi-bin/wiki/OutlineMode
- http://jamesthornton.com/emacs/node/emacs_246.html

- Chris



Randy Kramer writes:

>On Tuesday 16 December 2008 09:14 am, Markus Hoenicka wrote:
>> You may get pretty  
>> far by deriving (or copying) a new mode from outline-mode (outline.el  
>> in the lisp dir of your Emacs installation).
>
>Thanks! I'll take a (superficial, no doubt) look at that code shortly
>after sending this email.
>
>Just for the record though, I'm still looking for some simple
>introduction to using outline mode (as a user) in XEMACS.
>
>Oh, one further question for anybody using outline mode--has anybody
>used it on (what I consider to be) fairly large files--some of my files
>are around 10 MB with on the order of 5000 records (i.e., emails)--will
>I experience performance problems with files of that size?
>
>Randy Kramer
>--
>I didn't have time to write a short letter, so I created a video
>instead.--with apologies to Cicero, et.al.
>
>_______________________________________________
>Planner-el-discuss mailing list
>[hidden email]
>https://mail.gna.org/listinfo/planner-el-discuss

--
================================
Chris McMahan | [hidden email]
================================

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: OT: Simple (short) HOWTO or tutorial on folding/outlining in XEMACS

Phillip Lord-2
In reply to this post by rhkramer
Randy Kramer <[hidden email]> writes:

> On Tuesday 16 December 2008 09:14 am, Markus Hoenicka wrote:
>> You may get pretty  
>> far by deriving (or copying) a new mode from outline-mode (outline.el  
>> in the lisp dir of your Emacs installation).
>
> Thanks! I'll take a (superficial, no doubt) look at that code shortly
> after sending this email.
>
> Just for the record though, I'm still looking for some simple
> introduction to using outline mode (as a user) in XEMACS.
>
> Oh, one further question for anybody using outline mode--has anybody
> used it on (what I consider to be) fairly large files--some of my files
> are around 10 MB with on the order of 5000 records (i.e., emails)--will
> I experience performance problems with files of that size?



Just out of interest, do you really want outline, or a code browser,
which also enables you to move around source files quickly (for code,
this is effectively an outline in another window).

You might want to take a look at ECB which does this. I used to use
folding and outlining, but stopped because ultimately I was after rapid
navigation, and ECB does this without folding.

Phil

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: OT: Simple (short) HOWT O or tutorial on folding/outlining in XEMACS

rhkramer
In reply to this post by Chris McMahan-3
On Tuesday 16 December 2008 10:08 am, Chris McMahan wrote:
> Also, I sounds as if outline mode, out of the box, will fill your
> needs. You can get some documentation on how it works here:
>
> - http://www.emacswiki.org/cgi-bin/wiki/OutlineMode
> - http://jamesthornton.com/emacs/node/emacs_246.html

Chris,

Thanks!

> Not to start a flame war or anything, but why Xemacs and not Emacs?

Not to start a flame war, maybe I shouldn't respond ;-)

But it is fairly simple for me:

   * on my particular system (Mandriva2006) when I went to install
XEMACS, it disabled EMACS (iiuc, because of some dependency
conflicts)--I rarely have success installing software other than by the
distro's package system, so I typically don't try.

   * I wanted to try XEMACS (again), because, imho, some things about it
are less ugly (i.e., it is a little closer to a typical "Windows"
editor / application) than EMACS.  Clearly, I expect few, if any, on an
(X)EMACS list to agree or sympathize with my viewpoint--that's just
what I (mostly) "grew up" with.

Thanks again!

Randy Kramer
--
I didn't have time to write a short letter, so I created a video
instead.--with apologies to Cicero, et.al.

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss
Reply | Threaded
Open this post in threaded view
|

Re: OT: Simple (short) HOWTO or tutorial on folding/outlining in XEMACS

rhkramer
In reply to this post by Phillip Lord-2
On Tuesday 16 December 2008 10:11 am, Phillip Lord wrote:
> Randy Kramer <[hidden email]> writes:
> > Oh, one further question for anybody using outline mode--has anybody
> > used it on (what I consider to be) fairly large files--some of my
files
> > are around 10 MB with on the order of 5000 records (i.e.,
emails)--will
> > I experience performance problems with files of that size?
> Just out of interest, do you really want outline, or a code browser,
> which also enables you to move around source files quickly (for code,
> this is effectively an outline in another window).

Thanks for the interest! ;-)

> You might want to take a look at ECB which does this. I used to use
> folding and outlining, but stopped because ultimately I was after
rapid
> navigation, and ECB does this without folding.

To try to answer your question:
   * I'll try to take a look at ECB--is it an EMACS mode also?
   * without having looked at ECB yet, I'm not sure how to answer your
question--I probably want both--some "data points":

I use recoll to index and then do quick searches (and then, currently
nail) to get to a specific record.  So rapid navigation is part of what
I want (defining rapid navigation as something like this).

Then, within records, I like to view the content as a totally collapsed
(folded) outline, opening up specific parts as I explore (or edit)
portions of the record which seem appropriate.

I guess I'll have to look at ECB to see if it is useful for me.

Randy Kramer
--
I didn't have time to write a short letter, so I created a video
instead.--with apologies to Cicero, et.al.

_______________________________________________
Planner-el-discuss mailing list
[hidden email]
https://mail.gna.org/listinfo/planner-el-discuss