From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CN/jNGT0Jl8paAAA0tVLHw (envelope-from ) for ; Sun, 02 Aug 2020 17:14:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id S7mAMGT0Jl/fPwAAbx9fmQ (envelope-from ) for ; Sun, 02 Aug 2020 17:14:12 +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 aspmx1.migadu.com (Postfix) with ESMTPS id 477FD940631 for ; Sun, 2 Aug 2020 17:14:12 +0000 (UTC) Received: from localhost ([::1]:42642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2HYo-0005Bm-Og for larch@yhetil.org; Sun, 02 Aug 2020 13:14:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2HYS-0005Bb-5a for emacs-orgmode@gnu.org; Sun, 02 Aug 2020 13:13:48 -0400 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]:44159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2HYQ-00030C-G2 for emacs-orgmode@gnu.org; Sun, 02 Aug 2020 13:13:47 -0400 Received: by mail-qv1-xf2c.google.com with SMTP id r19so7852806qvw.11 for ; Sun, 02 Aug 2020 10:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=qPnWhN2NOdauR+S59pY6mSsZd2sSlEPKm/g+qUj3YHE=; b=sFM61FNmweRaVAsyHRJbSC1OI/95vmIg9p71N0dwbOY8T2w9JSFccGTcxZu8K/fK2N QU+jfUVzbvAnkdyYsEn/KJ0IQbG1YPx536M9HTq6y6aZ9ylAD4HYGK5/N2ihCv5KyoTl MTFkrhaShbsb6KqUevKtlY7LsuuFbiuve6i7wEEX2IBGo2PesTjQn4cyWp6+DCV6I55U dgT7/AIt+mU23qc9voe/EIKJvKpYf1sCVhL3tCz3bxDZUsh7xdvROpd13Kdoir5VWwdg gH10h0olFUr7jnnIzElOLWgKHH1vJl9kaF4cJyjOGBJBisrV3bTmAVN1rTE+VIcnQMYT nAeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=qPnWhN2NOdauR+S59pY6mSsZd2sSlEPKm/g+qUj3YHE=; b=KUNyYfGZCVLLLNLr51sffz+CBNoN604du1XuDnjhTIN9oaSbR43oFE6XOHnK2slxqA hJnEHo7DnfVCNmV1boL4cHjrw0p8sOTqFZJB9qliLKvUVJmb24mCKSW0foRRKXBlzwqe avQRGKk4Alnjd2FKNvDt/fKW+4NnsAM28oN65FXXySgPqN+X992juKGUBSiZCSPRSju2 EO2eF7XQ8D/rUGJljDgMxk9dbKPPBmb4xUhQiUsDNCme98qaArPhYIM6AboK6O6i6wKI VC1TBVh8HHqNy0cvukMi0JupvbaCugxT9mPXaZ9on6lTFZxd0etH90QFTFw1Gusm2q4Z btdA== X-Gm-Message-State: AOAM533KUM9ybhUody2hCtgrxMWc7PW2qXo2nrcrpW8Xxmes2dioN5Sk oyjjpX768LGXGucj5U0Mn4k= X-Google-Smtp-Source: ABdhPJwZW/ZNa9bVX7zbWj6DyrwhUHHqztw3oNoq9InYNq9rqDghTj5M+BuHjI61diFPvA+kpmwhRA== X-Received: by 2002:a0c:c409:: with SMTP id r9mr13516207qvi.123.1596388424705; Sun, 02 Aug 2020 10:13:44 -0700 (PDT) Received: from arch ([2601:8b:c300:1024:1266:d0ff:1635:f964]) by smtp.gmail.com with ESMTPSA id 7sm1587654qky.89.2020.08.02.10.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 10:13:43 -0700 (PDT) References: <873657cosb.fsf@gmail.com> <87zh7fb8pp.fsf@gmail.com> <87r1sp4q3w.fsf@kyleam.com> User-agent: mu4e 1.5.5; emacs 28.0.50 From: No Wayman To: Kyle Meyer Subject: Re: Bug: org-toggle-item removes tags from next heading [9.3.7 (release_9.3.7-696-g82b496 @ mixed installation! /home/n/.emacs.d/straight/build/org/ and /home/n/.emacs.d/straight/build/org/eln-x86_64-pc-linux-gnu-c50afd7f9e91fd04/)] In-reply-to: <87r1sp4q3w.fsf@kyleam.com> Date: Sun, 02 Aug 2020 13:13:42 -0400 Message-ID: <87wo2has3d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::f2c; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qv1-xf2c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org, No Wayman Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=sFM61FNm; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.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-Spam-Score: -0.00 X-TUID: zYejl/lt2izp --=-=-= Content-Type: text/plain; format=flowed Kyle Meyer writes: > Would you mind updating the patch to add a > test case along the lines of your ECM to > test-org-list/toggle-item? > > Thanks. Added the test in the attached patch. Thanks, Kyle. ~ Nicholas Vollmer --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-list-Operate-on-single-line-if-no-active-region.patch Content-Description: org-toggle-item-no-region-single-line >From 838a6a548396eecfa958161abb66f0a1719a9aef Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Fri, 31 Jul 2020 18:38:11 -0400 Subject: [PATCH] org-list: Operate on single line if no active region * lisp/org-list.el (org-toggle-item): Operate on single line if no active region. --- lisp/org-list.el | 2 +- testing/lisp/test-org-list.el | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/org-list.el b/lisp/org-list.el index fb061b054..c43630d05 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -3032,7 +3032,7 @@ With a prefix argument ARG, change the region in a single item." (if (org-region-active-p) (setq beg (funcall skip-blanks (region-beginning)) end (copy-marker (region-end))) - (setq beg (funcall skip-blanks (point-at-bol)) + (setq beg (point-at-bol) end (copy-marker (point-at-eol)))) ;; Depending on the starting line, choose an action on the text ;; between BEG and END. diff --git a/testing/lisp/test-org-list.el b/testing/lisp/test-org-list.el index abd1a3c83..24a55464d 100644 --- a/testing/lisp/test-org-list.el +++ b/testing/lisp/test-org-list.el @@ -1109,6 +1109,13 @@ b. Item 2" (org-test-with-temp-text "* H\n:PROPERTIES:\n:A: 1\n:END:\n\n\nText" (org-toggle-item nil) (buffer-string)))) + ;; When no region is marked and point is on a blank line + ;; only operate on current line + (should + (equal " \n* H :tag:" + (org-test-with-temp-text " \n* H :tag:" + (org-toggle-item nil) + (buffer-string)))) ;; When a region is marked and first line is a headline, all ;; headlines are turned into items. (should -- 2.27.0 --=-=-=--