From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#34476: fluffy whitespace in the mode-line, despite it running off the screen Date: Fri, 07 Aug 2020 10:31:22 +0200 Message-ID: <87a6z67t7p.fsf@gnus.org> References: <87lg2icx3u.fsf@jidanni.org> <87ftnfrwef.fsf@mouse.gnus.org> <87r26z0wdy.fsf@tcd.ie> <87eeoi7un0.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39330"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 34476@debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 07 10:32:12 2020 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 1k3xnQ-000A7X-Mg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Aug 2020 10:32:12 +0200 Original-Received: from localhost ([::1]:33010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3xnP-0004gP-K5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Aug 2020 04:32:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3xnH-0004f4-3f for bug-gnu-emacs@gnu.org; Fri, 07 Aug 2020 04:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k3xnG-0004CK-R2 for bug-gnu-emacs@gnu.org; Fri, 07 Aug 2020 04:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k3xnG-0001qf-75; Fri, 07 Aug 2020 04:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Fri, 07 Aug 2020 08:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34476 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 34476-submit@debbugs.gnu.org id=B34476.15967891057081 (code B ref 34476); Fri, 07 Aug 2020 08:32:02 +0000 Original-Received: (at 34476) by debbugs.gnu.org; 7 Aug 2020 08:31:45 +0000 Original-Received: from localhost ([127.0.0.1]:55652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3xmy-0001q9-O3 for submit@debbugs.gnu.org; Fri, 07 Aug 2020 04:31:44 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:36106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3xmw-0001pw-ED for 34476@debbugs.gnu.org; Fri, 07 Aug 2020 04:31:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MSNYh45baqu8TScI5Hue6pxMa5e7D2YrIb9nt9WivaM=; b=ibNmRJ0UrI1ucI88f4yFIJnHUq F4HVGljB+R996PiqNIrJR2Qoiw+HreIoy8IoLtelFkt46sqB12SAw9Yqw9YN+1Y+haulGGR6fGzSA e4iEAox7WH4lsdm74Q0qSXMpf6RzPb64eXyK/mbqDJBZjdEbM78innO9YWlQ/X+daC00=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3xmj-0004hg-AG; Fri, 07 Aug 2020 10:31:35 +0200 In-Reply-To: <87eeoi7un0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 07 Aug 2020 10:00:35 +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" Xref: news.gmane.io gmane.emacs.bugs:184235 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Hm... well, since this is an optional thing users can switch on, > perhaps making it slightly slower wouldn't be that much of a problem. > Let's see... OK, here's a proof of concept. With the patch, the mode line looks like: --=-=-= Content-Type: image/png Content-Disposition: inline Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAABHIAAABVCAAAAAAAxpytAAAABGdBTUEAALGPC/xhBQAAACBjSFJN AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAQY2FO dgAADwAAAAhwAAAHuwAABymRNxdtAAAY1UlEQVR42u2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muM0m zfUp5Si1XXBTdd3mO+Va846yBT8E1jnlDWCxem31YFPS0tnzqtdFe24sgZibWxenpMGisPmuW+// FWJbRpzJ0j6/qj8YYF+u55bk12k1sFHm+jIuPnzI+rXjJoMBDmUTbjvfjjElyfoed5xeUMabFS0m hC06xScz7We2EV27xkUW7t9Uwfe3r5YA2gwG2H6BONvB3llbbnVJFNTRwFMSAJ76nXbDYzNXFXJu +J54Pcq7oqqOImlAJ5VtIQ+9xMd34wcMeAfgxbeABklto8/u3ClTYS3MG5UPLYa3jSg4lJqtp1MV eys5bdYcoGe/yP1rL07r5KVZLXsrtV04aDeED+wWmb0hkzM3pLWpNe8oWvC+Z0v4z1BHnQUQe6d6 bVXl1bR0eF7tLKeyJzC+UJZlOTkGWO1ybjEGRm+1yLJ84q/RslfGKpzlhIXNs8iyfLwz8LnzxqnQ 3LwkcdCuTJYXAhGZsrzf8dfYctzyEuteubdXp29ZlmX5GhitS24VSTTV8URZkq8AmG2RZTlvJDDJ a5eeZzle1HEjETip8j8q/xGGdMgfZznGvPM1EPZ6ie0KK+Q3a+mbwHNWjS2bxr0gm7G3itMO14fI b2VZlg9frXCWq4SnvdUC4m7g1kxZluWqj+rBwFrzjooFJ0P98/Yq2aHwhFd7KwSbopbOnkd+yu0f wbrj/wLDqqzLa4HrXA70EGY7rp3MpRw+si7vBO7RTDmGJImDv8iyXAAMk2VZ7gRLrOFW3WBFB9tG oylHRRJNdTxRluQrgBnW5dIuIGV669LXlNMAKFELanmMTRofUo4LRbIJ75Q2h5AVjk0/Zlh/h8AV 1YMO5bIZe6s47WFgoS26YnxJOQptrwLG2uWeC/xcW95RsWAq8IG9cFb1hayGvT2VV9bS2fP/B+OX X0+A/7GzAAAAAElFTkSuQmCC --=-=-= Content-Type: text/plain If this way of implementing it sounds OK to everybody, then I'll finish the patch (and add support for "only compact if the line is too long") and add documentation and NEWS. diff --git a/src/xdisp.c b/src/xdisp.c index 4fe1c4288a..938b3b408a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -25216,14 +25216,42 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) format_mode_line_unwind_data (NULL, NULL, Qnil, false)); - mode_line_target = MODE_LINE_DISPLAY; - /* Temporarily make frame's keyboard the current kboard so that kboard-local variables in the mode_line_format will get the right values. */ push_kboard (FRAME_KBOARD (it.f)); record_unwind_save_match_data (); - display_mode_element (&it, 0, 0, 0, format, Qnil, false); + + if (NILP (Vmode_line_compact)) + { + mode_line_target = MODE_LINE_DISPLAY; + display_mode_element (&it, 0, 0, 0, format, Qnil, false); + } + else + { + Lisp_Object mode_string = Fformat_mode_line (format, Qnil, Qnil, Qnil); + char *string = xmalloc (SBYTES (mode_string) + 1), + *ostring = SSDATA (mode_string); + char *s = string, prev = 0; + + /* Copy over the data from the mode line string, but ignore + repeating spaces. This should be safe even for multibyte + strings, since this is UTF-8. */ + for (int i = 0; i < SBYTES (mode_string); i++) + { + char c = ostring[i]; + if (!(c == ' ' && prev == ' ')) + { + *s++ = c; + prev = c; + } + } + *s = 0; + + display_string (string, Qnil, Qnil, 0, 0, &it, 0, 0, 0, + STRING_MULTIBYTE (mode_string)); + xfree (string); + } pop_kboard (); unbind_to (count, Qnil); @@ -34551,6 +34579,11 @@ syms_of_xdisp (void) The face used for trailing whitespace is `trailing-whitespace'. */); Vshow_trailing_whitespace = Qnil; + DEFVAR_LISP ("mode-line-compact", Vmode_line_compact, + doc: /* Non-nil means that mode lines should be compact. +This means that repeating spaces will be replaced with a single space. */); + Vmode_line_compact = Qnil; + DEFVAR_LISP ("nobreak-char-display", Vnobreak_char_display, doc: /* Control highlighting of non-ASCII space and hyphen chars. If the value is t, Emacs highlights non-ASCII chars which have the -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no --=-=-=--