From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OMsXA7Yh22BUKgEAgWs5BA (envelope-from ) for ; Tue, 29 Jun 2021 15:35:50 +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 4AZ1OrUh22A4TQAAB5/wlQ (envelope-from ) for ; Tue, 29 Jun 2021 13:35:49 +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 78D7720B17 for ; Tue, 29 Jun 2021 15:35:49 +0200 (CEST) Received: from localhost ([::1]:35618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyDu0-0003vi-8U for larch@yhetil.org; Tue, 29 Jun 2021 09:35:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyDt9-0003te-TE for emacs-orgmode@gnu.org; Tue, 29 Jun 2021 09:34:55 -0400 Received: from mout01.posteo.de ([185.67.36.65]:53907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyDt7-00018x-SC for emacs-orgmode@gnu.org; Tue, 29 Jun 2021 09:34:55 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7D74D240029 for ; Tue, 29 Jun 2021 15:34:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1624973690; bh=k6Rs/kT3//x0gxxnfJpmRqjSe7xlWlhYKii5IGPpoYc=; h=From:To:Cc:Subject:Date:From; b=JihK0l35AehkyzpLi+WXmAjzOa/zcFur9iuyJm8BSzEu3s2YbGeKD867PrIl0mOuv Egl3ChaXpQa/QM8gncY7MyUSi9hhiWTkSsJx1fxvJOo8Cn2W120gSbhjxRTyWcEGLm 4f0DwldI2yfmQfzPMamK/IUf9dZBPmd9FEDjeefG66+EieiyubR3q/7fiEVp2Dbal0 20YjEToDa7YIZkJxPu3qXypPwVImJYZL1+3VNhsjrZ99zvpWM1qWXx205FND+3yUkz kQzbgihG/h+Hu+QH/kIn4DPJyUeCePs0mDwd2ulHfjqVtoTQlBvzKq+4kMn1N/wnrx I/wBMNI6HfBzQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GDlp15pgpz9rxY; Tue, 29 Jun 2021 15:34:49 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Rodrigo Morales Subject: Re: Virtually prefix headlines according to content References: <87v95wq5e9.fsf@gmail.com> Date: Tue, 29 Jun 2021 13:34:48 +0000 In-Reply-To: <87v95wq5e9.fsf@gmail.com> (Rodrigo Morales's message of "Tue, 29 Jun 2021 06:25:34 -0500") Message-ID: <87bl7okd53.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode 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=1624973749; 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=o5YGK6M9Xz6xCdq+ajrt1VtQQBkZ+OSvLLbadFb1Cfo=; b=is9CDd/LBtFmB6AuSq1o5r5hjKuDBfsRLTSXZSMluxf74zBSt3ofuAgUmQISfV65KXy4Ay ueim3vVfdVM1U8ia1cjzKLXwupPSeBrVPIn+4JCp/GOnCEf3b5VoGMM8cVI/AmFt1EUBgI Yx7KjxFaDSruNa8iRTgV4s2acXvqQ5y5MER9jKn5chXM8VGHRlJcPYfe5s3gA5HOkSNfJ9 LscXsE9v9aPrZurQgMe6Thcuts2F39pk7z3zIs98RfbglTFeqS6kvCvXm+JZVU7qbI5t2/ 3EQu+/Vae9SHRUTs8VcTGy5yrYaGSC/ONcQClLZ5ljgb082IQcWnEeenFn+w4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624973749; a=rsa-sha256; cv=none; b=tbrcCvABQtIM/w6NNATRyBY+P/AGL/DpfZqlOS1nageu45DtnMRDcxjxuVPwRT8K0A//jN aWDw73xzSNxl5ZGb7uTNf0S3xRYwFO04752BQ7WapS1/8KImlnwy7q/HQhVzvWer8A6bo8 srRTeRrYmE3uWjmQqVps/akxXaPrtuBIYNylLDZOllWnYQGowBkiBpo3qfy7Q9opaKu9eH PCssoPKesBMaGgm32rdm9NmsYrXjXQv1FfhpMHKDGk9sDLaDE6bBnYhaZTP0WwIhkF/nyh brWISSTGY6/Bv11fVULquuvOV8WwuQR4faqp2qaXNWlr86/vlnjHpUupY79BPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JihK0l35; 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.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JihK0l35; dmarc=pass (policy=none) header.from=posteo.net; 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: 78D7720B17 X-Spam-Score: -3.12 X-Migadu-Scanner: scn1.migadu.com X-TUID: z5M0G5Kp+Tdg Rodrigo Morales writes: > What I would like to know is whether it is possible to format a headline > by taking into consideration the properties it has. For example, in this > specific scenario, I would like to make all headlines that have a > "GITHUB" to show "GH" before the actual headline (the content would look > like this). You can define a function with `org-map-entries' that adds (for example) a tag :github: to all headers with the property GITHUB: #+begin_src emacs-lisp (defun add-github-tag () (interactive) (org-map-entries (lambda () (save-restriction (save-excursion (org-narrow-to-subtree) (goto-char (point-min)) (end-of-line) (insert " :github:")))) "+GITHUB={.+}")) (add-hook 'org-mode-hook #'add-github-tag) #+end_src Best regards, Juan Manuel