From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlos Pita Subject: Re: Feature request: simplify usage of special blocks (for beamer) Date: Sun, 2 Dec 2018 12:30:18 -0300 Message-ID: References: <87a7lpxfsc.fsf@gmail.com> <87woosw378.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTThZ-0006ev-Jt for emacs-orgmode@gnu.org; Sun, 02 Dec 2018 10:30:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTThX-0000T8-Hv for emacs-orgmode@gnu.org; Sun, 02 Dec 2018 10:30:33 -0500 Received: from mail-yb1-xb2e.google.com ([2607:f8b0:4864:20::b2e]:33553) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gTThX-0000Su-DW for emacs-orgmode@gnu.org; Sun, 02 Dec 2018 10:30:31 -0500 Received: by mail-yb1-xb2e.google.com with SMTP id i78-v6so4308826ybg.0 for ; Sun, 02 Dec 2018 07:30:31 -0800 (PST) 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" To: emacs-orgmode@gnu.org I would also like to elaborate on another aspect of this. #+ATTR_xxx serves two purposes: a. As a syntactical means of attaching extra information to syntactically constrained elements (as tables or images). For this purpose the _xxx part is irrelevant, only the affiliation to an element matters. b. As a way of differentiating between different sets of attributes and thus dispatching the appropriate set to the appropriate backend. In the case of special blocks, which are syntactically capable of directly taking arguments, just as SRC blocks do, (a) doesn't apply. This brings about the possibility of a syntactic shortcut at the cost of (b). So, a general rule could be: i. A backend xxx interprets the argument to a special block as if it were the argument to an affiliated ATTR_xxx. ii. In case of conflict ATTR_xxx wins. iii. It's well understood (and documented!) that, by doing so, ability to export to other backends (point 2 above) may be compromised. Thus the user would take advantage of this shortcut only when he/she is already stuck with some particular output format. Also, for users implementing kinda DSLs, having this special blocks with special arguments is a handy feature. Let's add this to my list of suggestions as proposal (4), again related to but mostly independent of the other ones, although it's expected that something like (2) would have to be implemented in order to get (3) or (4). Best regards -- Carlos