From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 sO5uLmt5AGOAUgAAbAwnHQ (envelope-from ) for ; Sat, 20 Aug 2022 08:04:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YO99LWt5AGNNHQEAG6o9tA (envelope-from ) for ; Sat, 20 Aug 2022 08:04:27 +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 4AFBA152E7 for ; Sat, 20 Aug 2022 08:04:27 +0200 (CEST) Received: from localhost ([::1]:42600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPHas-0008Sv-EH for larch@yhetil.org; Sat, 20 Aug 2022 02:04:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPHa2-0008SR-Ox for emacs-orgmode@gnu.org; Sat, 20 Aug 2022 02:03:34 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:35744) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPHa0-000201-Td for emacs-orgmode@gnu.org; Sat, 20 Aug 2022 02:03:34 -0400 Received: by mail-pg1-x52e.google.com with SMTP id r69so5237482pgr.2 for ; Fri, 19 Aug 2022 23:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=RkH7R45uGp9rbguFGuMOg2xL0xqzIIMWygnIqkIAhEk=; b=CPiFq8MpcBxBmmIDR3MaoeEom9bDBBjMAxEKeyfjG4nzuh6HHmX+z7/BX4AAIbVzwg hfmS3rSM+0hml5Imqu+IzzUIH2OKtR6kqs/3thfniTvvyNyf00MxN/7IQIvNQcZRPtV+ sRPjbxELmLtqdSBQWgBfNtfAMCcwi1hC7/SyHzjq0abwMV7C07RsdVe1HK0h/xylUtz8 bH7tho1tg11ITXsgT4KjKd+FmFjKRdldeHYMZIZ9xMOPn7b9/SU8ZKdpNxbE/5+cutgD de5tHjO9LgEtYiSaxp6KEh9nxMu45uxTjPxoG4zLbZzSlZLuUzeWU/1Q+SQQ+Kh4lH8C MXyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=RkH7R45uGp9rbguFGuMOg2xL0xqzIIMWygnIqkIAhEk=; b=uWfj9bwsYwkGEpd9ok9u0i/cADpups8RL0nZ8IXpSycIReFvRHoew+kBOETMWxiO5p kINVYN5Ply8QMrnCG6QMZZLX+M+QlI4p8bPpkyFavJ7aq3em5dxdnt1XULZonMXV9p3f YJwqpTrQ9RFM1DYmPppbr32BU+ArY6VgS3l1Y0Oz8XH8gVW+BIJVVf60IH/AZZrRvYhs Yx4vTfvDQy8+eH8MyMQ96yF9IrbfLMfH8L0mGrA/SHDHUbKXq8ooXgbdzIHlmh2iCBBE D6wwDD0gx4t6mW5xbBgyzEFkQXjU3/v6lQdjvLd1NeM9Yj/ggqtyp1QLwdpT9VzUybWi Rb+Q== X-Gm-Message-State: ACgBeo2zHFEmmGzyDae8pPjhxgMae6ZI0JIEquLbdt96a+YmggjVRyHb PaHunMk2jwh/dgqhv1mhKig= X-Google-Smtp-Source: AA6agR6s7uGxR82GWEc+0TW7sGyK9E9oP3JM8ZmUXPAijvKMuWsrqavwvxBp8LxumA0GoBbKbQq9MQ== X-Received: by 2002:a63:d55:0:b0:41c:86b0:59b5 with SMTP id 21-20020a630d55000000b0041c86b059b5mr8990224pgn.351.1660975411525; Fri, 19 Aug 2022 23:03:31 -0700 (PDT) Received: from localhost ([2409:8a70:2b9:1e80:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id x13-20020a170902ec8d00b00172b1bbbc29sm4086300plg.161.2022.08.19.23.03.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Aug 2022 23:03:30 -0700 (PDT) From: Ihor Radchenko To: Roman Rudakov Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-insert-heading-respect-content doesn't always insert TODO heading [9.5.4 (release_9.5.4-17-g6e991f @ /usr/local/Cellar/emacs-plus@29/29.0.50/share/emacs/29.0.50/lisp/org/)] In-Reply-To: References: Date: Sat, 20 Aug 2022 14:04:26 +0800 Message-ID: <87mtbzo3h1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660975467; 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=RkH7R45uGp9rbguFGuMOg2xL0xqzIIMWygnIqkIAhEk=; b=Ir8WGxs0WEg+ijEMktbk5IlT0+s7aZAFN1GNlpKC0yWDGsla0I9goABuavTxJ40l1RLjEr xXKXqwHgvC9OAz5TaoBcPZQXYOWL237yF4kTA6CnndjY8UtCTKWhLExY9h242gKZJ9he12 jYlgfuleB7x1HMX3IIT1OY+bqLPjcSHxsws8ARxTgNmV/xcOEZvGR/Gunme1a2HjH6MzdT d1VxTl1gf8I6LtSCKxB3BKiqnZ+7CECmPhw7OcL4swz2/AIR80kG3MEexG3tXymV/TJCV7 tzlSBF433mIEyRL2P7SVdyaNF1LOzcq/p9bWPvqTeyLFjcgnv+DDgcezpQmCCA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660975467; a=rsa-sha256; cv=none; b=RgXykaeZ1GeV4AOsuZW0mg5CgdVzZs3vh2hpEo8w6/O5ug8cWbL4v8u9jAJudwUCatwLhK RDzqs+9II9k7/8UmOGea+UH00jfmpfXn2kjFFeCRUHa3XU3+GYHijqw/1dhEpf9ud58Xl4 enhGAGNrNjX8gOaFhm2X0xi3q7X0PgL/DsRbjrbmcL8BB74ZoQDnoUZJ/ctXTzNM/Wx7Q+ 5Vv1STVTwM6IyfAgTF8VBhQZyLh5RxCpskNNCPrk89UdzvlyD4RVpdoy9L/2ec5NaUAqXo Sv1mY2AH5NeqUWJ39GbN3QCCouATBT/zfgspYvzrENBm2t8jbsOhkyqsApD6wQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CPiFq8Mp; dmarc=pass (policy=none) header.from=gmail.com; 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.35 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CPiFq8Mp; dmarc=pass (policy=none) header.from=gmail.com; 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: 4AFBA152E7 X-Spam-Score: -3.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: 0j+nT7N8SxGb Roman Rudakov writes: > Steps to reproduce: > 1. Create an org heading and set state to something but TODO or DONE > (for example PROGRESS). > 2. Call the function org-insert-todo-heading-respect-content > ... > I noticed that internally this function calls org-insert-todo-heading > and pass arguments in a wrong order: > > Actual function call: > > (org-insert-todo-heading force-state '(4)) > > Should be: > > (org-insert-todo-heading '(4)) force-state) Thanks for reporting and pinpointing the source of the bug! Fixed on main via a1af06d64. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a1af06d643d662f8c04e7c59d10efc45108a9528 -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92