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#58804: Inconsistency between ruler-mode, fill-column and whitespace-mode Date: Thu, 27 Oct 2022 09:34:39 +0300 Message-ID: <83a65hn5a8.fsf@gnu.org> References: <83lep1n7w1.fsf@gnu.org> 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="33753"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58804@debbugs.gnu.org To: Heime Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 27 08:39:05 2022 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 1onwXg-0008dY-FH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Oct 2022 08:39:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onwUm-0006IZ-Vd; Thu, 27 Oct 2022 02:36:05 -0400 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 1onwUk-0006Fh-CR for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 02:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onwUk-00031i-48 for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 02:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onwUj-0006eT-Mv for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 02:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2022 06:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58804 X-GNU-PR-Package: emacs Original-Received: via spool by 58804-submit@debbugs.gnu.org id=B58804.166685250225485 (code B ref 58804); Thu, 27 Oct 2022 06:36:01 +0000 Original-Received: (at 58804) by debbugs.gnu.org; 27 Oct 2022 06:35:02 +0000 Original-Received: from localhost ([127.0.0.1]:55986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onwTm-0006cz-8b for submit@debbugs.gnu.org; Thu, 27 Oct 2022 02:35:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onwTh-0006cO-PH for 58804@debbugs.gnu.org; Thu, 27 Oct 2022 02:35:01 -0400 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 1onwTZ-0002gZ-HZ; Thu, 27 Oct 2022 02:34:49 -0400 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=67WcB7U/jaz/uk2FZy1Hn9PbiEUuWR/HSc2W8u6emBM=; b=QnyYnG5v08atSQp67Kxe 0UWx/QA5V4vFiH7nqXx3HasFsA46g50BAC/axauknUFUhUobWKErHh2/q47xlaRinZSuyT6f+3jIM XeKpm7alrnet8HnUW0AWXQoylvPBS8F1gku2tr2HpIT/X1sWGy2PYSDcx/Tju7FQNk6s4Tf0Rmd1s /YgVWYakh1QVEtlsWyE19uSxl+NFsKC7IivR7Wnka0LcXSiyfX6Vu6HKvOUG+GL+zecnRmbwSOnOQ H0PDvc808GvCLBW4zD94AqnwSleEA1no6P7v0mBDeZpmZFxuQm4DDD2+aRJH40e4YLrIgQHM8G8FN 24N/b3yvA+O0Ag==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onwTY-0002ZC-Ab; Thu, 27 Oct 2022 02:34:49 -0400 In-Reply-To: (message from Heime on Thu, 27 Oct 2022 06:15:23 +0000) 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246274 Archived-At: > Date: Thu, 27 Oct 2022 06:15:23 +0000 > From: Heime > Cc: 58804@debbugs.gnu.org > > > > but it should be at column 71 because column numbers start from 0. > > > > > > I don't follow: ruler-mode counts columns starting from zero, as > > everything in Emacs. If you move point to a column other than the > > leftmost one, you will see "0" at the left edge of the ruler display. > > So having the marker at column 72 is exactly right. > > When one is using a box cursor, it is very confusing. If one has > whitespace-style with 'lines-char, the column with the Right Ruler Marker > gets highlighted. So I guess this is a bug in whitespace-mode? Its doc string says: lines-char lines which have columns beyond ‘whitespace-line-column’ are highlighted via putting a face on the first character that goes beyond the ‘whitespace-line-column’ column. So highlighting the character whose column is whitespace-line-column, not whitespace-line-column+1, seems to be a bug? > When users have a box cursor, it is convenient that > the Right Ruler Marker is placed on the last column where it is acceptable > to introduce a last character without exceeding line-column. That's what happens now (and box cursor is the default cursor style). The problem seems to be in whitespace-mode, not in ruler-mode. > > It sounds like you want column numbers that start from 1, not zero? > > That should be a session-wide mode (if we want such an enhancement), > > since otherwise there could be confusion. We currently support > > one-based column only in the mode-line display under > > column-number-mode. Maybe you have turned that on, which is why you > > think there's a mismatch in ruler-mode? > > Yes, to start from 1, not zero - when one uses a "box cursor". I don't think I understand the relevance of the cursor-type to this issue. > And yes, I have both ruler-mode, whitespace-mode, and > column-number-mode, all three enabled. I would appreciate if I > could make the necessary customisations for all three to match. That would need some new minor mode or user option, I guess, and suitable changes in several places to follow the optional behavior. Patches welcome.