From: Rasmus <rasmus@gmx.us> To: emacs-orgmode@gnu.org Subject: Re: [RFC] Sloppy `org-element-context'? Date: Thu, 27 Mar 2014 22:34:14 +0100 [thread overview] Message-ID: <87r45njpgp.fsf@pank.eu> (raw) In-Reply-To: <874n2jsls9.fsf@gmail.com> Hi, Nicolas Goaziou <n.goaziou@gmail.com> writes: > As you may know, `org-element-context' returns the object under point, > according to Org Syntax. The questions are: should it be a little > sloppy, for convenience? And, if it should, what degree of sloppiness is > acceptable? Would it make sense to make it optional? For my personal hacks, I much prefer to work with an element, if possible, and flexibility could facility fast and easy hacks. On the other hand in Org-core clarity and strictness is (probably) preferable. So something like this (let (org-element-strict) (FUN (org-element-context) ...)). > Note that, at the time being, the function is already somewhat sloppy, > because it will return an object right before point. In the following > example, "|" is point. Even though it is not on the bold object, > evaluating (org-element-context) there will give: > > "*bold*| text" => (bold ...) > Should we go further? A recent discussion about opening links in node > properties suggests that some users expect to encounter Org syntax > there. I believe this is not generally desirable. I haven't seen this discussion. I looked briefly at the suggested patch; I don't understand why it would be necessary or desirable. But I will not rule out that I have yet to consider the correct case! > Anyway, here we are. I think it is important to define clearly what > belongs to the syntax (I think it is quite good at the moment), what can > be allowed for the sake of convenience, and what line should never be > crossed (I firmly believe, for example, that `org-element-context' > should never return objects in a comment, an example block, or > a fixed-width area). As a user I have no problems with the syntax. As a hacker (not quite a developer!), I do at time desire more flexibility with org-context to temporarily evaluating an element under alternative assumptions of its properties. A recent example evaluate $x^{z}$ as-if it isn't a latex-fragment. —Rasmus -- This space is left intentionally blank
next prev parent reply other threads:[~2014-03-27 21:32 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-03-27 15:28 Nicolas Goaziou 2014-03-27 21:34 ` Rasmus [this message] 2014-03-28 9:26 ` Nicolas Goaziou 2014-04-19 8:47 ` Bastien 2014-04-19 9:15 ` Nicolas Richard 2014-04-19 9:30 ` Bastien 2014-04-23 20:35 ` Nicolas Goaziou 2014-04-29 21:20 ` Nicolas Goaziou 2014-05-06 9:25 ` Bastien 2014-05-26 15:50 ` Bastien
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=87r45njpgp.fsf@pank.eu \ --to=rasmus@gmx.us \ --cc=emacs-orgmode@gnu.org \ --subject='Re: [RFC] Sloppy `org-element-context'\''?' \ /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
Code repositories for project(s) associated with this 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).