From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oKmwD24zOmDgXgAA0tVLHw (envelope-from ) for ; Sat, 27 Feb 2021 11:56:30 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2BmZC24zOmAtbAAAB5/wlQ (envelope-from ) for ; Sat, 27 Feb 2021 11:56:30 +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 aspmx2.migadu.com (Postfix) with ESMTPS id 725B6101AB for ; Sat, 27 Feb 2021 12:56:29 +0100 (CET) Received: from localhost ([::1]:34028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFyCx-0005Gd-NE for larch@yhetil.org; Sat, 27 Feb 2021 06:56:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFyCc-0005FQ-Er for emacs-orgmode@gnu.org; Sat, 27 Feb 2021 06:56:06 -0500 Received: from ciao.gmane.io ([116.202.254.214]:58596) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFyCZ-0004FO-Mw for emacs-orgmode@gnu.org; Sat, 27 Feb 2021 06:56:06 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lFyCW-0008Bp-4B for emacs-orgmode@gnu.org; Sat, 27 Feb 2021 12:56:00 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: [bug] org-yank in stars corrupts outline Date: Sat, 27 Feb 2021 18:55:54 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 25 X-Spam_score: 2.5 X-Spam_bar: ++ X-Spam_report: (2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.35, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , 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=1614426989; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=hP8PGehOkBNYddv+tRoNFzoYwR41pMx1qxMufB6DfUU=; b=duZw1mjRdOIPERzm8F07+2dyqbX68RKAw4VpnW7aeR79EcGuy/Ov4tq2wQYxJuQjjyrtMU J8GCGiA4Y3t3+SbBcY6Nl5ZaIDzwb7hOJd63DqrQDUku7PcWxECjF6mdAtnwSS6g9LH9Hy Z7a0ZhKDUzrSFBM6fLnVcJtDczkNs5LpouwfyaUPPxcnX4ledNBAACTnQK4vuePp0KLDVb 1WU2Ov0oWNK9k2lkJDHz9M6n5Y+rbspHyq+5WLGmEotOiGzC9786N58quMXXCoGlwQS5DP lrZJnlShKClstgLTiZbWU1RE6KcqkpCgv7yvPFZU8CHRaMdb3IatQRblSsCZuw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614426989; a=rsa-sha256; cv=none; b=K6EmLltm+hq0xZCO/2oANex4aj/GZ/A5PIRvfVn3zyQyoFw6tvcc0hpeNME31+z7fP5vYW zaBnaCZy7GeluKIaTjWNuVJoug9iUqiANlpXJB6Bf7mC3eUtAKef6cmv+jvgGlJE+4U5FI z9sijrygJ6mAXtCT93gzCUpCvxr/h3UfCX42OsMupZDnYvEn32rf742nJLVOknpHfwRd6g TuUJYLh57AHD1/sadkY6RJxaXo0rHvpi3r5W8J/1pm9QaugPPCJSyupb4ikBN15wXD/ALu GyvuUQLeuYuvcr8ZST7wEv5pngF11iT8T5l04hml1vhdQFER8ZtVmPmS7xpZQg== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx2.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: -0.27 Authentication-Results: aspmx2.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx2.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: 725B6101AB X-Spam-Score: -0.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1fMy5ki/1tqX On 27/02/2021 07:52, Samuel Wales wrote: > > i have org-yank-adjusted-subtrees t > > * org-yank is funny > *** kill this line (with newline) then try yanking at ^ places (remove > the ^ first) > the fault lies in the stars > insertion above and arbitrary demotion > *** x > asdfnaksdj fnkadsn fkjans df > ^a^sdkfjnaksdfn kajsndfk ajdnsf > askdjfkasjdn fkajfdns > *^*^* y > *** [[https://go^ogle.com]] from [[help:org-yank]] > If it passes the test, and if the > cursor is at the beginning of a line or after the stars of a currently > empty headline, then the yank is handled specially. How exactly depends > on the value of the following variables. In my opinion, your "^" marks do not satisfy the specified criteria. Personally I use [[help:org-paste-subtree]] C-c C-x C-y directly. It has a minor issue however. First time after emacs start it refuses to yank subtree from X clipboard (prepared externally). Regular paste with undo C-y C-/ is enough to convince the function that there is a subtree in the clipboard. Next time it works without such dance.