From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: [PATCH] Add NO-STATS switch to org-get-heading Date: Fri, 13 Mar 2020 13:50:33 -0500 Message-ID: <87k13o143q.fsf@alphapapa.net> References: <20200313151145.29469-1-brice@waegenei.re> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39786) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCpON-0007Qe-6c for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 14:50:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCpOM-000071-4U for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 14:50:42 -0400 Received: from ciao.gmane.io ([159.69.161.202]:49008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCpOL-0008T2-Ud for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 14:50:42 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jCpOJ-0004el-7D for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 19:50:39 +0100 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Please don't add more arguments to org-get-heading. It used to have 2, then it had 4, and now you want to add a 5th. Every time the function's signature changes, it breaks code in third-party packages and user code in random places, which requires the addition of messy compatibility code and intermediate functions that do nothing but wrap org-get-heading with a certain number of arguments. It would be much preferable to make a new function that uses keyword arguments so the addition of more arguments won't affect existing code. Maybe it could be called org-entry-heading.