all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: turning off all indentation
Date: Thu, 13 May 2010 10:31:37 +1000	[thread overview]
Message-ID: <87bpcky74m.fsf@rapttech.com.au> (raw)
In-Reply-To: a08c7e68-3949-41de-bdbf-5d4c81e377f9@d27g2000yqc.googlegroups.com

Lynn Newton <lynn.newton@gmail.com> writes:

>> I have a hard time imagining why you would run
>> indent-region if you definitely don't want Emacs to
>> indent the region.
>
> Me too. It was just an example. I've had all variations
> Emacsen behave obstreperously for no reason that I
> could detect, suddenly changing its characteristics and
> forgetting my preferences, right in the middle of
> editing when in some particular programming mode. (This
> happens a lot to me in cperl-mode.) In some cases I
> wind up having little recourse other than to kill the
> editing session and start a new one.
>
>> > (Note the 8-space tabs.)
>
>> It's not like you can't configure cc-mode to do
>> exactly that style of indentation.
>
> True enough, but that doesn't answer the original
> question about how to set that for every mode all the
> time. It's just what the person in whose behalf I'm
> asking wants. Certainly not my own preference, as I
> think that in most modes the defaults that are set are
> good, and probably should not be altered without good
> reason.

Doing it for all possible modes is probably an impossible task as there
is no way to identify all possible modes - if not an infinite set, it
certainly wold be a very large one. 

The best I suspect you can do is use hooks to ensure keys like enter and
tab are bound to their basic functions. This could be difficult as there
is no guarantee that a mode provides such a hook and there are some
modes that provide quite sophisticated behavior, such as behving
differently depending on how many time the key is pressed within a
certain interval etc. Re-binding such keys could easily result in the
loss of valuable functionality as well as indentation. 

There is no simple way this can be done. It is very much working against
what the modes are desinged for. In many cases, once you remove custom
indentation behavior, all you are left with is font locking. 

If the only thing your friend wants is font-locking, I would just derive
new modes from someting like fundamental mode, add font-lock keywords
and use that mode instead of the standard modes.  If they don't even
want font-locking, then just use fundamental mode for everythig and be
done with it. 

In the end, it feels very much like a grandmother who has purchased a
high performance v12 to only use it in the slow lane, You may
as well just use a simpler less featured editor that supports emacs key
bindings. and save some resources. 

As DK points out, the real solution is to put in the effort to customize
the modes your friend uses to behave the way he wants and then just
forget about it. Either stop fighting against the system or change
systems. The proposed approach will never be reliable, will probably
break after upgrades and will just be a constant source of frustration. 

Tim

-- 
tcross (at) rapttech dot com dot au


  parent reply	other threads:[~2010-05-13  0:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d337ac07-d622-400f-9520-ac22ce0e4f86@k29g2000yqh.googlegroups.com>
2010-05-12 16:44 ` turning off all indentation Andreas Politz
     [not found]   ` <81679436-5d3c-429c-bc39-7121f452d51b@d39g2000yqa.googlegroups.com>
2010-05-12 19:11     ` Alan Mackenzie
2010-05-12 19:15     ` Lowell Gilbert
2010-05-12 19:59     ` Andreas Politz
     [not found] ` <87pr1145gl.fsf@lola.goethe.zz>
     [not found]   ` <a08c7e68-3949-41de-bdbf-5d4c81e377f9@d27g2000yqc.googlegroups.com>
2010-05-13  0:31     ` Tim X [this message]
2010-05-13 14:53       ` Scott Frazer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bpcky74m.fsf@rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.