From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id GNb9MYvVW2cpVQAA62LTzQ:P1 (envelope-from ) for ; Fri, 13 Dec 2024 06:34:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id GNb9MYvVW2cpVQAA62LTzQ (envelope-from ) for ; Fri, 13 Dec 2024 07:34:51 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=bbt4iep2; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734071691; a=rsa-sha256; cv=none; b=uJkVM009bwC85rKQRS9EkwmMYQbjovQV6vYWvyT+veV9b8yPIYUEeWf6n9dq62c2WvZ7Wh c6/gHDGewNWR4T9LfM7ZmVGZSehz4X2SV911hxMLUnAlWo3zQpRo4DjYwLc6F/V2knhQUo 56t0VAyH2yNI+XfRo4MjsPmydB+BVWb97R2NcYJn2ujQm7eJSJZLZY5DoNttITVH1+lMfA XNA7YPhKYiHfCgFdwiGPqkzWFxsVvKAOfX5JqPH5iz6LBKReoY84/aoh+Jn/N7x8wCqgK8 fRZNi2rVtIoaMeRZcvfK6OW6DwmjiunlDWFVv44o2Riy+yD5DhzPueKQnjH1PQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=bbt4iep2; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734071691; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=0+gu4m6povs8FBdbqQfFDjDBmNqVzyPo8AeqrKed2Q4=; b=oJaEktVTn36RKwINOxk7G2EVzduw7eceDOU4iPMVczzW6lKOGF/k4X4ItpY7AOUlb3v7XM A+h8a/C7hgU6lZkwviwptqpE7QAdasWsJxLIrEr8KKZS7QRZj2oACRVxsBRVifBC/hR0d3 d6JV+l8ePA/BHZbKNXBtj2TbtshQL72QDDIv1wlnmxvKnSzWMzpmUXS4Mb2WVai+u2fPls WR3vL91LgbsK/eePc3OHexRc8Nqo3N9P5dzleJgc9HNxq7/xdbUSfaU0YHwuWukYuA929y Xl6Sss/otNVvxMVqYlSiStNbPCwubIIfbH1frKADC/E1aIuNX1LmRT5wqIcXqg== 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 A058C533AB for ; Fri, 13 Dec 2024 07:34:51 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLzFJ-0003dy-IA; Fri, 13 Dec 2024 01:33:53 -0500 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 1tLzFC-0003dZ-R7 for emacs-orgmode@gnu.org; Fri, 13 Dec 2024 01:33:47 -0500 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLzFA-0008Oy-2S for emacs-orgmode@gnu.org; Fri, 13 Dec 2024 01:33:46 -0500 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-2ef28f07dbaso1006010a91.2 for ; Thu, 12 Dec 2024 22:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734071622; x=1734676422; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=0+gu4m6povs8FBdbqQfFDjDBmNqVzyPo8AeqrKed2Q4=; b=bbt4iep2GuKUd1Y1DKUVaL2qbGuVo4UCwk0oySSybL1vE5pWN3+RG8PBqwULPS1agE E+f49eb8Kbu/UOfDwm9WB/j4MlOLsZMa1lvKoYGL/kP8T8LKKlJ8gdOWg5EI4sI+Bus4 Pm0CDnMAiprJX+4NK0AN6BzczUGEu8NcjZvyp0LF/AdYV7xSprbkNaSbpd9ICDzabbWJ c26O0FfAeP7oGMFC8uHF9JAPUcWrxHECZ0BXfHKfQETth1qlN8thXufS2xBEPF1hgC0j GMY1K+kTkcQkyx0k9c3SdVcPfen1QUwrSdUAXtT5JgZji/1SN2xw7cC1YVEO6YhtwCoJ 2aXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734071622; x=1734676422; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0+gu4m6povs8FBdbqQfFDjDBmNqVzyPo8AeqrKed2Q4=; b=TabtP7o6VUUNpkCYMafolIsACMOm4rw7wdlxdE5BoeE/oYDCk5ngVMaIuq2Qzjd2cr 1vRKp75G3s/bzPMJj0xC8BBJmEjCvVWuYPmusI6v4GNUIgqly7WLqr4RkCzx3CvCWTmh 15l2spXvB4XK9ZAGSkW9w/TABOuvdWNwBBNw8Qp+Jcm4CuRY+V8ndjkF4wnnRinVKdBY bd3pFwbEHpJQ2+7yQ49eSJgKxWwyCCFXksx6wytizBBDhhGIjcSvesBWhqGoKgwGDnw/ OEO8BzEHeI1Dj0LR6uG+0cMcmTbNT5A8emjXNVb7/BKlKliTNgwLb/qkix0fYEcxbloN pUkA== X-Gm-Message-State: AOJu0Yxsi9ROJ/ktrVVk4bJ8woyK5Dhe22sSv8ftPOBdWR1C8whq3fJG LPIsX39Jsy892o5tItqNyOfwBTZOWM5CvclDBXxpIXrABrYe44UTU4Q9Hw== X-Gm-Gg: ASbGncvceZTIJGOz5ZWgQiNKqnb7wXPS4y9J98l+S6wJS+Zfq04M66fRV304XWiPnYQ adi5PRaK2YQPwRTzZxV5esxZI+h1P5hYWSqbz2jkp6uQLMjFRESLa4sTS348kenyljOf+92Lmy4 Dyqjhj4Apiy8KK6wFDTdju/vYzJJY+R7EtxXbHGoDGiMvDq99KVyzX87OxK9qL/IxqJmIs7D6Ig zDOhzVOB6TH24n5eLBkcG55KkllMXsY7/I+t1AiJ9OMdZpmW611sPmnf1wOhe1bUYtQsw== X-Google-Smtp-Source: AGHT+IHTXvskRHA7gb7PAQsTM+n+Db/eJte2b43OT8mPbeQzanHraEpw03gOP5gcxe6k2Yupf5xkwQ== X-Received: by 2002:a17:90b:4f:b0:2ef:e0bb:1ef2 with SMTP id 98e67ed59e1d1-2f28fd6b782mr2425470a91.19.1734071621461; Thu, 12 Dec 2024 22:33:41 -0800 (PST) Received: from localhost ([2600:8802:5726:2500:745d:a2d5:d9d4:8a2d]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f142d919f6sm2401582a91.6.2024.12.12.22.33.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 22:33:40 -0800 (PST) From: Karthik Chikmagalur To: emacs-orgmode@gnu.org Subject: [PATCH v1] Handle image width specification in pixels correctly Date: Thu, 12 Dec 2024 22:33:39 -0800 Message-ID: <87wmg4148s.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=karthikchikmagalur@gmail.com; helo=mail-pj1-x1029.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: A058C533AB X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -9.41 X-Spam-Score: -9.41 X-TUID: BTWI4csEOJ/3 --=-=-= Content-Type: text/plain The attached patch restores the ability to specify preview image widths using the "px" specification, such as #+attr_org: :width 300px This behavior was lost during the refactoring in 50be048ad0cbe0e9150ca2351b894b041ae7cf49. Karthik --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-ol-Respect-pixel-image-width-specification.patch >From 9d9532633a2e1f7391ba2e02f295c6250d13f5cc Mon Sep 17 00:00:00 2001 From: Karthik Chikmagalur Date: Thu, 12 Dec 2024 22:24:01 -0800 Subject: [PATCH] ol: Respect pixel image width specification * lisp/ol.el (org-display-inline-image--width): Ensure that image widths specified with the "px" suffix in #+attr_* keywords are respected when previewing images. Example: #+attr_org: 300px --- lisp/ol.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ol.el b/lisp/ol.el index 032610bad..6640bb951 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -1103,7 +1103,7 @@ (defun org-display-inline-image--width (link) ;; Number of pixels ;; must be a lone number, not ;; things like 4in - (seq (1+ (in "0-9")) eos) + (seq (1+ (in "0-9")) (? "px") eos) ;; Numbers ending with % (seq (1+ (in "0-9.")) (group-n 1 "%")) ;; Fractions -- 2.47.0 --=-=-=--