help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple editor required


From: Paul Edwards
Subject: Re: simple editor required
Date: Sat, 07 Jun 2003 12:35:18 GMT

"lawrence mitchell" <wence@gmx.li> wrote in message 
news:?fnord?87k7by3zjj.fsf@ID-97657.usr.dfncis.de...
> > I don't know that that is true.  An editor that doesn't allow
> > you to stay at a particular level is not an editor, it is not
> > suitable for programming in any language.
> > Alignment of text under text is very very basic.  I don't mind
> > if the behaviour changes when I break the pattern, but I do
> > mind if the behaviour changes line by line.  No programmer has
> > to hit space/tab 20 times at the beginning of every line in
> > order to line up code.
>
> I still don't quite understand this.  When I use Emacs, in, say,
> C Mode, typing normally lines things up.  Pressing return adds a
> newline and indents the current line, and the only thing that
> changes indentation is if I forget a close ";", or add an open
> or close brace ("{" or "}").  But perhaps I misunderstand your
> needs.

Yeah, but I don't require it to be that sophisticated, I just need
it to do indentation even of text.  No matter what file I am
editting, I expect

aaaa
  bbb
  ccc

the "ccc" to automatically start under the first "b".  All programming
editors are able to do this, its a very basic thing.  I'll worry about
fancy stuff at a later date.

I'm sure emacs can do it, I was just saying that it is a basic
function in any editor.

> [...] Summary of wants.
>
> > 1. text to be lined up, line by line, suitable for any programming
> > language, no matter what file extension I am using.  IIRC, all I needed
> > to do on old emacs versions was inhibit the site file, either via a
> > command-line option or .emacs file, can't remember, either is
> > acceptable, and the junk wouldn't get loaded.
>
> > 2. Block-marking not to be destroyed by ctrl-f and esc-g.  Xemacs
> > 20.4 has a you-beaut highlighting of the block, which is great, but
> > I'd trade it any day for the ability to do a find/goto to position to
> > end of block.  Like emacs 20.7.1.  And like the last time I used a
> > version of xemacs, IIRC.  I don't know why some people think it
> > is appropriate to forget the marker, seems pretty basic to me, but
> > besides, other emacs (like 20.7.1) don't forget the marker.
>
> So, you don't want transient-mark-mode?  I don't believe that it
> is turned on by default.  Certainly, without any kind of
> customisations (emacs -q --no-site-file), when setting the mark,
> and then moving away, the mark is not lost.  However, in this
> mode, you cannot see what part of the text is marked.

Ok, I'd better retest and answer this again, I'll stick to one thing
at a time.  See if I can get each feature working consistently
between versions, one at a time.  :-)

> > 3. DEL to delete.  Just like xemacs 20.4 with appropriate .emacs
> > entry.
>
> If I understand your needs correctly, this .emacs is probably
> close to what you want:
>
> ;; turn off all major-mode associations
> (setq auto-mode-alist nil)
> (setq interpreter-mode-alist nil)

Sounds great.

> ;; Make return indent to the current level
> (global-set-key (kbd "RET") #'newline-and-indent)

I believe that in fundamental mode, that doesn't work, but
let me try again.

> ;; Make tab insert a tab, always
> ;; If you want tabs to be converted into spaces, you
> ;; will need to untabify files on saving.  But many people don't
> ;; like this.
> (global-set-key (kbd "TAB") #'self-insert-command)

Actually I want spaces inserted, not tabs, but didn't mention that
because that feature is already working.

> ;; Make the DEL key work the same as C-d (and not like backspace)
> (global-set-key (kbd "<delete>") #'delete-char)

Yeah, I believe this doesn't work on emacs 20.7.1, but let me retest.

> > Someone has suggested putting:
> > (setq kill-whole-line nil)
>
> > to get around this problem.  I didn't have to do that in other
> > versions of emacs, it was the basic standard consistent
> > behaviour.
>
> kill-whole-line is nil by default, and has been since it was
> first introduced in Emacs in 1993.

That's what I thought.

> So, if it isn't for you, the
> site file must be changing it.
> The command line option to inhibit site-file loading is
> "--no-site-file".

Ok, I'll retest.  I only noticed it when I went into text mode in
xemacs.

> > I consider these to be extremely basic things that should be provided
> > out-of-the-box with all emacs versions without having to create an
> > enormous .emacs file, tailored for every version of emacs, to suppress
> > every quirk that emacs introduces *by default* in every incarnation.
> > I am shocked that the basics don't remain consistent.
>
> Is there any particular need that you need a new Emacs version.

No, I just need to use whatever the company has installed.  Every
place I've been to always has *a* version of Emacs installed.

> If, like you say, Emacs 20.7 works fine for you, and you have no

It doesn't work fine.  DEL doesn't work.

> need of the new features in Emacs 21, why not stick with Emacs

I don't have 21 available.

> 20?  Or, use micro-emacs everywhere, after all, it's not an
> overly large install.

I can't tell the company what to install.  I'm grateful that I have
an alternative to vi.  I'm not grateful that emacs (seems to)
change fundamental behaviour between releases.

Anyway, let me retest these things one at a time, before I end
up chasing my own tail around.  :-)

Thanks.  Paul.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]