GNU bug report logs - #8135
Problem about TAB in emacs23

Previous Next

Package: emacs;

Reported by: dexter K <dexterkidd <at> gmail.com>

Date: Mon, 28 Feb 2011 05:04:02 UTC

Severity: wishlist

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8135 in the body.
You can then email your comments to 8135 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8135; Package emacs. (Mon, 28 Feb 2011 05:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to dexter K <dexterkidd <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 28 Feb 2011 05:04:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dexter K <dexterkidd <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Problem about TAB in emacs23
Date: Mon, 28 Feb 2011 12:04:51 +0800
[Message part 1 (text/plain, inline)]
Hi everyone
rms says here maybe can help me find out a way to fix my problem.

I have problem in emacs with TAB

I want have a real tab , when I press TAB, it goes like 8 spaces distances..
I did it with this code:
-------

(global-set-key (kbd "TAB") 'self-insert-command)
(setq default-tab-width 8)
(setq tab-width 8)
(setq c-basic-indent 8)

(global-set-key [delete] 'delete-char)
(global-set-key [backspace] 'delete-backward-char)

-------

it works both on windows & mac , the most important is I can delete a whole
tab distances like 8 spaces when I press [BackSpace] key
But it failed again in my Centos ,when I done complie emacs 23.2

Is there any way  to fix  this problem ?
Cause I really dont want delete a tab by press 8 times  backspace  on the
keyboard.
If it is possible , I want change all  modes of emacs to get a REAL TAB, no
more space instead of TAB.
Thanks
[Message part 2 (text/html, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8135; Package emacs. (Mon, 28 Feb 2011 19:52:01 GMT) Full text and rfc822 format available.

Message #8 received at 8135 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: dexter K <dexterkidd <at> gmail.com>
Cc: 8135 <at> debbugs.gnu.org
Subject: Re: bug#8135: Problem about TAB in emacs23
Date: Mon, 28 Feb 2011 14:51:19 -0500
dexter K wrote:

> I want have a real tab , when I press TAB, it goes like 8 spaces distances..
> I did it with this code:
> -------
>
> (global-set-key (kbd "TAB") 'self-insert-command)
> (setq default-tab-width 8)
> (setq tab-width 8)
> (setq c-basic-indent 8)
>
> (global-set-key [delete] 'delete-char)
> (global-set-key [backspace] 'delete-backward-char)
>
> -------
>
> it works both on windows & mac , the most important is I can delete a whole
> tab distances like 8 spaces when I press [BackSpace] key
> But it failed again in my Centos ,when I done complie emacs 23.2



This does not look like an Emacs bug, and probably would have been
better suited to the help-gnu-emacs mailing list.

Comments:
1) The default tab-width is 8.
2) There is no `c-basic-indent' variable. Maybe you meant c-basic-offset?
3) delete runs `delete-char' by default.
4) C-h k BACKSPACE tells me that I can customize the behaviour
by setting `backward-delete-char-untabify-method'.

So in Emacs 23.2 I get the behaviour that you want simply with:

(global-set-key (kbd "TAB") 'self-insert-command)
(setq backward-delete-char-untabify-method nil)




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Tue, 01 Mar 2011 17:48:02 GMT) Full text and rfc822 format available.

Notification sent to dexter K <dexterkidd <at> gmail.com>:
bug acknowledged by developer. (Tue, 01 Mar 2011 17:48:02 GMT) Full text and rfc822 format available.

Message #13 received at 8135-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 8135-done <at> debbugs.gnu.org
Subject: Re: bug#8135: Problem about TAB in emacs23
Date: Tue, 1 Mar 2011 12:47:41 -0500
dexter K. wrote (on Tue, 1 Mar 2011 at 17:59 +0800):

> Oh man, It works!
> I cant tell you how much I thank you!
> Thanks very very much





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 30 Mar 2011 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.