From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: API problem Date: Wed, 22 Jan 2014 18:03:36 +0100 Message-ID: <8738kgvthz.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W61D1-0006UZ-Cd for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 12:03:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W61Cs-0003sO-W5 for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 12:03:23 -0500 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:40895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W61Cs-0003s5-Pr for emacs-orgmode@gnu.org; Wed, 22 Jan 2014 12:03:14 -0500 Received: by mail-wi0-f177.google.com with SMTP id m19so830769wiv.10 for ; Wed, 22 Jan 2014 09:03:13 -0800 (PST) In-Reply-To: (Cecil Westerhof's message of "Wed, 22 Jan 2014 17:37:31 +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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Cecil Westerhof Cc: emacs-orgmode@gnu.org Hello, Cecil Westerhof writes: > To solve a problem I have the following line in an org file: > - [ ] B (org-list-set-checkbox (line-beginning-position) > (org-list-struct) "[X]") ITEM STRUCT CHECKBOX (org-list-send-item > (line-beginning-position) 'end (org-list-struct)) ITEM DEST STRUCT > > Executing the org-list-send-item brings the entry to the end of the list, > but executing org-list-set-checkbox does nothing. What am I doing > wrong? `org-list-set-checkbox' modifies the structure, i.e., the internal list representation. It doesn't modify the buffer. You would have to apply the new structure to the buffer with `org-list-write-struct'. Anyway, it's much simpler to use `org-toggle-checkbox'. Regards, -- Nicolas Goaziou