From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Palermo Subject: [Patch] Allow skipping the local org cycle SUBTREE state Date: Fri, 23 Nov 2018 09:33:01 +1000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000ab170b057b494b18" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPyTa-0001gt-8M for emacs-orgmode@gnu.org; Thu, 22 Nov 2018 18:33:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPyTZ-0001jW-Kq for emacs-orgmode@gnu.org; Thu, 22 Nov 2018 18:33:38 -0500 Received: from mail-it1-x12c.google.com ([2607:f8b0:4864:20::12c]:50781) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPyTZ-0001h1-Bd for emacs-orgmode@gnu.org; Thu, 22 Nov 2018 18:33:37 -0500 Received: by mail-it1-x12c.google.com with SMTP id a185so16154192itc.0 for ; Thu, 22 Nov 2018 15:33:36 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --000000000000ab170b057b494b18 Content-Type: text/plain; charset="UTF-8" Hi Org, Attached is a patch that adds a customization variable, org-cycle-local-skip-subtree, which, when set to t (nil by default) will cause the SUBTREE state to be skipped when using org-cycle locally. All behaviour remains the same by default. I find the SUBTREE state such an unpleasant experience when using org-cycle locally to the extent that I find it better when it is disabled completely. I hope that others might find it useful and I hope to get it merged into Org so that I don't have to maintain a fork of org.el. The change passes the test suite. No tests were added. Cheers, Matthew Palermo --000000000000ab170b057b494b18 Content-Type: application/octet-stream; name="0001-org.el-Allow-skipping-the-local-org-cycle-SUBTREE.patch" Content-Disposition: attachment; filename="0001-org.el-Allow-skipping-the-local-org-cycle-SUBTREE.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jot8djvr0 RnJvbSA1MzlmOTIzMGNhOGM2NGRjNTFkOGEyZDFkMTA4ZWE0YjUxYjRlYTg3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXR0aGV3IFBhbGVybW8gPG1hdHQuci5wYWxlcm1vQGdtYWls LmNvbT4KRGF0ZTogRnJpLCAyMyBOb3YgMjAxOCAwNzo1NTo1NyArMTAwMApTdWJqZWN0OiBbUEFU Q0hdIG9yZy5lbDogQWxsb3cgc2tpcHBpbmcgdGhlIGxvY2FsIG9yZy1jeWNsZSBTVUJUUkVFCgoq IGxpc3Avb3JnLmVsIChvcmctY3ljbGUtbG9jYWwtc2tpcC1zdWJ0cmVlKTogTmV3IGN1c3RvbWl6 YXRpb24KdmFyaWFibGUgdG8gb3B0aW9uYWxseSBza2lwIHRoZSBsb2NhbCBvcmctY3ljbGUgU1VC VFJFRSBzdGF0ZS4KTm8gYmVoYXZpb3VyIGNoYW5nZSBieSBkZWZhdWx0Lgoob3JnLWN5Y2xlLWlu dGVybmFsLWxvY2FsKTogSWYgb3JnLWN5Y2xlLWxvY2FsLXNraXAtc3VidHJlZSBpcyB0LApza2lw IHRoZSBTVUJUUkVFIHN0YXRlLCBvdGhlcndpc2UgZG8gZXZlcnl0aGluZyB0aGUgc2FtZSBhcyBi ZWZvcmUuCgpJIGZpbmQgdGhhdCB0aGUgU1VCVFJFRSBzdGF0ZSB1bmhlbHBmdWwsIGRpc3RyYWN0 aW5nIGFuZCBqYXJyaW5nIHRvIHRoZQpleHRlbnQgdGhhdCBJJ2QgbGlrZSB0byBkaXNhYmxlIGl0 IGFuZCB0aGF0IGlzIHdoYXQgdGhpcyBjaGFuZ2UgYWxsb3dzLgpUaGUgZGVmYXVsdCBiZWhhdmlv dXIgcmVtYWlucyB1bmNoYW5nZWQuCgpUSU5ZQ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