all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* auto-indent
@ 2002-11-16  2:51 Michael P. Soulier
  2002-11-16 18:57 ` auto-indent Kai Großjohann
  2002-11-18 17:44 ` auto-indent Michael P. Soulier
  0 siblings, 2 replies; 11+ messages in thread
From: Michael P. Soulier @ 2002-11-16  2:51 UTC (permalink / raw)


    Hey people. How would I modify auto-fill mode so that it works the same
way as auto-indent in Vi? All I want it to do is, when it wraps the line,
indent to the same position as the previous line. 

    Thanks,
    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix
HTML Email Considered Harmful: http://expita.com/nomime.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: auto-indent
  2002-11-16  2:51 auto-indent Michael P. Soulier
@ 2002-11-16 18:57 ` Kai Großjohann
  2002-11-18 17:44 ` auto-indent Michael P. Soulier
  1 sibling, 0 replies; 11+ messages in thread
From: Kai Großjohann @ 2002-11-16 18:57 UTC (permalink / raw)


"Michael P. Soulier" <msoulier@storm.ca._nospam> writes:

>     Hey people. How would I modify auto-fill mode so that it works the same
> way as auto-indent in Vi? All I want it to do is, when it wraps the line,
> indent to the same position as the previous line. 

This is what happens for me.

    See here.  This is a line starting with four spaces and I'm just
    typing stuff to make auto-fill happen.

There.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: auto-indent
  2002-11-16  2:51 auto-indent Michael P. Soulier
  2002-11-16 18:57 ` auto-indent Kai Großjohann
@ 2002-11-18 17:44 ` Michael P. Soulier
  2002-11-19 14:53   ` auto-indent Kai Großjohann
  1 sibling, 1 reply; 11+ messages in thread
From: Michael P. Soulier @ 2002-11-18 17:44 UTC (permalink / raw)


On 16 Nov 2002 02:51:37 GMT, Michael P. Soulier <msoulier@storm.ca._nospam>
wrote:
>     Hey people. How would I modify auto-fill mode so that it works the same
> way as auto-indent in Vi? All I want it to do is, when it wraps the line,
> indent to the same position as the previous line. 

    Ok, I'm trying to do this by rebinding the return key. This is for
sgml-mode, where I'm doing it like so:

(defun my-sgml-mode-hook ()
  "My personal sgml mode customizations."
  (setq sgml-indent-step nil)
  (setq sgml-indent-data nil)
  (define-key sgml-mode-map [RET]
    '(lambda ()
       (newline)
       (indent-relative)))
  )

    This apparently shows up in the sgml-mode-map, but when I go into an xml
file in sgml-mode (with help from xxml-mode), and do a C-h k RET, it says that
the key is still bound to newline. How can that be? Why isn't this working?

    Thanks,
    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix
HTML Email Considered Harmful: http://expita.com/nomime.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: auto-indent
  2002-11-18 17:44 ` auto-indent Michael P. Soulier
@ 2002-11-19 14:53   ` Kai Großjohann
  2002-11-20 17:35     ` auto-indent Michael P. Soulier
  0 siblings, 1 reply; 11+ messages in thread
From: Kai Großjohann @ 2002-11-19 14:53 UTC (permalink / raw)


"Michael P. Soulier" <msoulier@storm.ca._nospam> writes:

>   (define-key sgml-mode-map [RET]
                              ^^^^^
                              (kbd "RET")

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: auto-indent
  2002-11-19 14:53   ` auto-indent Kai Großjohann
@ 2002-11-20 17:35     ` Michael P. Soulier
  0 siblings, 0 replies; 11+ messages in thread
From: Michael P. Soulier @ 2002-11-20 17:35 UTC (permalink / raw)


On Tue, 19 Nov 2002 15:53:33 +0100, Kai Großjohann
<kai.grossjohann@uni-duisburg.de> wrote:
>                               (kbd "RET")

    That did it, thanks. 

    Also add (interactive) to my lambda function. :)

    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix
HTML Email Considered Harmful: http://expita.com/nomime.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Auto-Indent
@ 2003-11-28 17:11 digits
  2003-11-30  6:08 ` Auto-Indent Eli Zaretskii
       [not found] ` <mailman.804.1070176088.399.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: digits @ 2003-11-28 17:11 UTC (permalink / raw)


I can't find any information on how to solve this (simple) matter.

That Emacs keep the amount of tab's at the beginning of the line when I 
press enter, no matter which mode I am in.

Is there a way for this, or should I start looking into other editors - 
because this is a must have for me.

/Gunnar

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Auto-Indent
  2003-11-28 17:11 Auto-Indent digits
@ 2003-11-30  6:08 ` Eli Zaretskii
       [not found] ` <mailman.804.1070176088.399.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2003-11-30  6:08 UTC (permalink / raw)


> From: digits <digits@gentoo.se>
> Newsgroups: gnu.emacs.help
> Date: Fri, 28 Nov 2003 17:11:23 GMT
> 
> I can't find any information on how to solve this (simple) matter.

You should be able to find it in the node "Basic Indent" of the Emacs
manual.  Care to tell how you tried to look for it and come you didn't
find it?

> That Emacs keep the amount of tab's at the beginning of the line when I 
> press enter, no matter which mode I am in.

