From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#17303: On tty or -nw, (window-body-width) is one column too big. Date: Sun, 20 Apr 2014 17:03:43 +0000 Message-ID: <20140420170343.GA4058@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1398013774 5368 80.91.229.3 (20 Apr 2014 17:09:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Apr 2014 17:09:34 +0000 (UTC) To: 17303@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 20 19:09:26 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WbvF8-0003qH-8t for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Apr 2014 19:09:26 +0200 Original-Received: from localhost ([::1]:46194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbvF7-00005E-OB for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Apr 2014 13:09:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbvEv-000058-KL for bug-gnu-emacs@gnu.org; Sun, 20 Apr 2014 13:09:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WbvEk-0008BT-RN for bug-gnu-emacs@gnu.org; Sun, 20 Apr 2014 13:09:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbvEk-0008BL-NF for bug-gnu-emacs@gnu.org; Sun, 20 Apr 2014 13:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WbvEj-0001Hz-Rs for bug-gnu-emacs@gnu.org; Sun, 20 Apr 2014 13:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Apr 2014 17:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17303 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13980136924874 (code B ref -1); Sun, 20 Apr 2014 17:09:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Apr 2014 17:08:12 +0000 Original-Received: from localhost ([127.0.0.1]:53506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WbvDu-0001GU-VA for submit@debbugs.gnu.org; Sun, 20 Apr 2014 13:08:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46908) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WbvDr-0001GH-VI for submit@debbugs.gnu.org; Sun, 20 Apr 2014 13:08:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WbvDh-00085u-NR for submit@debbugs.gnu.org; Sun, 20 Apr 2014 13:08:07 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbvDh-00085q-Kg for submit@debbugs.gnu.org; Sun, 20 Apr 2014 13:07:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbvDZ-0007eM-U3 for bug-gnu-emacs@gnu.org; Sun, 20 Apr 2014 13:07:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WbvDS-00084C-EY for bug-gnu-emacs@gnu.org; Sun, 20 Apr 2014 13:07:49 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:42833 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbvDS-000841-80 for bug-gnu-emacs@gnu.org; Sun, 20 Apr 2014 13:07:42 -0400 Original-Received: (qmail 85781 invoked by uid 3782); 20 Apr 2014 17:07:39 -0000 Original-Received: from acm.muc.de (pD951961C.dip0.t-ipconnect.de [217.81.150.28]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 20 Apr 2014 19:07:39 +0200 Original-Received: (qmail 4134 invoked by uid 1000); 20 Apr 2014 17:03:43 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88166 Archived-At: Hi, Emacs. I'm doing something at the moment involving scrolling of windows, and I need to know at what "visual" column point is in. So, naturally, I do (% (current-column) (window-body-width)) . At the start of the first continuation line, this formula (correctly) returns 0 on a GUI, but (e.g.) 79 on a tty or in emacs -nw. This is caused by emacs counting the "\" character in the right margin as part of the body-width. This seems like a bad idea. I think it's also a bug. So, is there a better method of determining the "visual" column point is in? -- Alan Mackenzie (Nuremberg, Germany).