From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qByhMO63u2LbMwAAbAwnHQ (envelope-from ) for ; Wed, 29 Jun 2022 04:24:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SKt3MO63u2KeVQEAauVa8A (envelope-from ) for ; Wed, 29 Jun 2022 04:24:46 +0200 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 6F8E914F06 for ; Wed, 29 Jun 2022 04:24:46 +0200 (CEST) Received: from localhost ([::1]:58768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o6NNj-00050H-FQ for larch@yhetil.org; Tue, 28 Jun 2022 22:24:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6NMG-0004RU-Gl for emacs-orgmode@gnu.org; Tue, 28 Jun 2022 22:23:12 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:38457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o6NMF-0005HW-0K for emacs-orgmode@gnu.org; Tue, 28 Jun 2022 22:23:12 -0400 Received: by mail-pl1-x62a.google.com with SMTP id m14so12751530plg.5 for ; Tue, 28 Jun 2022 19:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=ZbbQZyD9tK+OjEnLronqRM3j8PAyWIA3pdGS89OYX5Q=; b=lj6pHt1G1xH3jCSXaOE/Eganabazmhpp5T+FZE00ayJyJP3CYfy5thkXmLBP6zJl+z CdE46ZWUXw6jNrAinPtyL5f3ND+dLDuuOhsV6HS9h0n6ewJtojidTESxy5zHNwloaeAK vsOl3wLa5dbcPjS68rgG/YnAkTozDavrtfmLzgtXtFr0zuqdELOzn/sHMft+grtbnkG3 fH7KgkzbebImIxEYsxnA/dIgzU08eBW0wVx9oLYmJcjS+E2hwq5rSDQfDKOZSwaREhbq GlKGUYt0fxGB3Qw/2t/fPlQ3XNg+om1THXpMqsfJVX/peadP59V8uNCpIPw1LTvyvsLI R9gg== 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:in-reply-to:references:date :message-id:mime-version; bh=ZbbQZyD9tK+OjEnLronqRM3j8PAyWIA3pdGS89OYX5Q=; b=XrcP78rPX0iHPzfTcprGgXgkkKyNQcAmnXDb/vkboPUcPMK/JbLg4qAQS3rBtFLO4e r+AefqGi16zVQOIRMBqkGjak2s7kY0/VIHWGWtgp47oCMgg6AyI2qnyhlxe41UQ6os1d Wx01QzmzaImZEVGv2VMqbsDfv2tbgzBl1DiVyyKXNVN0zH4uy9w2qhCJXLANzrc49O+y RrLl8+aG9zljl3IH+yWG+Zj1axdaM9fRFPYWPWFraPcy6GlTkGrPc47p97bvE8hsdpGq puydJhy2oEoD7+IeqaTOZvkl+9HB9XWt0hXKhCIipBFziNrzDmgc+KR9YB9C7+aXb0Fm pJTw== X-Gm-Message-State: AJIora8JxRzPMj4Yw+J7gEMJreF39/jtz8O7J+7/bKWJumJKAIUqJvJ/ Hb5kKfJl25k7LsXO170WnLk= X-Google-Smtp-Source: AGRyM1t7FLidgvrmDldLKF26Ithz6+z+NikKpj3lLU8kq0Hwo0eye+nQ1zrhknfNAQ6htFIWKwBb8g== X-Received: by 2002:a17:902:f78b:b0:16a:4ad:f359 with SMTP id q11-20020a170902f78b00b0016a04adf359mr8192393pln.99.1656469389405; Tue, 28 Jun 2022 19:23:09 -0700 (PDT) Received: from localhost ([155.94.207.39]) by smtp.gmail.com with ESMTPSA id x1-20020a17090a6b4100b001eca8d0b104sm602798pjl.57.2022.06.28.19.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 19:23:08 -0700 (PDT) From: Ihor Radchenko To: Matt Huszagh , Timothy Cc: Emacs-Orgmode Subject: Re: [PATCH] Fix caption format for custom latex src block In-Reply-To: <87zghxtor2.fsf@gmail.com> References: <871qvrrjh6.fsf@localhost> <87zghxtor2.fsf@gmail.com> Date: Wed, 29 Jun 2022 10:24:17 +0800 Message-ID: <87edz8ky0e.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656469486; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZbbQZyD9tK+OjEnLronqRM3j8PAyWIA3pdGS89OYX5Q=; b=MdX/Ag9DAtSu5gdB6GGjZEIZGszLrmIjblOxn7M/E4MQ4d86bhIgOKlv1BLEdq+uDuU7BL k+evU4tf0wKSdWFZD9I9ysOVO74ygkqeyQeoFGAUYlsxlJ5DmUPiuYZtud+zVCkQjh/XaD 0lA7S3GQcrvGE7uZM8ZLQcB56iTY/TYyL5+vQXnq346lmPCS1a5qkTc0CPOVk029E7AQIQ 7N0aYegogBtIejZCXUjWm8UqmS5w19G6j+Hyyjiu/7K2a8d/PyF8hKELaCKJ1o5M4UrEMX td3qPlNBvgKY4EWI02VyjJFxpvYzgOuOeOKKPpJdmUWpVjegohsQ/2/TwHGh6Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656469486; a=rsa-sha256; cv=none; b=S4dq8EzmiLtpcnZBQMk6tp0ohe+dXpwi43Id3vZR3Swvs3+6LsZmMVW2KvtDhj2k7bRgEo WCbF6Gf04adiMfTYRJokkWP771yPHADE4qnoOwaOTpCuMDE1PNDgcGVbxOoa9pABoBCJWS Z/nO+D19+y/8Tkh7rJIeld4gJu2KkAIAsQPy5lw/ZznxgRwx4JZWAsoRc/qZmd348JRS+v oHZ6l0ROES777ggKx3T7eM6rE4crZ36ZK1Wokx+ejWlIsDOUiEjKLh8h5ZKv7SjfEo4grU pR/lOmTdeCJsaoCeNJasdNW7IUVQFe+e+1VqUq/Ieo1setzV5YtPirIJF2oUhQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=lj6pHt1G; 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: -8.76 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=lj6pHt1G; 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: 6F8E914F06 X-Spam-Score: -8.76 X-Migadu-Scanner: scn0.migadu.com X-TUID: MD+wCuOaHa3S Matt Huszagh writes: > Ihor Radchenko writes: > >> I think that it will be better if you use >> org-latex--caption/label-string instead. It will take care about short >> captions as well. > > Changing this to (?c . ,caption-str) yields for the original example > > \caption{\caption{Perform inter-sample interpolation.} > } > > I could use substring to remove the leading \caption{ and trailing > }. What do you think? Removing caption does not sound reliable. Also, you need to update the patch according to recent commit by Timothy. Timothy, looking at the new implementation of org-latex-src-block, I do not see custom-env being passed as an argument of org-latex-src-block--custom. This is likely a bug. Best, Ihor