From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WAopC9+6x2I3fgAAbAwnHQ (envelope-from ) for ; Fri, 08 Jul 2022 07:04:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8BAIC9+6x2LukwAA9RJhRA (envelope-from ) for ; Fri, 08 Jul 2022 07:04:31 +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 B860F28C0B for ; Fri, 8 Jul 2022 07:04:30 +0200 (CEST) Received: from localhost ([::1]:40186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9gAH-0002tD-C7 for larch@yhetil.org; Fri, 08 Jul 2022 01:04:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9g9I-0002t2-Ar for emacs-orgmode@gnu.org; Fri, 08 Jul 2022 01:03:28 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:45715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9g9G-0006ad-4h for emacs-orgmode@gnu.org; Fri, 08 Jul 2022 01:03:27 -0400 Received: by mail-pg1-x533.google.com with SMTP id 145so21415344pga.12 for ; Thu, 07 Jul 2022 22:03:24 -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=KJ4x25c/DlWdmCKpkgeYV4jkDa841/lzjy/tuIqa+iE=; b=bTo+zkY4I0+Mqtrb3ljUODwTEsIlhKg+QlbfWGHzexBNHuLceLttsIFgsw6SdRnD5i bBf835QMdyOo1G1NmuDApoe7cN5PyQnrIjxMQKLo0JmPzBZ7Z01JIFU1IA6c5x9p5KjO 82Gqj7eaxQbNea4QdB3t1A0K9o80szsDpXlSvS6u9DMAyoVaOy2ZL9srv5zkkOX3EW8p UFINEle9UcnHZiTFtoz3Ys6gRcFhB/yodSwExFOBhWXa4sLn5XqN5Pk2+k7Zld8ZuFAo IRNBWfvNLTTYi+8r9YuujkDzZuZss2LsYmcvQCY38hWAS1vz0dm6cOB3fDmgxfbO66iz fxBA== 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=KJ4x25c/DlWdmCKpkgeYV4jkDa841/lzjy/tuIqa+iE=; b=3B+c6VnueFJQ62JKUpP5hc4xGxQF52fO8Yk+OM8CqjexLFn3jN8/s1pqvvfPXStNpZ EcVf0pTekBwFeVglrHY2uUhuFfzlFMURQVQcFrDFOSC9+ZyyoFXBmcyjRW7+JoO699mf ktIfqAJME2iKvyJvqPvQy0RCSzLzeH4peHeLk1YKJFt4H0tmGmazvqzDwShnBjxjXMRh Nu9CvPPRWGxau0EnnhmoHhT/jKNg/RHHqN4LXJyg5KWcKgmYzEK9ljpmMANglr2UxkGd KYJW0B0L8uyeM56KYJKFOfX6aa4XuAvIqlCsUPeUZuyaaVoxYFy5QFhVCAzidEBfO85r ltLw== X-Gm-Message-State: AJIora9c10yuRRIaxGscv2r+c8F0h8ciBiTni3OwijlOfXfRp6L5SNwA j+ckQAFTd67oFaEoAWVAasw= X-Google-Smtp-Source: AGRyM1vpxkGgaBsGDRn1o4pNrHe+fqgZCLS4gM2BuwUIWMmfuIlYN4Hpe9h3Q72TWxp0Vu8mAr96kw== X-Received: by 2002:a63:7b5c:0:b0:40d:684:b760 with SMTP id k28-20020a637b5c000000b0040d0684b760mr1618097pgn.323.1657256603023; Thu, 07 Jul 2022 22:03:23 -0700 (PDT) Received: from localhost ([155.94.207.39]) by smtp.gmail.com with ESMTPSA id k23-20020a628417000000b005289fad1bbesm4344684pfd.94.2022.07.07.22.03.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 22:03:22 -0700 (PDT) From: Ihor Radchenko To: edgar@openmail.cc Cc: Org Mode List Subject: Re: Ignore, skip, omit headline when exporting to LaTeX In-Reply-To: <20220707200001.Horde.GlDjC8rChDMguFW-x0ZUKIp@www.vfemail.net> References: <20220707200001.Horde.GlDjC8rChDMguFW-x0ZUKIp@www.vfemail.net> Date: Fri, 08 Jul 2022 13:04:29 +0800 Message-ID: <87r12w2o0y.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=yantar92@gmail.com; helo=mail-pg1-x533.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=1657256670; 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=KJ4x25c/DlWdmCKpkgeYV4jkDa841/lzjy/tuIqa+iE=; b=HY/GeiZLEZ31cFp/ApfhlGaYKX7HxOvXtqWjKKBaIAlSON9xt2omVZN9L68SElwyB5VPGj ZJ3fMW/1vPo4Bbw4Lv74mhCnVYDj8NkH6Rmv/JD08d6dx6IHYiOONFdROsnaC7GWuAIpdZ hR+YuDDip2XPpRu1rmnCUUqirFH8VZbWzIc0bNW6DC7d6d2e5Tc9DyeZAE/hvidIx+11tC jUHLWW3HTxvSwwTlCemDlEngek+ymXvqgejwXozpybjh8G1M0Lrjy68QoyicxXxpQG1Fkn s/OS6VnrQYS0O1cnlaL/jFtPsKWtx7tMQBDuxxlhyy5gacT7CdryjUNXtX8UJQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657256670; a=rsa-sha256; cv=none; b=gvOQBL0I/AWAlTYRJCuf3MBb9lwf7cv+8A6tOH/rCeoMTazq03gWtxT8hSSn5gFXo0sOaT GlEnev7lJNM8GTmpg/4vEpXQZtCmTC6iJ+a3HvBZWS50koFzGmKnH4ZKqBD0G+seZ6ZnS1 RAxNnIt81Jo0NCfvhQp9G6kOVwedtfLDiayowAIOEoE4fg/eb5+Q4nhpQ5pAelXQsrPD0c qBLZU53M2udB0sP66IHzSF4I0TMysLtbSOLt0WFmgiXdBfbbZpYCf7/znpBZQmuZOjDV+k udDwUZFFpYAEXFBFhClbp/TbKg4eYbhvaQprjMXqgxEoRXCuAOvR0VuaQrVmxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=bTo+zkY4; 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.44 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=bTo+zkY4; 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: B860F28C0B X-Spam-Score: -8.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: J1JCElelDm+0 edgar@openmail.cc writes: > Firstly, do tell me if I am breaking the nettiquete. This is on topic and can be useful for others without knowing the context of the mentioned discussion. So, there should be no issue with posting this here, especially if you provide sufficient context. > I found someone asking online how to ignore a headline when exporting > to LaTeX. This e-mail is to avoid creating an account on that forum > and to provide a solution. > > (require 'ox-extra) > > (defun org-export-ignore-headlines-latex (data backend info) > "Hack of `org-export-ignore-headlines' for LaTeX: add a > conditional for the latex backend and replace 'ignore' with 'ignoreltx'" > (when (org-export-derived-backend-p backend 'latex) > (org-element-map data 'headline > (lambda (object) > (when (member "ignoreltx" (org-element-property :tags object)) > ... > (org-element-extract-element object))) > info nil) > data)) Note that this modified version of the function is derived from org-export-ignore-headlines from ox-extra.el [1] However, a part of the original function code is omitted. AFAIU, this version also discards the headline contents, in addition to the headline itself (unlike what org-export-ignore-headlines does). Note that discarding headline + contents is also supported using :NOEXPORT: tag. [1] https://git.sr.ht/~bzg/org-contrib Best, Ihor