From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] make org-comment-dwim comment headings if on a heading Date: Wed, 29 Nov 2017 14:46:55 +0100 Message-ID: <87indtp580.fsf@nicolasgoaziou.fr> References: <87zi7godo1.fsf@gmail.com> <878texlx7g.fsf@nicolasgoaziou.fr> <87po84to5n.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK2hY-0002ws-TI for emacs-orgmode@gnu.org; Wed, 29 Nov 2017 08:47:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eK2hW-0006y3-Vs for emacs-orgmode@gnu.org; Wed, 29 Nov 2017 08:47:00 -0500 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:53362) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eK2hW-0006wf-Q4 for emacs-orgmode@gnu.org; Wed, 29 Nov 2017 08:46:58 -0500 In-Reply-To: <87po84to5n.fsf@gmail.com> (Alex Branham's message of "Sun, 26 Nov 2017 21:07:32 -0600") 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: Alex Branham Cc: Org-mode Hello, Alex Branham writes: > I've attached the updated patch (with a test), but the test fails > because calling M-x comment-dwim in an org buffer on a heading results > in the old behavior of comment-dwim rather than the new behavior. > Calling M-x org-comment-dwim directly works as I expect (and M-; works > like this too). Do you have any idea what might be going on? I thought > they would behave the same since comment-dwim is mapped to > org-comment-dwim, but that doesn't seem to be the case... Mapping means `org-comment-dwim' binding replaces `comment-dwim' binding, which doesn't mean both functions are mapped to each other. The tests in "test-org.el" were broken: they tested `comment-dwim' instead of `org-comment-dwim'. I fixed the tests, then applied your patch. I also added TINYCHANGE at the end of the commit message. Please consider signing FSF papers if you haven't done so. If you did, let me know it so I can update our registry. Would you mind writing an entry in ORG-NEWS? It could go in "Miscellaneous" section. Thank you! Regards, -- Nicolas Goaziou