emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to keep something at the bottom of an Org file
@ 2016-06-15 15:11 Marco Wahl
  2016-06-15 16:41 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Wahl @ 2016-06-15 15:11 UTC (permalink / raw)
  To: emacs-orgmode

Hi everyone,

in some of my Org files I want to have certain elements always at the
very bottom of the file.

Example: Often I use a subtree like

    * COMMENT *MUST BE BOTTOMMOST TREE*                         :meta:bottommost:

    MUST BE BOTTOMMOST TREE TO HAVE *GUARANTEED* EFFECT.

    Recall that no local variable setting is taken into account above a
    page break.

    \f
    Local Variables:
    eval: (git-auto-commit-mode)
    End:

at the bottom to have git-auto-commit-mode for that file.

I try to be disciplined but often the subtree bubbles up, e.g. after
sorting.

Has anyone a good idea how to deal with this issue?


Thanks for reading,
-- 
Marco Wahl -- GPG: 0x49010A040A3AE6F2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to keep something at the bottom of an Org file
  2016-06-15 15:11 How to keep something at the bottom of an Org file Marco Wahl
@ 2016-06-15 16:41 ` Nicolas Goaziou
  2016-06-17 15:32   ` Marco Wahl
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2016-06-15 16:41 UTC (permalink / raw)
  To: Marco Wahl; +Cc: emacs-orgmode

Hello,

Marco Wahl <marcowahlsoft@gmail.com> writes:

> in some of my Org files I want to have certain elements always at the
> very bottom of the file.
>
> Example: Often I use a subtree like
>
>     * COMMENT *MUST BE BOTTOMMOST TREE*                         :meta:bottommost:
>
>     MUST BE BOTTOMMOST TREE TO HAVE *GUARANTEED* EFFECT.
>
>     Recall that no local variable setting is taken into account above a
>     page break.
>
>     \f
>     Local Variables:
>     eval: (git-auto-commit-mode)
>     End:
>
> at the bottom to have git-auto-commit-mode for that file.
>
> I try to be disciplined but often the subtree bubbles up, e.g. after
> sorting.
>
> Has anyone a good idea how to deal with this issue?

I guess you could use `org-after-sorting-entries-or-items-hook' to
bubble down entries with :bottommost: tag.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to keep something at the bottom of an Org file
  2016-06-15 16:41 ` Nicolas Goaziou
@ 2016-06-17 15:32   ` Marco Wahl
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Wahl @ 2016-06-17 15:32 UTC (permalink / raw)
  To: emacs-orgmode

Hi!

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>>     * COMMENT *MUST BE BOTTOMMOST TREE*                         :meta:bottommost:
>>
>>     MUST BE BOTTOMMOST TREE TO HAVE *GUARANTEED* EFFECT.
>>
>>     Recall that no local variable setting is taken into account above a
>>     page break.
>>
>>     \f
>>     Local Variables:
>>     eval: (git-auto-commit-mode)
>>     End:
>>
>> at the bottom to have git-auto-commit-mode for that file.
>>
>> I try to be disciplined but often the subtree bubbles up, e.g. after
>> sorting.
>>
>> Has anyone a good idea how to deal with this issue?
>
> I guess you could use `org-after-sorting-entries-or-items-hook' to
> bubble down entries with :bottommost: tag.

Thanks, I try this.  FWIW here is the configuration I use, in case that
someone is interested:

(setf org-after-sorting-entries-or-items-hook
      (lambda ()
        (search-forward  ":bottommost:")
        (org-cut-subtree)
        (goto-char (point-max))
        (org-paste-subtree 1)))


Best regards,
-- 
Marco Wahl -- GPG: 0x49010A040A3AE6F2

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-17 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-15 15:11 How to keep something at the bottom of an Org file Marco Wahl
2016-06-15 16:41 ` Nicolas Goaziou
2016-06-17 15:32   ` Marco Wahl

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).