From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <86h68ow9u6.fsf@gnu.org> References: <87cyjsf63l.fsf@toomas.mail-host-address-is-not-set> <868qugf32u.fsf@gnu.org> <1893.1729692008@localhost> <86cyjqemoq.fsf@gnu.org> <14255.1730649037@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6494"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73951@debbugs.gnu.org To: Toomas Rosin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 03 17:40:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t7deG-0001Tx-Lc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Nov 2024 17:40:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7de0-0007K3-4n; Sun, 03 Nov 2024 11:40:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7ddy-0007Iv-9W for bug-gnu-emacs@gnu.org; Sun, 03 Nov 2024 11:40:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7ddy-0003LZ-0M for bug-gnu-emacs@gnu.org; Sun, 03 Nov 2024 11:40:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=W9xHDtbljIQv+uXQmSkw7flxR/yBVa9P116LL5PDvHY=; b=pAtk+I2LgdkWPGfDLalmxXfQXeFvzQ5J6sPqO1sS9BgV1D55IX21ouKoeJNyA9TnnCJEri5R3k70tBbdplxmioZvegk70swS9El0IeRWYyWBbQe7KNsHtPn2+PgPZWlbaVGoasF7fYkxq0UMZIE8ADTKwf8B4VTZetVAzw4/6IWdPiBVH2KtII6SIWL8/FVf/ZijyaGttTRGglav1I41mGxbBd62wmyIdCzzj6HJlR3e6Hgd/NXI77y9cfFE1HnXARCSXTLWa8/pa35XdmTLRCOw7GfT8Ou3kTyBBatXASo+8fH5s/qNVjMVIxmK59OvGAtTooSJLPITH0cF0hKM9w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t7ddx-00056t-Kg for bug-gnu-emacs@gnu.org; Sun, 03 Nov 2024 11:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Nov 2024 16:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73951 X-GNU-PR-Package: emacs Original-Received: via spool by 73951-submit@debbugs.gnu.org id=B73951.173065196519614 (code B ref 73951); Sun, 03 Nov 2024 16:40:01 +0000 Original-Received: (at 73951) by debbugs.gnu.org; 3 Nov 2024 16:39:25 +0000 Original-Received: from localhost ([127.0.0.1]:33367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7ddN-00056I-3Z for submit@debbugs.gnu.org; Sun, 03 Nov 2024 11:39:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7ddK-000566-Sb for 73951@debbugs.gnu.org; Sun, 03 Nov 2024 11:39:23 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7ddE-0003Cq-Np; Sun, 03 Nov 2024 11:39:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=W9xHDtbljIQv+uXQmSkw7flxR/yBVa9P116LL5PDvHY=; b=TDKgytQfWZjYTlJdr1j9 yDVIYJbPIO/zfmE6wCfvBKcxE1YmfKcOmZASetUyqmqkNhdd8R/+OPbciMZJRQRUJNxR3dnCKqej9 KMOyUZUTWZCIHcoKqpWYQPm+2EUe+gaXbBba8gbYyHXTrpFc7e9m4sf6/79JA9GFYiJP0QIdDa7NE RWbZyf6vBVrf2LmEQFo6Jtz8lE+qgbBAhLGdTTf9C+YD6nROtPZDJow6TmTBHdV1S/s7c+NncQ8d+ gT1zm2YtcH9KF6OEZILVqhY22j2unYuEZxoFOTHcxv5JaZHqZnUDJjlIOM0MJ/oFDM3Z1aGawCwLH jJ9ex6B5mjiL0w==; In-Reply-To: <14255.1730649037@localhost> (message from Toomas Rosin on Sun, 03 Nov 2024 17:50:37 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294806 Archived-At: > From: Toomas Rosin > cc: 73951@debbugs.gnu.org > Comments: In-reply-to Eli Zaretskii > message dated "Wed, 23 Oct 2024 20:47:17 +0300." > Date: Sun, 03 Nov 2024 17:50:37 +0200 > > Eli Zaretskii 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 "" denotes the tab character): > > tawk () { awk -F '' -v OFS='' "$@"; } # 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?