From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo de Moraes Serpa Subject: Re: Move to item to the bottom Date: Wed, 20 Jul 2011 11:05:05 -0500 Message-ID: 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> <87k4bz8zzk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00151747bb724dbd3504a88265fe Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjZGs-0006AO-1o for emacs-orgmode@gnu.org; Wed, 20 Jul 2011 12:05:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjZGl-0005EY-Ck for emacs-orgmode@gnu.org; Wed, 20 Jul 2011 12:05:13 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:61576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjZGk-0005Dl-Rq for emacs-orgmode@gnu.org; Wed, 20 Jul 2011 12:05:07 -0400 Received: by ewy9 with SMTP id 9so758885ewy.0 for ; Wed, 20 Jul 2011 09:05:05 -0700 (PDT) In-Reply-To: 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: Nicolas Goaziou Cc: Bastien , Org Mode --00151747bb724dbd3504a88265fe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable [Feature suggestion] (related to what I described in the last post of this thread): Keep configuration options for an org file in a separate file. Could be: * nameoftheorgfile.conf I know it seems awkward, but I think it'd be nice if we could keep org file configurations outside of the org file, of course, as an optional feature. Now, this wouldn't be complicated to implement, I'm sure, and I could even try to hack it as part of some much needed elisp exercise. Would that make sense? Cheers, Marcelo. On Thu, Jul 7, 2011 at 10:51 AM, Marcelo de Moraes Serpa < celoserpa@gmail.com> wrote: > It's obvious, but here's the snippet to promote the headline for your > convenience: > > > (defun ngz-move-headline-up () > "Move current headline to the top of the tree" > (interactive) > (unless (org-at-heading-p) (error "Not at an headline")) > (save-excursion (while (ignore-errors (org-move-subtree-up))))) > > > The only minor issue I have now is with my org file conf section. It's > supposed to be the last item in the file, but when I send the item to the > bottom, it starts pilling up as I add more. > > It would be nice if we could setup a special tag for the conf section of > the org file, i.e: > > * conf :HIDDEN: > #+STARTUP: overview > ... > > HIDDEN items would be hidden unless show-hidden-items toggles. Does that > make sense? > > Cheers, > =EF=9C=81 > Marcelo. > > On Mon, Jul 4, 2011 at 10:27 PM, Marcelo de Moraes Serpa < > celoserpa@gmail.com> wrote: > >> I definitely need to get my head around elisp. Thank you very much. >> >> >> On Sun, Jul 3, 2011 at 4:39 AM, Nicolas Goaziou wro= te: >> >>> Hello, >>> >>> Marcelo de Moraes Serpa writes: >>> >>> > Nicolas, the function works quite well! Thanks. Just one last reques= t: >>> Is >>> > it possible to not follow the item until the bottom? The issue is tha= t, >>> 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 >>> >> >> > --00151747bb724dbd3504a88265fe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable [Feature suggestion] (related to what I described in the last post of this = thread):

Keep configuration options for an org file in a= separate file. Could be:
=C2=A0* nameoftheorgfile.conf

I know it seems awkward, but I think it'd be nice if we coul= d keep org file configurations outside of the org file, of course, as an op= tional feature. Now, this wouldn't be complicated to implement, I'm= sure, and I could even try to hack it as part of some much needed elisp ex= ercise.=C2=A0

Would that make sense?

Cheers,=

Marcelo.


On Thu, Jul 7, 2011 at 10:51 AM, Marcelo de Moraes Serpa <celoserpa@gmail.com>= wrote:
It's obvious, but here's the snippe= t to promote the headline for your convenience:

(defun ngz-move-headline-up ()
=C2=A0 "Move curre= nt headline to the top of the tree"
=C2=A0 (interactive)
=C2=A0 (unless (org-at-heading-p) (erro= r "Not at an headline"))
=C2=A0 (save-excursion (= while (ignore-errors (org-move-subtree-up)))))

The only minor issue I have now is with my org file conf section. It's = supposed to be the last item in the file, but when I send the item to the b= ottom, it starts pilling up as I add more.=C2=A0

It would be nice if we could setup a special tag for th= e conf section of the org file, i.e:

* conf =C2=A0= :HIDDEN:
#+STARTUP: overview
...

HIDDEN items would be hidden unless show-hidden-items toggles. Does that ma= ke sense?

Cheers,
=EF=9C=81
Ma= rcelo.

On Mon, Jul 4, 2011 at 10:27 PM, Marcelo de Moraes Serpa <celoserpa@gm= ail.com> wrote:
I=C2=A0definitely=C2=A0need to get my head a= round elisp. Thank you very much.


On Sun, Jul 3, 2011 at 4:39 AM, Nicolas Goaziou <n.goaziou@gmail.com= > wrote:
Hello,

Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:

> Nicolas, the function works quite well! =C2=A0Thanks. 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 po= inter
> 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 ()
=C2=A0"Move current headline to the last position in the same tree&qu= ot;
=C2=A0(interactive)
=C2=A0(unless (org-at-heading-p) (error "Not at an headline"))
=C2=A0(save-excursion (while (ignore-errors (org-move-subtree-down))= )))
#+end_src

Regards,

--
Nicolas Goaziou



--00151747bb724dbd3504a88265fe--