GNU bug report logs - #73951
29.4; 'what-cursor-position' reports SPC instead of TAB in term-mode

Previous Next

Package: emacs;

Reported by: toomas <at> rosin.ee

Date: Tue, 22 Oct 2024 16:43:01 UTC

Severity: normal

Found in version 29.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Toomas Rosin <toomas <at> rosin.ee>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73951 <at> debbugs.gnu.org
Subject: Re: bug#73951: 29.4;
 'what-cursor-position' reports SPC instead of TAB in term-mode
Date: Sun, 03 Nov 2024 17:50:37 +0200
Eli Zaretskii <eliz <at> 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.




This bug report was last modified 200 days ago.

Previous Next


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