From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: master 7e387c9: * lisp/man.el (Man-width-max): New defcustom (bug#32536, bug#9385) Date: Sun, 08 Dec 2019 23:41:28 +0200 Organization: LINKOV.NET Message-ID: <87eexe33pn.fsf@mail.linkov.net> References: <83zhg2d78w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="14723"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 08 22:56:53 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ie4Xs-0003jT-KT for ged-emacs-devel@m.gmane.org; Sun, 08 Dec 2019 22:56:53 +0100 Original-Received: from localhost ([::1]:33680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ie4Xr-0003IK-Fp for ged-emacs-devel@m.gmane.org; Sun, 08 Dec 2019 16:56:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43739) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ie4XZ-0003Fd-6L for emacs-devel@gnu.org; Sun, 08 Dec 2019 16:56:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ie4XX-0003e3-Rm for emacs-devel@gnu.org; Sun, 08 Dec 2019 16:56:32 -0500 Original-Received: from brown.elm.relay.mailchannels.net ([23.83.212.23]:32231) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ie4XV-0003Rp-TJ; Sun, 08 Dec 2019 16:56:30 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id BCDC35014FD; Sun, 8 Dec 2019 21:56:26 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a35.g.dreamhost.com (100-96-14-7.trex.outbound.svc.cluster.local [100.96.14.7]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4D580501127; Sun, 8 Dec 2019 21:56:26 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a35.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Sun, 08 Dec 2019 21:56:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Chemical-Left: 158dc9df3c014821_1575842186537_3189331755 X-MC-Loop-Signature: 1575842186537:2365655625 X-MC-Ingress-Time: 1575842186536 Original-Received: from pdx1-sub0-mail-a35.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTP id 458F9A123C; Sun, 8 Dec 2019 13:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jurta.org; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=jurta.org; bh=RhflpWq6VkWIOkbkWJ2Qr8c6r3o=; b=J BML0zq4ltwH5WNq3cyJsKtMpadZIpPzEm8IQlXKbI8Ea4aVjUIL9bA0LuugJNikW 0gMjRYWaVXuPBus+pijC9L5aIxcfwPS8XZ1tnpAtdSJl2Zry8A1Ft4Zu/YbEKyNw eKne21ykdz4iHR6A+PmO0+YhuicpEElE1OAIu8Lizs= Original-Received: from mail.jurta.org (m91-129-96-42.cust.tele2.ee [91.129.96.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a35.g.dreamhost.com (Postfix) with ESMTPSA id B72127E466; Sun, 8 Dec 2019 13:56:22 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a35 In-Reply-To: <83zhg2d78w.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 08 Dec 2019 20:03:59 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.212.23 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243246 Archived-At: >> +(defun Man-columns () >> + (let ((width (cond >> + ((and (integerp Man-width) (> Man-width 0)) >> + Man-width) >> + (Man-width >> + (let ((window (get-buffer-window nil t))) >> + (frame-width (and window (window-frame window))))) >> + (t >> + (window-width (get-buffer-window nil t)))))) > > Bother: both frame-width and window-width return values in units of > the canonical character width, which will not change if the default > face is remapped. And you are using the value to set the COLUMNS > environment variable, so you could get too wide lines, which will not > fit within the window. This code is not new. It was moved here from another function. I don't know how to implement support for variable-pitch fonts in the Man-mode buffers. Maybe not to set COLUMNS at all, but then call fill-paragraph on the output.