From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 WGzQJKN7lGJNQwAAbAwnHQ (envelope-from ) for ; Mon, 30 May 2022 10:09:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eH7aJKN7lGKDIgAA9RJhRA (envelope-from ) for ; Mon, 30 May 2022 10:09:07 +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 C40E73CCB1 for ; Mon, 30 May 2022 10:09:06 +0200 (CEST) Received: from localhost ([::1]:60466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvaSW-0007cK-BR for larch@yhetil.org; Mon, 30 May 2022 04:09:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvaQi-0006oh-H3 for emacs-orgmode@gnu.org; Mon, 30 May 2022 04:07:12 -0400 Received: from fossa.birch.relay.mailchannels.net ([23.83.209.62]:2340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvaQf-0004vp-O7 for emacs-orgmode@gnu.org; Mon, 30 May 2022 04:07:12 -0400 X-Sender-Id: dreamhost|x-authsender|inbox@alphapapa.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2CBE782210D for ; Mon, 30 May 2022 08:07:06 +0000 (UTC) Received: from pdx1-sub0-mail-a297.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 490B3821C19 for ; Mon, 30 May 2022 08:07:03 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1653898023; a=rsa-sha256; cv=none; b=wlaPuHkOkTbu53+cTNqPx5WdzEgxSMgebQAG99y0qNzMRhEHz4Qvb/e92VIPsRdjspl7Kc 0vAvoi2QlW3ef+NsgfBYhA7kYMpQF5vk4NILH1e3YpQcXslYy9At5nwkclBCua9k++5Nmo 9/B9k8mzJZruXrBzWzuJa8ZF1BbrEslx/e1R2v0qMW2neTmmErAH/QnbEF05D03XEswEoo UxJUs/zbWngQ8FUY9sA/iwD92WmQmcM/H2/aLaAYOwNCmMB2/FxlHlj+yH5zrOfv9Ktg/c sal0A3mgAu8wnNlG62l0m2QLNIKIsIdSPz+mlIGrPMYJat/72DDbXC8GxYgCVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1653898023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=sNdd69rOSvmZxZApj/E2kRbzQd7gPaKBhgfJIbB4Dqw=; b=tyyZ0qxfqupaJ4mYbXrZiMd17Z0VUbU42UFNgr5wVKs61W0z3pCqT9sNuraBrfOecJs4Ob 1lrDoUTTRGubes0S6DVE/2pkRlCp2qSOiyfUawUSwfaxK8dK3AeVlTB/FkiRHCimAnsFxx zoEVzAPFI5V1Ccz1tG1u3d6/VQYmteWK+Lnr5NPGdQ8l9pcjEkuhb/rcIG8Fd2kMgHmwZ7 qcwjvv2IvZfsbjNKo5lbmgiyXM29WTHBzoqDwJkd+RgOEF8ihnPROHpvCLQDr/AqWzpRi9 quI3F365oeBfQ2/lLO85pQYx/dN8iqsPDm0ObIAFHZ6Wdx0LuVZfZCdU4jldzQ== ARC-Authentication-Results: i=1; rspamd-84fcb66578-k4wps; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|inbox@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|inbox@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Duck-Imminent: 620b60f3046f8163_1653898025691_2681253836 X-MC-Loop-Signature: 1653898025691:3462975306 X-MC-Ingress-Time: 1653898025690 Received: from pdx1-sub0-mail-a297.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.98.242.203 (trex/6.7.1); Mon, 30 May 2022 08:07:05 +0000 Received: from [10.192.0.6] (unknown [193.56.117.145]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: inbox@alphapapa.net) by pdx1-sub0-mail-a297.dreamhost.com (Postfix) with ESMTPSA id 4LBSgB4RwSz1JL for ; Mon, 30 May 2022 01:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1653898022; bh=sNdd69rOSvmZxZApj/E2kRbzQd7gPaKBhgfJIbB4Dqw=; h=Content-Type:Date:To:From:Subject; b=EU6Cuq/wQD8tpXkMcl9lTxLE8DtEUZq0O68qiPBMqSkoQkC0O3kurm2VTTAZL8MLa v18cF6zOuNJTDqKeg6gRI7b1rQiCciyCQsFdD7H0j98jaYJRdcG9r2y+hNP9V7+NMu PkWKADltauTWYOhocWBihjVGX5W4JwBpHZ7hiMaV04PjZcW9FjgdUeL/3CzbuBg/3B JBeulnYypqkFeNgElKzntvRWgu2h6JzsOhP3GrcDYSHzWNYAp4h/7Y/XI3/9ioCXsc Wh1gCDnXBVaBxELGvPw7OhksbNH37h7ECRLDDZT2wAjzvgZagifKTCMbXJPqfHbuc/ +yN8XfbgJP/XA== Content-Type: multipart/mixed; boundary="------------2RWFsH0KesHu2vKdAQzNAheH" Message-ID: Date: Mon, 30 May 2022 03:07:01 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US To: emacs-orgmode@gnu.org From: Adam Porter Subject: [PATCH] org-imenu-get-tree: Allow parent headings to be selected themselves Received-SPF: neutral client-ip=23.83.209.62; envelope-from=adam@alphapapa.net; helo=fossa.birch.relay.mailchannels.net X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653898147; 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=sNdd69rOSvmZxZApj/E2kRbzQd7gPaKBhgfJIbB4Dqw=; b=B4j8/Zuu5h0SZVcMcIQYXukS0fno/5wR0NeNA2B2hS1JvUbgWgDL9uaV696ApQBIMKugCg peEGlOOPQOQbk7gaNHzXRlFGjmcXfso/btX7TAJO4alRl7x16P1uhw3d781uqvuWQmqkjq AWkClpws5PUEwKDmavWgYSoAISsg+axyOP0yEBuCGmeIAmJzs1f8Q4Xgd/TZjlz1DeuJsS bxM2D3x+5RLctSFYrTHNdYaV18DXtgcnjIKwQSJcgEpUyN3qwOvvHOt0q69p7I131cN9ya 7nDEZdt80slu6He4bmufcsdBJrDTtJHghkQGo+bqWIfICNCG6O9upvu+TY1l/g== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1653898147; a=rsa-sha256; cv=pass; b=k+2uLJKFbrDXdQMJzeliiNqVKtf0Ym1NYIxgHPUUKIBzoTN3Pbj30tB+0dvGc3vfJbBicQ boLGNkxUmRCkWriy85KKoNc88gpd+yQkfJwliN8bk4xsuGE1aqZnoFgeBzus8ZR40AsE6N h7KfXfDS3efm2P/EbrO1VopkErY14wF8n0VJLLEK9/yxDDqCLFA69EYr/oeQ7r4JtV1+HS 9o2yGz0c/+zpKJanjG2JcPauPPGtGSdvyCV2/vBpBeXAOpcdTAzY7j3aLnVlNhdmJRyAk1 7wg22E2Kqzp3g2EIzOLd6RD9VTUXsmAWKZ0fFEfsR00NN57Bmt+400PDCh/7jg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=alphapapa.net header.s=dreamhost header.b="EU6Cuq/w"; arc=pass ("mailchannels.net:s=arc-2022:i=1"); dmarc=none; 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: -3.43 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=alphapapa.net header.s=dreamhost header.b="EU6Cuq/w"; arc=pass ("mailchannels.net:s=arc-2022:i=1"); dmarc=none; 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: C40E73CCB1 X-Spam-Score: -3.43 X-Migadu-Scanner: scn1.migadu.com X-TUID: Jc3WlQct2Pm4 This is a multi-part message in MIME format. --------------2RWFsH0KesHu2vKdAQzNAheH Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Please see the attached patch that remedies a longstanding, simple shortcoming in Org's Imenu support. Thanks, Adam --------------2RWFsH0KesHu2vKdAQzNAheH Content-Type: text/x-patch; charset=UTF-8; name="0001-org-imenu-get-tree-Allow-parent-headings-to-be-selec.patch" Content-Disposition: attachment; filename*0="0001-org-imenu-get-tree-Allow-parent-headings-to-be-selec.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSAwMDEwNGIyYjkyNDZiMTljZGIwMmJiY2U5OTNkMTIwNTgxZGM5ZjBlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBBZGFtIFBvcnRlciA8YWRhbUBhbHBoYXBhcGEubmV0 PgpEYXRlOiBNb24sIDMwIE1heSAyMDIyIDAyOjU5OjA2IC0wNTAwClN1YmplY3Q6IFtQQVRD SF0gb3JnLWltZW51LWdldC10cmVlOiBBbGxvdyBwYXJlbnQgaGVhZGluZ3MgdG8gYmUgc2Vs ZWN0ZWQKIHRoZW1zZWx2ZXMKCkltZW51IG9ubHkgYWxsb3dzIGxlYWYgbm9kZXMgdG8gYmUg Y2hvc2VuLiAgSW4gcHJvZ3JhbW1pbmcgbGFuZ3VhZ2UKYnVmZmVycywgbm9uLWxlYWYgbm9k ZXMgYXJlICJ2aXJ0dWFsIiBub2RlcywgaS5lLiBjYXRlZ29yaWVzIGxpa2UKImZ1bmN0aW9u cyIgb3IgInZhcmlhYmxlcyIgcmF0aGVyIHRoYW4gYWN0dWFsIGxvY2F0aW9ucyBpbiB0aGUg YnVmZmVyLgpCdXQgaW4gT3JnIGJ1ZmZlcnMsIG5vbi1sZWFmIG5vZGVzIGFyZSBoZWFkaW5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