all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
Subject: Re: Substiotution of tabs with spaces...
Date: Fri, 15 Apr 2005 19:55:42 +0000	[thread overview]
Message-ID: <u76p3d.a7.ln@acm.acm> (raw)
In-Reply-To: mailman.1624.1113556776.2895.help-gnu-emacs@gnu.org

luca.spinacci@seleniacomms.com wrote on Fri, 15 Apr 2005 11:06:02 +0200:

> Hi,
> is there a smart way to replace all tabs with 3 spaces in a buffer edited
> in c-mode
> (both comments and code lines)

Yes, but that might not be what you really want.  Assuming you've got
tab-width set to 3, a tab extends to the next column which is a multiple
of 3.  So if you had this in a buffer

a<tab>b

it would look like this:

a  b

If you replaced the tab with three spaces, you'd end up with this

a   b.

I suggest you do this:  C-x h  (to mark the entire buffer) followed by
M-x untabify.

> Thank you very much.

And the best of luck!

-- 
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

  parent reply	other threads:[~2005-04-15 19:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1624.1113556776.2895.help-gnu-emacs@gnu.org>
2005-04-15 10:52 ` Substiotution of tabs with spaces Pascal Bourguignon
2005-04-15 19:55 ` Alan Mackenzie [this message]
2005-04-15  9:06 luca.spinacci
2005-04-15 11:10 ` Peter Dyballa
     [not found] ` <mailman.1631.1113563465.2895.help-gnu-emacs@gnu.org>
2005-04-15 13:15   ` Pascal Bourguignon
2005-04-15 22:49     ` Peter Dyballa
     [not found]     ` <mailman.1690.1113606252.2895.help-gnu-emacs@gnu.org>
2005-04-15 23:38       ` Pascal Bourguignon
2005-04-17 21:42         ` Peter Dyballa
2005-04-16  4:16       ` Stefan Monnier
2005-04-17 20:05         ` Steinar Børmer
2005-04-17 21:18           ` Peter Dyballa
2005-04-17 21:50           ` Peter Dyballa
     [not found]           ` <mailman.1796.1113775705.2895.help-gnu-emacs@gnu.org>
2005-04-18  6:39             ` Steinar Børmer
2005-04-18  0:03   ` Quokka

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=u76p3d.a7.ln@acm.acm \
    --to=acm@muc.de \
    /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.