From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id mOuFGbjgj2bhpQAAqHPOHw:P1 (envelope-from ) for ; Thu, 11 Jul 2024 13:40:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id mOuFGbjgj2bhpQAAqHPOHw (envelope-from ) for ; Thu, 11 Jul 2024 15:40:08 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=N07l0lgE; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720705208; 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=EJCJCQTxQMmfAyuWLWZAbSTTdxPBFUx0YzTcga/eY0w=; b=Vntnw0EcFhLdltu/rIFe6vmbtZQA360IirK1ZdZP2yDQ0oSRiAvXEeLSJ3DE/Ak1GYhuH2 YD0vdFBbulgNChPWK7U+/AAYOFifaz97//JZ+YBj/XCViq/WnxxGJXdeEEu9yIa+fTTtmF 1NnQVW7mQGL3VkfxAXNnCDculPUOQQbI6LmykBGqYMXX7dOEQkS0+qbKOmT+79uakN1C7I w4q0hDtmPm34QFn/Mp30zhiROkgphnUunyaYND331erUI0wCM4A3TxNaT9BFUwxEzeqbAh J/K+KAuqxVtddOFGdVNYmG+NLe3x28TZeN/2wS7LWzspq8J4P93s7M/eyLroGA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720705208; a=rsa-sha256; cv=none; b=LmMxrHppxkh+qcKa7b9m4QmXgBpzV81WbdnRq1Q9tie88QjF6r5pWguwiOBcr5/ejLqzJ8 Kr6Lj249lcm3K7TofgRo2PqzMObDJlCGSO2TBvrztzg/VVF7zGZzRbCQIK2b5iFFIIeARr S2VBiFcGOrZvJ5+MZnvAZUeoZS3u54k5gzMMa3kfbez1v8wp8SJDZG3AZQcCHaRblsebjr kgJQYegq2AdyI5Tv9Sep9jIVz5Cgz9xLH8LoHLhBUgKFaXgxihSQAeu9lGQrPwmpvj9x8N WYSdcLbz73WU9Iw3tCZA5LE2HwUQaRyXYT/KfNwTZYYEPRS0MI2ZZkJGWxXKDQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=N07l0lgE; dmarc=pass (policy=none) header.from=posteo.net; 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" 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 09B8A652E1 for ; Thu, 11 Jul 2024 15:40:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRu0y-00079a-S9; Thu, 11 Jul 2024 09:39:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRu0v-0006zu-MO for emacs-orgmode@gnu.org; Thu, 11 Jul 2024 09:39:14 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRu0q-0006uB-Jp for emacs-orgmode@gnu.org; Thu, 11 Jul 2024 09:39:13 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 54107240105 for ; Thu, 11 Jul 2024 15:39:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1720705145; bh=oSmRlOYTaB+3huya217slv32r6npxCQZllkJG2fRDok=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=N07l0lgENAt5HZjOH/lG02Fndz1+Xv8a9wwxrVeWvxlJXB32SQ+w/y8k1vSATNMW1 fyZsBWol9mgc9T/B2J6cCpdAaVQodgbUhGYiKwYhSZdcnFTWUOJ5dnMu5GGGXKqMan /ZySQCg+XarctFXrCy9Nip5H4O/yCFOd7Ra64z/DGapDIdexRVmm8Zatl3hhToCYYW JzD0DTvcAPCfwfeb5PzR+FthPC2mbsuTUVMLxEc3DdOW6jw5DD3ySNdNzO9WC4D8SN l/6qwHR+Lpjvhx0w70g6hAaVbSVXacS5cT+GLi+o4kuLBZgIvxob5n6qc0y79IK75B gTivANsFJ/dIA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WKbRX5pwhz6trs; Thu, 11 Jul 2024 15:39:04 +0200 (CEST) From: Ihor Radchenko To: Vitaliy Chepelev Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] List: org-shiftright brake list by indentation. Patch. [9.6.28 ( @ /home/u/.emacs.d/elpa/org-9.6.28/)] In-Reply-To: <871q40lvhm.fsf@gmx.com> References: <871q42qbn7.fsf@gmx.com> <87ed81746a.fsf@localhost> <871q40lvhm.fsf@gmx.com> Date: Thu, 11 Jul 2024 13:40:39 +0000 Message-ID: <87o77459ns.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.63 X-Spam-Score: -6.63 X-Migadu-Queue-Id: 09B8A652E1 X-Migadu-Scanner: mx11.migadu.com X-TUID: us9e4qoFKUSz [ Adding Org mailing list back to CC to keep the conversation public ] Vitaliy Chepelev writes: > I made much better patch for my org-9.6.28/org-list.el, now indentation > is working and list don't breaks: May you please explain in more details what is better in the proposed patch compared to the already installed fix? > diff --git a/org-list.el b/org-list.el > index 502e61b..27617c5 100644 > --- a/org-list.el > +++ b/org-list.el > @@ -1813,6 +1813,14 @@ This function modifies STRUCT." > (setq end-list (sort end-list (lambda (e1 e2) (< (cdr e1) (cdr e2))))) > (org-list-struct-assoc-end struct end-list))) > > +(defcustom org-list-static-bullet-length t > + "Assume that bullet length always equal one character. > +Oterwise indent list items according to calculated length of > +bullet." > + :group 'org-plain-lists > + :group 'org-cycle > + :type 'boolean) > + > (defun org-list-struct-apply-struct (struct old-struct) > "Apply set difference between STRUCT and OLD-STRUCT to the buffer. > > @@ -1900,8 +1908,12 @@ Initial position of cursor is restored after the changes." > (ind-old (org-list-get-ind pos old-struct)) > (bul-pos (org-list-get-bullet pos struct)) > (bul-old (org-list-get-bullet pos old-struct)) > - (ind-shift (- (+ ind-pos (length bul-pos)) > - (+ ind-old (length bul-old)))) > + (ind-shift (if org-list-static-bullet-length > + (- (+ ind-pos 1) > + (+ ind-old 1)) > + ;; else > + (- (+ ind-pos (length bul-pos)) > + (+ ind-old (length bul-old))))) > (end-pos (org-list-get-item-end pos old-struct))) > (push (cons pos ind-shift) itm-shift) > (unless (assq end-pos old-struct) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at