unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Toomas Rosin <toomas@rosin.ee>
Cc: 73951@debbugs.gnu.org
Subject: bug#73951: 29.4; 'what-cursor-position' reports SPC instead of TAB in term-mode
Date: Sun, 03 Nov 2024 18:39:13 +0200	[thread overview]
Message-ID: <86h68ow9u6.fsf@gnu.org> (raw)
In-Reply-To: <14255.1730649037@localhost> (message from Toomas Rosin on Sun, 03 Nov 2024 17:50:37 +0200)

> From: Toomas Rosin <toomas@rosin.ee>
> cc: 73951@debbugs.gnu.org
> Comments: In-reply-to Eli Zaretskii <eliz@gnu.org>
>    message dated "Wed, 23 Oct 2024 20:47:17 +0300."
> Date: Sun, 03 Nov 2024 17:50:37 +0200
> 
> Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > OK, so why is it a problem that Emacs uses SPC character to emulate a
> > TAB?
> 
> It is confusing when you don't happen to know about it.
> 
> I did not know about it before writing the OP.  I had this function definition in a shell script (where "<TAB>" denotes the tab character):
> 
>     tawk () { awk -F '<TAB>' -v OFS='<TAB>' "$@"; }  # run awk on tab delimited files
> 
> When I yanked this definition from the script to the "*terminal*" buffer and tried to use it, I happened to get unexpected results (which, as it turned out later, were in fact not connected to this definition), and the first thing I suspected was (quite naturally imho) that something was wrong with the tab characters in the definition of the function.  To check the definition, I ran "type tawk" in the *terminal* buffer, switched to line mode (C-c C-j), moved the cursor to the tab chars, ran `what-cursor-position' — and indeed, it told me that there were spaces there instead of tabs!  So I was confirmed in my barking up the wrong tree.

Did you try setting indent-tabs-mode to a non-nil value?





  reply	other threads:[~2024-11-03 16:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 16:35 bug#73951: 29.4; 'what-cursor-position' reports SPC instead of TAB in term-mode toomas
2024-10-22 17:40 ` Eli Zaretskii
2024-10-23 14:00   ` Toomas Rosin
2024-10-23 17:47     ` Eli Zaretskii
2024-11-03 15:50       ` Toomas Rosin
2024-11-03 16:39         ` Eli Zaretskii [this message]
2024-11-04 19:37           ` Toomas Rosin
2024-11-04 19:52             ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=86h68ow9u6.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=73951@debbugs.gnu.org \
    --cc=toomas@rosin.ee \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).