emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Aaron Ecay <aaronecay@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [RFC] [PATCH] org.el: fix ‘org-buffer-property-keys’
Date: Thu, 28 Aug 2014 11:48:55 +0200	[thread overview]
Message-ID: <87ha0xeygo.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <1409103341-17457-1-git-send-email-aaronecay@gmail.com> (Aaron Ecay's message of "Tue, 26 Aug 2014 21:35:41 -0400")

Hello,

Aaron Ecay <aaronecay@gmail.com> writes:

> +	    (unless (eq (org-element-type (org-element-at-point)) 'property-drawer)
> +	      (throw 'cont nil))
>  	    (setq range (or (org-get-property-block)
>  			    (if (y-or-n-p
>  				 (format "Malformed drawer at %d, repair?" (point)))

This will not work as you short-circuit the following part of the test
(i.e., since you only get `property-drawer' type on a well-formed
drawer, you get no change to repair malformed ones).

Also, if you store `org-element-at-point', you don't need anymore to
call `org-get-propert-block'.

Nevertheless, I think we should take a radical different approach, as
discussed recently with Bastien, which is to enforce property drawers to
start on the line right after the headline and maybe the planning info,
if any. As a consequence, the code for this function will be different
anyway. IOW, I wouldn't bother too much.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2014-08-28  9:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27  1:35 [RFC] [PATCH] org.el: fix ‘org-buffer-property-keys’ Aaron Ecay
2014-08-28  9:48 ` Nicolas Goaziou [this message]
2014-08-30 18:51   ` Aaron Ecay

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87ha0xeygo.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 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).