unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* tab character
@ 2011-10-27 13:45 Rustom Mody
  2011-10-27 14:31 ` Ludwig, Mark
  0 siblings, 1 reply; 9+ messages in thread
From: Rustom Mody @ 2011-10-27 13:45 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

The tab-always-indent docs say:

-----------------------------
Controls the operation of the TAB key.
If t, hitting TAB always just indents the current line.
If nil, hitting TAB indents the current line if point is at the left margin
or in the line's indentation, otherwise it inserts a \"real\" TAB character.
If `complete', TAB first tries to indent the current line, and if the line
was already indented, then try to complete the thing at point.

Some programming language modes have their own variable to control this,
e.g., `c-tab-always-indent', and do not respect this variable."
  :group 'indent
--------------------------------
Why is there nothing stronger than nil? IOW why is it so hard to just have
tab be tab with no conditions?

In Miles Bader page on emacswiki http://www.emacswiki.org/emacs/MilesBader
he has code for a literal-tab-mode.  So am I right in guessing that that is
the only approach if one wants tab characters to be entered?

[-- Attachment #2: Type: text/html, Size: 1105 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: tab character
@ 2011-10-27 22:27 Buchs, Kevin
  0 siblings, 0 replies; 9+ messages in thread
From: Buchs, Kevin @ 2011-10-27 22:27 UTC (permalink / raw)
  To: help-gnu-emacs

Whenever I want to insert a few literal tabs, I just escape it with C-q Tab. If I want to have tabs every time in a particular file, I will turn on this true-tab-mode I created:

(defvar true-tab-mode-map
  (let ( (map (make-sparse-keymap)) )  ; sparse keymap copies the existing one
    (define-key map "\t" 'self-insert-command)
    map) ; return the value of the let clause, which is map from this line
 "Keymap for `true-tab-mode'.")

(define-derived-mode true-tab-mode text-mode "text TrueTab"
" Major mode based on text mode, just reassigns the TAB key to do
an insertion of a tab.  Key map: \\{true-tab-mode-map}")



Kevin Buchs   |  Senior Engineer  |  Department of Physiology and Biomedical Engineering - SPPDG
507-538-5459  |   buchs.kevin@mayo.edu  |  http://www.mayo.edu/sppdg
Mayo Clinic  |  200 1st St. SW  |  Rochester, MN 55905  




^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <mailman.1037819061.24117.help-gnu-emacs@gnu.org>]
* TAB character
@ 2002-11-20 19:03 Stirling Olson
  0 siblings, 0 replies; 9+ messages in thread
From: Stirling Olson @ 2002-11-20 19:03 UTC (permalink / raw)


How can I make the TAB key just enter a TAB character and never have
that TAB character turn into spaces?

While editing .java files and other files hitting the TAB key seems to
follow some indenting conventions that I don't understand and don't
prefer.  It often enters spaces and sometimes won't even let me enter a
further tab.  I just want to have a tab character entered in the buffer
when I hit TAB and when I backspace or delete a tab in the buffer I
don't want it to turn into spaces.

Right now indent-tabs-mode is t but that still doesn't seem to help
matters.  Right now I can't even use the editor because I can't figure
out how to outwit this thing so I can have tabs where I want.  I'm happy
to read documentation but I can't seem to find the right information and
don't really want to read 10 whole books just to figure out how to enter
a tab in my document so I can determine whether this editor is worth
learning...

Thanks in advance for any and all help.

Best Regards,
Stirling

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

end of thread, other threads:[~2011-10-27 22:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-27 13:45 tab character Rustom Mody
2011-10-27 14:31 ` Ludwig, Mark
2011-10-27 15:05   ` Rustom Mody
2011-10-27 15:13     ` Ludwig, Mark
2011-10-27 20:23     ` Andreas Röhler
     [not found]   ` <mailman.1178.1319727924.15868.help-gnu-emacs@gnu.org>
2011-10-27 15:18     ` Pascal J. Bourguignon
  -- strict thread matches above, loose matches on Subject: below --
2011-10-27 22:27 Buchs, Kevin
     [not found] <mailman.1037819061.24117.help-gnu-emacs@gnu.org>
2002-11-22 21:56 ` TAB character Benjamin Rutt
2002-11-20 19:03 Stirling Olson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).