Emacs already does that in most modes, but the command to do it is by
default bound to C-j, for which many keyboards lack a key (if you
have a keyboard with a key labeled "LFD", try using it instead of the
Return key).  You could either type Ctrl-j to get what you want, or
you could bind this function to the Return key, by putting this:

(global-set-key "\C-m" 'newline-and-indent)

into your ~/.emacs init file.

> Is there a way for this, or should I start looking into other editors - 
> because this is a must have for me.

Threats?  Not very nice, IMHO.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Auto-Indent
       [not found] ` <mailman.804.1070176088.399.help-gnu-emacs@gnu.org>
@ 2003-12-01 16:52   ` digits
  0 siblings, 0 replies; 11+ messages in thread
From: digits @ 2003-12-01 16:52 UTC (permalink / raw)


Eli Zaretskii wrote:
>>From: digits <digits@gentoo.se>
>>Newsgroups: gnu.emacs.help
>>Date: Fri, 28 Nov 2003 17:11:23 GMT
>>
>>I can't find any information on how to solve this (simple) matter.
> 
> 
> You should be able to find it in the node "Basic Indent" of the Emacs
> manual.  Care to tell how you tried to look for it and come you didn't
> find it?
> 
> 
>>That Emacs keep the amount of tab's at the beginning of the line when I 
>>press enter, no matter which mode I am in.
> 
> 
> Emacs already does that in most modes, but the command to do it is by
> default bound to C-j, for which many keyboards lack a key (if you
> have a keyboard with a key labeled "LFD", try using it instead of the
> Return key).  You could either type Ctrl-j to get what you want, or
> you could bind this function to the Return key, by putting this:
> 
> (global-set-key "\C-m" 'newline-and-indent)
> 
> into your ~/.emacs init file.
> 
> 
>>Is there a way for this, or should I start looking into other editors - 
>>because this is a must have for me.
> 
> 
> Threats?  Not very nice, IMHO.

Wasn't a a thread, pure statement of fact, because it is a must-have and 
if I can't find a what I'm looking for in a product I start looking for 
a replacement :)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* auto-indent
@ 2003-12-30 22:40 hastenthunder
  2003-12-31  2:36 ` auto-indent Gernot Hassenpflug
  0 siblings, 1 reply; 11+ messages in thread
From: hastenthunder @ 2003-12-30 22:40 UTC (permalink / raw)


Hi Group,

I'm trying to figure out how to get emacs to auto-indent.

For example, if I type
        This is the first line

I like my second line to start at position 6 rather than position 1.

Can any one tell me how to do this?  Sorry if this question seem simple.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: auto-indent
  2003-12-30 22:40 auto-indent hastenthunder
@ 2003-12-31  2:36 ` Gernot Hassenpflug
  0 siblings, 0 replies; 11+ messages in thread
From: Gernot Hassenpflug @ 2003-12-31  2:36 UTC (permalink / raw)


"hastenthunder" <hastenthunder@yahoo.com> writes:

> Hi Group,
>
> I'm trying to figure out how to get emacs to auto-indent.
>
> For example, if I type
>         This is the first line
>
> I like my second line to start at position 6 rather than position 1.
>
> Can any one tell me how to do this?  Sorry if this question seem simple.

indented-text-mode

>From the description:

indented-text-mode is an alias for `text-mode' in `textmodes/text-mode'.
(indented-text-mode)

Major mode for editing text written for humans to read.
In this mode, paragraphs are delimited only by blank or white lines.
You can thus get the full benefit of adaptive filling
 (see the variable `adaptive-fill-mode').
key             binding
---             -------

TAB		indent-relative
ESC		Prefix Command

ESC S		center-paragraph
ESC s		center-line
ESC TAB		ispell-complete-word


Turning on Text mode runs the normal hook `text-mode-hook'.

-- 
G Hassenpflug RASC, Kyoto University

^ permalink raw reply	[flat|nested] 11+ messages in thread

* auto-indent
@ 2003-12-31 13:58 hastenthunder
  0 siblings, 0 replies; 11+ messages in thread
From: hastenthunder @ 2003-12-31 13:58 UTC (permalink / raw)


Hi Group,

I'm trying to figure out how to get emacs to auto-indent.

For example, if I type
        This is the first line

I like my second line to start at position 6 rather than position 1.

Can any one tell me how to do this?  Sorry if this question seem simple.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-12-31 13:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-28 17:11 Auto-Indent digits
2003-11-30  6:08 ` Auto-Indent Eli Zaretskii
     [not found] ` <mailman.804.1070176088.399.help-gnu-emacs@gnu.org>
2003-12-01 16:52   ` Auto-Indent digits
  -- strict thread matches above, loose matches on Subject: below --
2003-12-31 13:58 auto-indent hastenthunder
2003-12-30 22:40 auto-indent hastenthunder
2003-12-31  2:36 ` auto-indent Gernot Hassenpflug
2002-11-16  2:51 auto-indent Michael P. Soulier
2002-11-16 18:57 ` auto-indent Kai Großjohann
2002-11-18 17:44 ` auto-indent Michael P. Soulier
2002-11-19 14:53   ` auto-indent Kai Großjohann
2002-11-20 17:35     ` auto-indent Michael P. Soulier

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.