From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CFMwM26UmmED9QAAgWs5BA (envelope-from ) for ; Sun, 21 Nov 2021 19:48:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qKTALm6UmmFAOgAAbx9fmQ (envelope-from ) for ; Sun, 21 Nov 2021 18:48:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6DC87C1F1 for ; Sun, 21 Nov 2021 19:48:14 +0100 (CET) Received: from localhost ([::1]:50502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1morsr-0001gW-Kv for larch@yhetil.org; Sun, 21 Nov 2021 13:48:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mors0-0001g8-1u for emacs-orgmode@gnu.org; Sun, 21 Nov 2021 13:47:20 -0500 Received: from [2607:f8b0:4864:20::536] (port=34594 helo=mail-pg1-x536.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1morry-00068Y-GP for emacs-orgmode@gnu.org; Sun, 21 Nov 2021 13:47:19 -0500 Received: by mail-pg1-x536.google.com with SMTP id 200so13349006pga.1 for ; Sun, 21 Nov 2021 10:47:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version; bh=DPFhug2DBYhd+pToNceopC5gzgKbbKTsOC2jGMfT9i0=; b=hDcoaa+BFrnr/VIZnFdz9QV/u9FTi1m0wOZJpvtyKoBKnzvzb/sb5QgyNk9YeN+j5i PevT7oNxBj9P97hVFyLrm16evql3ShZ6cq0Mtn4RULHY7K4vZk5ygDvcH28wj1+3iC0G 6eOrvz7DT7DP5EFfxn7auptHN63BeITtC0cBRClCWgDFrktGUxYLemJhRCVo2MJ4q3+r hvxdYc2W4Pn4QwjjT5o23ww07fvmzxjJZR1d3hvsk6/ErYsxqJCJFStMIj7EQsJxOQYX kMrSE/FlkPelAl6wkvguWLk3UMZU4AgFBUF+2p9o0Y1JPMvqxeSkHZAlgUsTkjgTKTUl 1yeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=DPFhug2DBYhd+pToNceopC5gzgKbbKTsOC2jGMfT9i0=; b=lb2KMmLHOfdQNWES7ttJbPq8lAF+t9tUw7YaV5LilVyIRUSFbR2UJtUS/WJP3rIgUO dNptp6+K0Bwv1/MOLp9nVBfsGXrHc/7BFkFpxk1V9TkGFcLG+KB2+erihPoVAax+Y4D/ A6nPtw79padDu7rHJ+9wex/4LqD2f29leqYSvs1O1boVnE7WkW0hqENXsfUJZ2XyGIi2 sye5rVL4rY+ECpIYDnEwSwbdN9g36+8Nx+DSMH7LnFZEKwQM6tk1E03BehVwkcltQOfr Gb4WcGykB4FekQugJWZSDjKReVDZjf08JAtyzEQNKhW65BoyN5vK7wtxdegUw4EKDr4E oqKQ== X-Gm-Message-State: AOAM532r8PAR2Dk8BV2ZNmqcnczr7bzm5NLAZI+xUU8682aBVs41drYW KDUlr4mI9QWy990bHka5PtDxOLldHC0= X-Google-Smtp-Source: ABdhPJx4TgNPdhYdkggG2qO/uRegFBO/zqg9egsjncZH5TWXbYJTVZAkqlXbYifo1A1HdQZcG2dn6w== X-Received: by 2002:a17:903:32c2:b0:141:eed4:ec0a with SMTP id i2-20020a17090332c200b00141eed4ec0amr100043493plr.74.1637520087956; Sun, 21 Nov 2021 10:41:27 -0800 (PST) Received: from ryzen3950 (c-208-82-98-189.rev.sailinternet.net. [208.82.98.189]) by smtp.gmail.com with ESMTPSA id v38sm4119008pgl.38.2021.11.21.10.41.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 10:41:26 -0800 (PST) From: Matt Huszagh To: "emacs-orgmode@gnu.org" Cc: Subject: [PATCH] Fix window width when line numbers present Date: Sun, 21 Nov 2021 10:41:22 -0800 Message-ID: <87fsrpuzal.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::536 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=huszaghmatt@gmail.com; helo=mail-pg1-x536.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637520494; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=DPFhug2DBYhd+pToNceopC5gzgKbbKTsOC2jGMfT9i0=; b=oZKubOAYNRPB17lLyS/g1kqvUyvDGHwAYmiaSit7eBEAnIiweUF+R45gxmGBjVYKBzb5k0 Pug8wxtgK83S0NoddzUMpU/ogrSpBA+yoljHNLlY5HTdLi8MbWA68eqN/EOVAnV60fBQTK J54bdx7vF30+jKQ2inVNEwB1KLeCh4dBljs+5kG+jtW75DOBe9esgVKQsu6DrTiZUi3noL xjCPhTpTDsaGtEA9A6ACi96lUc3mf5E95jnQnHdqjy5qUvNl2xY70NtaqcRpFkyNeORLOd PH7Ir+H400w54Us2EAfeyXYLWnMzodRDdJ5YKdpe4DK9K6ClLoFOWy+4WsXgTA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637520494; a=rsa-sha256; cv=none; b=Q69iJI/BfiqAJZUpsSzPlt7aEQ9OEhXIWhpkKpIbAzc1Tpb7WBucXGV+t0Lhv6hxIpITFJ xXKYajtAoiSUr5CsgNi7j8v1zDgKqxRxIoyHMIXkMCqsXu2ML4A+Vys38arNXYW0YB/nJt NGCafk58CnY+ZenBjmRScFLwwobTfQysBSGvgY2ouCntrybl1vROjDWmU6CA8YDtN2gKen tIV02RXBP8xCeYRGUmMG1WXR5cl9nr06PTTDog750/Du85OBho+5OT3kVmGqzBUopmTwhb pw8kypuG76crwOrvVFhrig21RBsXed/zVr8/EWRAgtA6OYNHkqndG8QO85dYew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hDcoaa+B; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.08 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hDcoaa+B; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6DC87C1F1 X-Spam-Score: -4.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: NM2lpFmJgnrU --=-=-= Content-Type: text/plain Hello, This is a very small patch that I believe fixes a previous, incorrect fix for computing the window text area when line numbers are present. The previous fix seemed to assume that display-line-numbers-width being nil meant that this means line numbers are not present. However, it can also mean (as described in the variable documentation) that the line number width is computed dynamically. Thanks Matt --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org.el-Fix-inline-image-width-calculation-when-line-.patch >From 5faaf45bf54c0cd3135b9c5a747c22797fe1d290 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 21 Nov 2021 10:30:30 -0800 Subject: [PATCH] org.el: Fix inline image width calculation when line numbers present * lisp/org.el (org-display-inline-image--width): When display-line-numbers-width is nil, the width is computed dynamically. This does not mean that the line number width is necessarily 0. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index eeefb4af3..331bd9f65 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16880,7 +16880,7 @@ buffer boundaries with possible narrowing." (/ (or (and (bound-and-true-p visual-fill-column-mode) (or visual-fill-column-width auto-fill-function)) (when auto-fill-function fill-column) - (- (window-text-width) (or display-line-numbers-width 0))) + (- (window-text-width) (line-number-display-width))) (float (window-total-width))))) width))) ((numberp org-image-actual-width) -- 2.31.1 --=-=-=--