all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Richard Walker <walkerrichardj@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: org-datetree-insert-line and org-blank-before-new-entry
Date: Wed, 26 Oct 2022 07:29:21 +0000	[thread overview]
Message-ID: <87o7tzoxf2.fsf@localhost> (raw)
In-Reply-To: <CAFyNgSE4mAt+b0Ks8L9bg2LbHcXnayOh+bYyONTQ4jN+zx3C1w@mail.gmail.com>

Richard Walker <walkerrichardj@gmail.com> writes:

> A follow-up to the changes made to org-datetree-insert-line
> in September 2020.
>
> The definition now begins:
>
> (defun org-datetree-insert-line (year &optional month day text)
>   (delete-region (save-excursion (skip-chars-backward " \t\n") (point)) (point))
>   (when (assq 'heading org-blank-before-new-entry)
>     (insert "\n"))
>     ...
>
> ...
> (setf org-blank-before-new-entry '((heading . nil) (plain-list-item . nil)))
>
> Such a setting seems to be consistent with the help text of
> org-blank-before-new-entry, and what org--blank-before-heading-p
> expects to find. But, having made this setting,
>   (when (assq 'heading org-blank-before-new-entry)
>     (insert "\n"))
> still does the insertion, since (assq 'heading org-blank-before-new-entry)
> is non-nil.
>
> Change (assq 'heading org-blank-before-new-entry)
> to (org--blank-before-heading-p) here?

You are indeed right.
Fixed on main now.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6bbd08f5aa81bd0b6b2b2f448a858516f388702a

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2022-10-26  7:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  0:35 org-datetree-insert-line and org-blank-before-new-entry Richard Walker
2022-10-26  7:29 ` Ihor Radchenko [this message]
2022-10-26 22:50   ` Richard Walker
2022-10-27  4:02     ` [PATCH] org-manual: Suggest to wait for one month and followup when reporting bugs (was: org-datetree-insert-line and org-blank-before-new-entry) Ihor Radchenko
2022-10-27  8:31       ` [PATCH] org-manual: Suggest to wait for one month and followup when reporting bugs Bastien Guerry
2022-10-29  9:41         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7tzoxf2.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=walkerrichardj@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.