From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iJg6BHCZmmGhAAEAgWs5BA (envelope-from ) for ; Sun, 21 Nov 2021 20:09:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2GB8O2+ZmmGjOAAA1q6Kng (envelope-from ) for ; Sun, 21 Nov 2021 19:09:35 +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 AD6EBC831 for ; Sun, 21 Nov 2021 20:09:35 +0100 (CET) Received: from localhost ([::1]:32876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mosDW-0001Zu-Um for larch@yhetil.org; Sun, 21 Nov 2021 14:09:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mosCz-0001ZW-Iy for emacs-orgmode@gnu.org; Sun, 21 Nov 2021 14:09:02 -0500 Received: from [2607:f8b0:4864:20::1036] (port=42900 helo=mail-pj1-x1036.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mosCx-0000xu-FZ for emacs-orgmode@gnu.org; Sun, 21 Nov 2021 14:09:01 -0500 Received: by mail-pj1-x1036.google.com with SMTP id fv9-20020a17090b0e8900b001a6a5ab1392so13367838pjb.1 for ; Sun, 21 Nov 2021 11:08:59 -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=EPtNeWhxZslkd4q9Zq9pDDzLWTsYze1pzhpOPVoXIpk=; b=OlS8L1SP+IVDAWslJgCz9f/AUBe4NZeAo1kvwW06tOpdhUc582/SRk2hlVQIAdmW76 QUFYtqcBlK3ANZ+Nrte4XgmdDqCZgVbQtFJcV+aK+aeZKOMGg0M6qcG3xEOtuR9n/tXI ac0gmyG++vO/aVnVeEUKWJtQQysb+IP1rGQwxjwGbbW2Y+U+OVMjOPsVsloptq8xDRRt 3Yg4wivgDdYenMsBkpcRhxzYQRjjnDW37upM28otut9nEnxB5Zp1nfcmSBdcjpjHMQOU j/OAYYkwR7Qut1eM8RURYdot5hkI7eyU03EKuuvUGXeZQ7MoW4ZSwLkhLWv8gCvm2eIB 3Iag== 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=EPtNeWhxZslkd4q9Zq9pDDzLWTsYze1pzhpOPVoXIpk=; b=e/xvjqbYHe7skq8dNbeMtQsgl4S4GuBDwReTcUTQSGhHkHZMy1ZG/COf0mo1vWAbBE 7LS2c3gUAwVSDcrM9BYRB8Xn1z998mDIVTNMDq/cEEoQxY+y0xEQxwc+8903ZQ7WgTDs sixwxepUqrUYW+97rtYGgSBTO376e9xvyh7V3VQtLVX9893CML9NVcN5eTOGpVvLW2Vz a9pFxZ4Kz0v35ZN5oaszTGhETIfushn21My9R+3DUSyCB15pbMJJ6A6QuY117DOOSAzf Q69kyHsGO3buGDItTU6P9BCH1yFjVCtZsiPSbspx8lRHv90EKNz1a/08J3Sg48SpouLJ 5hXg== X-Gm-Message-State: AOAM532BjJPBU3C5aafqJp1ClPvq5nYsIVFsZS2j1OTgqEv7Ce5T5iCU rH65VSe7KFcHsd8Wh0LNb7A7gLQRD4M= X-Google-Smtp-Source: ABdhPJxwqz4EHCDmMLRO8hbu5ZKgaPWFdHLHVplcDWhy8BXrjr+76H9kuNaXhbrNjWMt4a/91miEcg== X-Received: by 2002:a17:902:b084:b0:141:f5f8:1c5a with SMTP id p4-20020a170902b08400b00141f5f81c5amr100323209plr.40.1637521736613; Sun, 21 Nov 2021 11:08:56 -0800 (PST) Received: from ryzen3950 (c-208-82-98-189.rev.sailinternet.net. [208.82.98.189]) by smtp.gmail.com with ESMTPSA id c17sm4279376pgw.83.2021.11.21.11.08.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 11:08:55 -0800 (PST) From: Matt Huszagh To: "emacs-orgmode@gnu.org" Cc: Subject: [PATCH] Fix regex for determining image width from attribute Date: Sun, 21 Nov 2021 11:08:54 -0800 Message-ID: <87czmtuy0p.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::1036 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=huszaghmatt@gmail.com; helo=mail-pj1-x1036.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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637521775; 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=EPtNeWhxZslkd4q9Zq9pDDzLWTsYze1pzhpOPVoXIpk=; b=hKXvEEANOEdwv1PNwfRY4Qr1r/Jb+cCIRZU+U0NAXCPgZ78FOlq+Q/KggU6TkAZzlPrmS8 mlD5biL0jyXBoFEyI7+0WjrsKd+nIOd0KzJcCsFHq+BufNSPHLs+mNsAaxZOGjunk0xcY8 5XRggP3lG7jm0UNN5VIw8y0o4AA+CHeZiBhsFdVok8gU8GCbeJhhI2rv6k9mGNUOPK7BOk 32JV8SeIP7WTD+xL+V3S9WvjWqqpPH+wJYDgh/1yMgMjcuC+C1uXKVR1aLmlUwVRsBXhsQ vx1XeukA3K3eF7nXYoOSKou8h1cX4izzypjyocQN0MuW4kGcACvUl9w7+RKNPg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637521775; a=rsa-sha256; cv=none; b=n0vF+wRvIZr5tctgyCPvwhSkPUeLzgOZVEcWqcyXkjRMUuBjFW9e505xTPizfLbRSmbAvS 9WVV27LB/AMsF6472H1IDIkh9W4SQYPwAQBZEB7VVwdfUziH2W+5voeKBjGV+FXKXcl76q 7pbE4A8Rv/8S8QtfBQoB0ekPrty+x4hJFlukO3SR+1TIQnTIa7GYCIyaR65vSJzMTCi2dx n+jCNRjb88nc0BR+APvQHjzZGKd9LufLXZ33tRjqlHrpr4elycMS44brlE0ehtvky7294a HlsAig+JjhomXPbdufns4xvlBOr359gUmO4aGMvzjQA5UkLnvXEy0swSI02Yuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=OlS8L1SP; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -4.08 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=OlS8L1SP; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: AD6EBC831 X-Spam-Score: -4.08 X-Migadu-Scanner: scn1.migadu.com X-TUID: cDlPx2cQ4Dhy --=-=-= Content-Type: text/plain Hi, A recent patch started computing the inline image width from any attr_ line. This is incorrect, as it matches settings like attr_latex, or attr_html. We only want to look for settings specifically for the org buffer. This patch fixes that. Thanks Matt --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-org.el-Fix-regex-for-determining-image-width-fr.patch >From b9b8fb9b31dbb9145c2fe73af04eccd59f7a9973 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 21 Nov 2021 11:02:37 -0800 Subject: [PATCH] lisp/org.el: Fix regex for determining image width from attribute * lisp/org.el (org-display-inline-image--width): The regex should only match attr_org, not any attr_. This would match attributes set for all export backends, such as latex and HTML, which is incorrect. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index eeefb4af3..92e765373 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16853,7 +16853,7 @@ buffer boundaries with possible narrowing." ((listp org-image-actual-width) (let* ((case-fold-search t) (par (org-element-lineage link '(paragraph))) - (attr-re "^[ \t]*#\\+attr_.*?: +.*?:width +\\(\\S-+\\)") + (attr-re "^[ \t]*#\\+attr_org: +.*?:width +\\(\\S-+\\)") (par-end (org-element-property :post-affiliated par)) ;; Try to find an attribute providing a :width. (attr-width -- 2.31.1 --=-=-=--