From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2N2QDgp1i2ANUAEAgWs5BA (envelope-from ) for ; Fri, 30 Apr 2021 05:10:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8GZTCgp1i2ClfAAAB5/wlQ (envelope-from ) for ; Fri, 30 Apr 2021 03:10:02 +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 7D8C710E3E for ; Fri, 30 Apr 2021 05:10:01 +0200 (CEST) Received: from localhost ([::1]:41970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcJXT-0003pC-BY for larch@yhetil.org; Thu, 29 Apr 2021 23:09:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcJH2-0002h0-Go for emacs-orgmode@gnu.org; Thu, 29 Apr 2021 22:53:00 -0400 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]:39894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcJH0-0006ry-QQ for emacs-orgmode@gnu.org; Thu, 29 Apr 2021 22:53:00 -0400 Received: by mail-ot1-x32f.google.com with SMTP id 65-20020a9d03470000b02902808b4aec6dso58487998otv.6 for ; Thu, 29 Apr 2021 19:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=dTYZiSdPDQMApld4piEJPJ6JPooi3w105zRkYTxDe1U=; b=LS3TbuC9N9RuJfxrkyPLvSafeEasimdND7U5xPeRLYSskwl3tRLV7Oyco11FujVE4F Xl6RssHzTqrz1svoyCEtUVgvJtQswGGD6702jXcm6drGvC9uGTLrD80I8vVc+K3xpkhO weFklgTLDDLhLqEGAZjNhd7V+1dF0OFFWqHQQI6+cVuLxA3No5T5A3bSWZuih5xGarDM JkMs31rhR2zq3PRbqrQl9P5OcqmXQL3SW+7XGk3Q+IJbQYsWarL2IIUuWOasnEeIlKiZ ENV7aQDfjpJ5owxSt57KJVwVTwsHjeErfq0dAL5DS09VVOMx2PGKvulgsWwRohINQtdB HXLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=dTYZiSdPDQMApld4piEJPJ6JPooi3w105zRkYTxDe1U=; b=BxmuhAhSUFL6G61wJaMloCH7ZLl2dHUGnGAzGrjAjAdBVVGI533fqKdL3DRPKuP1Lo JQTpNCLyXWo1egw7gCE4hV0NeOvmshRpVsHCFoDQY2k+anYyDEGf5BAD4j5pGLYxKz0n EWIR6gDJJ4y4f3KX3MEBNeYXpiqKmURfUhohzYAyn9j6wPAMlhpLnpIwe9ChD2mLoSsy BhhBLz4xUzxhZQ11DTbmKrJM18a6LPnjnFPvbgon4vFtISzW6rdp9CfBD+3vzlZw+u4V NmVcn8xe6c5ZmbdroFw+gB33da77BAHusvq5lu7G9sGag7ctKxilJdwPjYq5nj+wyB2R 6Erg== X-Gm-Message-State: AOAM531UKCi0xewG0DhRFOHhl3DrC2YeQvszzPZbWp2qMhdugbmyyPIB wqZ4/gxt3ed1hQxKTpctkTIn6Hfs1PE= X-Google-Smtp-Source: ABdhPJxVKV4EKTMx/v55KTkyFLvMzQljghphtFUmXab9A7smWuoVj7naUJ8UKNSZSNj9dRZv9hzNfw== X-Received: by 2002:a05:6830:119:: with SMTP id i25mr1923935otp.39.1619751176267; Thu, 29 Apr 2021 19:52:56 -0700 (PDT) Received: from pbcdesktop (189-210-115-154.static.axtel.net. [189.210.115.154]) by smtp.gmail.com with ESMTPSA id q130sm452266oif.40.2021.04.29.19.52.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Apr 2021 19:52:55 -0700 (PDT) User-agent: mu4e 1.4.15; emacs 27.2 From: Pablo Barraza Cornejo To: emacs-orgmode@gnu.org Subject: [PATCH] Fix numbering of captioned images Date: Thu, 29 Apr 2021 20:52:53 -0600 Message-ID: <87mttgiiuy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::32f; envelope-from=pbarrazacornejo@gmail.com; helo=mail-ot1-x32f.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-Mailman-Approved-At: Thu, 29 Apr 2021 23:09:35 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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=1619752202; 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=dTYZiSdPDQMApld4piEJPJ6JPooi3w105zRkYTxDe1U=; b=XF+ntj107sdonTV7k7aHTQvgcP826P8bBc/fD0Z+MSYmVOSdTy3t/l5frZRJZzysqaJFHQ n7yWxMeqnMg0OA7YqO5kpgkU3HP7lyuSOX4va1ol0oGg/BYJZ7V+I6U+uzqMpx45xiRgzQ idTQ4NsBApfEPaRjA9QSD/X2eGfPtHhRL1Z9nXnpOGbcAAQaK9+FX/oRf2UE66NyAPcLS+ ooSjwfOEjbNCKnLsCJr9e2auSpJ+oJACn4i+F0uItoy+yaPlb35uLgv5lRixdU0690XncQ 5Xc6UJqr8yg9dEAS+lSoQB1670Hf1W2GtjtHOX/Jf44vh5SjsQDvyUNIDKWKiQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619752202; a=rsa-sha256; cv=none; b=hl4/7llJ2iCc/FOQi+rvld8ST0hJecYzf9mg/5UpL1ClE+8fMMdU0BvrNNptPAZagFIm24 YQSpgAmaNxzBK6nHKd+HnTTz2pYG4iC6puoTwLD4M85Oy/8ElMzk1Zy+w2KqzEivOP8Xjx w981O4T8M7XJpl10msIINEXBt1JzR08m/bhwTTwF3Tw0vix8F27SZsYqA6vtjvqEFqWm1F pOtSS6no4qX5uPfppi2uouLIbLSWbNAaGwG8gwJ4uZN8Sh2TT5mO1BCQjScpbQaP43a0eJ PA8D0vdSwhzt8oaXQJj/ZiXC3WEfMAYA8rH2ZmvTgguCiDmOpDa6h9/m+CIUsg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LS3TbuC9; 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: -3.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LS3TbuC9; 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: 7D8C710E3E X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: FfupPKL6iTe3 --=-=-= Content-Type: text/plain; format=flowed When exporting to HTML, the exporter is supposed to check if there are additional constraints over a paragraph using `org-html-standalone-image-predicate'. A misplaced quote causes `org-html-standalone-image-p' to not apply them. To number captions on images the `org-html-paragraph' binds `org-html-standalone-image-predicate' to `org-html--has-caption-p', but since it gets ignored, `org-export-get-ordinal' considers all standalone images, not just captioned ones. This throws off the numbering. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-ox-html.el-inline-image-export-Fix-caption-numbering.patch >From 85e0b2da37f914458d71bd3a5797298ca3a4e0ce Mon Sep 17 00:00:00 2001 From: Pablo Barraza Cornejo Date: Thu, 29 Apr 2021 20:15:08 -0600 Subject: [PATCH] ox-html.el/inline-image export: Fix caption numbering. * lisp/ox-html.el (org-html-standalone-image-p): Remove quote which causes `org-html-standalone-image-p' to not check if `org-html-standalone-image-predicate' is bound. TINYCHANGE --- lisp/ox-html.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 47122314c..df270b22b 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -3039,7 +3039,7 @@ images, set it to: (`paragraph element) (`link (org-export-get-parent element))))) (and (eq (org-element-type paragraph) 'paragraph) - (or (not (fboundp 'org-html-standalone-image-predicate)) + (or (not (fboundp org-html-standalone-image-predicate)) (funcall org-html-standalone-image-predicate paragraph)) (catch 'exit (let ((link-count 0)) -- 2.31.1 --=-=-=--