From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Move to item to the bottom Date: Sun, 03 Jul 2011 11:39:27 +0200 Message-ID: <87k4bz8zzk.fsf@gmail.com> References: <878vsjb14b.fsf@gmail.com> <87zkkya4ok.fsf@gmail.com> <87hb765qfz.fsf@gnu.org> <87mxgy9xjq.fsf@gmail.com> <87vcvmxs5h.fsf@gnu.org> <87wrg08oxz.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdJ9M-000684-9d for emacs-orgmode@gnu.org; Sun, 03 Jul 2011 05:39:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdJ9L-000253-E2 for emacs-orgmode@gnu.org; Sun, 03 Jul 2011 05:39:36 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:40864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdJ9L-00024r-8N for emacs-orgmode@gnu.org; Sun, 03 Jul 2011 05:39:35 -0400 Received: by wwf22 with SMTP id 22so3462597wwf.30 for ; Sun, 03 Jul 2011 02:39:34 -0700 (PDT) In-Reply-To: (Marcelo de Moraes Serpa's message of "Sat, 2 Jul 2011 21:02:52 -0500") 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: Marcelo de Moraes Serpa Cc: Bastien , Org Mode Hello, Marcelo de Moraes Serpa writes: > Nicolas, the function works quite well! Thanks. Just one last request: Is > it possible to not follow the item until the bottom? The issue is that, once > running it and when the item is sent to the bottom of the file, the pointer > is also put there and the buffer scrolls down with it. Sure, it's simple as packing it into a (save-excursion ...) #+begin_src emacs-lisp (defun ngz-move-headline-at-bottom () "Move current headline to the last position in the same tree" (interactive) (unless (org-at-heading-p) (error "Not at an headline")) (save-excursion (while (ignore-errors (org-move-subtree-down))))) #+end_src Regards, -- Nicolas Goaziou