From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UPR3EYKG22BWawAAgWs5BA (envelope-from ) for ; Tue, 29 Jun 2021 22:45:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SLMkDYKG22CxJgAAbx9fmQ (envelope-from ) for ; Tue, 29 Jun 2021 20:45:54 +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 763693431B for ; Tue, 29 Jun 2021 22:45:53 +0200 (CEST) Received: from localhost ([::1]:59664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyKcC-0005iY-FU for larch@yhetil.org; Tue, 29 Jun 2021 16:45:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyKbH-0005iB-4V for emacs-orgmode@gnu.org; Tue, 29 Jun 2021 16:44:55 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:40694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyKbC-0007N1-4g for emacs-orgmode@gnu.org; Tue, 29 Jun 2021 16:44:54 -0400 Received: by mail-lf1-x12f.google.com with SMTP id q18so678711lfc.7 for ; Tue, 29 Jun 2021 13:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=D++Q/aibcng51Mli75R1XpmXHDxcdYJBSbjhY6EtIug=; b=PCVotIACl5d7gZeDxt5+Vx/ndtJpwU40Zj4cqKijyhu7zUyO6BN+gu9gqTCRPFdHku 3uUpNvs7aaPgth22ahpKE78/hqbJu+hXCFfYRRocvL9vpfReodVX2srYoNH9z/cpnswq ovOxqLjx44UcTJftz1pnQ+h5Wc3AU8oKBzin5JJykHxWbPTbWldeoZsX1f5uFyqeI4By vkWydDL+eNcQPhQBf5y36snYTxABW24pHL8e6tv23KmpUr3V5IQ2F6iFDR+QmJP8wCAj bpwPijRxR8evLR/bzQ6Hrxq/SfxT/vxiJGy1RkoQIx/MkeN4XEf+7sd9H//qNITunVGs g2Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=D++Q/aibcng51Mli75R1XpmXHDxcdYJBSbjhY6EtIug=; b=HDiO6nfvQkMNhepGwTdXRA+CR+JnLCyer9P1nc308ZvWP4/7gzkt6lpRJTeO/ZDMK/ andqqMMRTL7O0h0A76KWqkv0Mur1mRvtA6xMAg/L0hXoovsv+W+TUUSNMBEDO6+xROK9 sMRirNk60LUPwX9KD2oI1yujUYuZUyPsle+z1O2uIGkYc8Bk/2/zcNk5fFra40AnvKyv mlzd0St3enLl9O4Hp2gV/m26Tf5L4Xj8NfXl6cbMtxTd+Uf1+ZFay5hO2uJmiq6vVtY7 0C50MJfIFR2127I4lOwK7fOsFYRywSZ5pHwlUHCd7eaB5n43Mmbj5e5WwW+CNKH9dx6s ouiA== X-Gm-Message-State: AOAM532AG2UmfuqAYaQo0Z9dFeMHurry+4Yq8PTL1QxV9+WN5WNcMeDB T7fnyhciG24qD4KMYESzJlI+W8yhXearaLgRL+4= X-Google-Smtp-Source: ABdhPJyKtElmRPsT1VMJ0EZw89G22+Znu8wy5HAUNv8C+LCNubaaOYmeMwBmyYPf/xPVcwm1waS1wzVCNJNiQ+khXEE= X-Received: by 2002:ac2:4ecb:: with SMTP id p11mr14891140lfr.140.1624999487599; Tue, 29 Jun 2021 13:44:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:5192:0:0:0:0:0 with HTTP; Tue, 29 Jun 2021 13:44:47 -0700 (PDT) In-Reply-To: References: <87v95wq5e9.fsf@gmail.com> <87bl7okd53.fsf@posteo.net> From: Samuel Wales Date: Tue, 29 Jun 2021 13:44:47 -0700 Message-ID: Subject: Re: Virtually prefix headlines according to content To: John Kitchin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=samologist@gmail.com; helo=mail-lf1-x12f.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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?Q?Juan_Manuel_Mac=C3=ADas?= , Rodrigo Morales , 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=1624999553; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=D++Q/aibcng51Mli75R1XpmXHDxcdYJBSbjhY6EtIug=; b=fuLMvUScAdQ+K82Va8yavFb9DSitoqy7o2cdzULUhOxdhAKLL+vSWt0iNSarqd0GPhkyd5 BLWLbGVqE5AgNmvCv9KRwm0e1wfQQ0PzBCOmjT6qHHWcsWaJNvKONLB4e3z2CgF/7eU+h7 o6I3ugWBsCVBR1Em1OiMEtyJApYG+jSMobgdW56cHD5Ae6eao3eI35YPNtarflGJr+WKYp UbyskIvMstTsWRRfhqiLgAwC1A7t6r1BuAhIZMf3DNfw3LwunG3t7wNPh2+m9IoE8wo4wY rGqIxXmmAEw8wlPULrLeodnHJC4ahWTADE55gbx7cXXESReQO2tIKiIR4n8Zaw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624999553; a=rsa-sha256; cv=none; b=V5YnKeTPzp0DTHRBZnmWus0dUJuVgY6IdESawPWGGdcBgnipRBiljEAuNonngsWtynD0KA piystG1p2btZd6HTmpPcdWDB7PAKfyC7PWIFvnF6wSluAuTdbPg0Gi3jDmu7b2SK5aWQHx 8mxCLGTooB4136aHXwcTpjmTTjO/tPNURaThn/AHHJBL0420fOaIvQNUU10cvOvy148fo4 5ELT8qetbtqOLkMS7YMG7lixsjONNfHgJxStwl4YPK250KkdrYe4xJ6R/qcWvJULnUmhYb IPNS7duQlGBVjFYvlG/k7k8kY/BRLPv02zoQ82JEHyfCUxaraDA3eaBw6WtvbQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=PCVotIAC; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=PCVotIAC; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 763693431B X-Spam-Score: -1.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: WzYZZd3re7eg along similar lines one possibility is to stick a symbol into the stars. similar code could also indicate that scheduled and deadline. On 6/29/21, John Kitchin wrote: > you could use this alternative to just change the display without adding > the tag: > > (org-map-entries (lambda () > (looking-at org-heading-regexp) > (put-text-property (match-beginning 2) (match-end 2) 'display (concat "= GH > " (match-string 2)))) > "+GITHUB=3D{.+}") > > There might be some clever way to tie that onto fontlock, or some kind of > hook to make it also work for entries as you create them. > John > > ----------------------------------- > Professor John Kitchin (he/him/his) > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > http://kitchingroup.cheme.cmu.edu > > > > On Tue, Jun 29, 2021 at 9:35 AM Juan Manuel Mac=C3=ADas > wrote: > >> 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=3D{.+}")) >> >> (add-hook 'org-mode-hook #'add-github-tag) >> #+end_src >> >> Best regards, >> >> Juan Manuel >> >> >> > --=20 The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged= .html