From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: text color + highlight Date: Tue, 10 Aug 2010 11:30:12 +0200 Message-ID: <4C611C24.2030601@christianmoe.com> References: <87pqxw5cb1.fsf@gnu.org> <87mxszcsuv.fsf@gmail.com> <87d3tvru38.fsf@gmail.com> <87iq3kkef1.fsf@gmail.com> <4C60EE48.6030106@christianmoe.com> <532CED92-88AD-46F6-BC67-9D0DEDAA6D71@gmail.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=41577 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OilDx-0004PR-2y for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 05:34:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oil8x-0000Zi-MN for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 05:29:12 -0400 Received: from mail-forward1.uio.no ([129.240.10.70]:40663) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oil8x-0000Z7-AR for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 05:29:11 -0400 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.69) (envelope-from ) id 1Oil8v-00050q-Ig for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 11:29:09 +0200 In-Reply-To: <532CED92-88AD-46F6-BC67-9D0DEDAA6D71@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Bastien , emacs-orgmode@gnu.org, Vinh Nguyen Hi, I'm sorry my point was buried in quoted text. I did read Samuel's post. But my question was whether we couldn't *avoid inventing new syntaxes*, by using the already existing link syntax with custom links and export handlers (plus possibly some some new functionality to user-customize the faces of different link types in Org-mode). e.g. : [[color:red][some text in red]] : [[class:highlight][some highlighted text]] It's already trivial to write one's own `color' and `class' custom link types with export handlers to turn this into HTML such as: : some text in red : some highlighted text (where the latter example would be styled by CSS). Doing this in exported text requires *no changes* to Org-mode. It also does not require finding one solution that fits everybody. If one wants Org text styled in these colors, highlights etc., I suppose it would require changes in Org-mode: not just user-customizable faces for different link types, as I wrote in the previous message, but a function to define link faces on the fly from the PATH part of the link. Christian Carsten Dominik wrote: > Hi, > > Can we please first read Samuels post about extensible syntax? Before > we invent 20 other new syntaxes? > > http://thread.gmane.org/gmane.emacs.orgmode/10204/focus=10204 > > Thanks! > > On Aug 10, 2010, at 8:14 AM, Christian Moe wrote: > >> Hi, >> >> >> >> >> - this would be extensible, e.g. >> >> >> >> [background[yellow] highlighted text] >> >> >> >> could export to the following html >> >> >> >> highlighted text >> >> >> >> - this would avoid "{}"s >> >> >> >> - this would look more "org-like" than the pure latex solution >> >> >> >> the only issue with the above is that it may conflate a new /markup/ >> >> syntax with org-mode's existing /link/ syntax. >> >> >> >> Thoughts? -- Eric >> >> I'd like an extensible inline markup construct (not primarily for >> coloring). >> >> Would it make sense to hijack custom links for this purpose, and use >> existing bracketed link syntax rather than add a new syntax? >> >> For semantic tagging (my chief interest), one might e.g. define a >> `class' link type and an HTML export handler to wrap the contents in >> tags. >> >> : [[class:animals][some text about animals]] >> >> As for color: If one is satisfied with getting colors on export, >> defining a `color' link type and appropriate export handlers will do. >> >> : [[color:red][some colored text]] >> >> If one also wants the text to appear in the right color within >> Org-mode, and does not want the pseudo-link markup to be underlined >> and look like links, it would require additional Org functionality (I >> think): User-defined custom faces for different link types. >> >>>>> What syntax to use... >>>> >>>> I've thought briefly about the following syntax >>>> >>>> [color[red] text to be colored red] >>> Nope, I am against this syntax. If we introduce a more general syntax, >>> then it should be done in the way Samuel proposed. WHich means >>> we firs get a keyword indtroducing the piece, and then properties. >>> Like >>> $[style :color red the red text] >>> or >>> $[face :color :italic t red the red text] >>> Something like the $ before "[" also would seem critical to disambiguate >>> from other uses of "[". >>> However, I am not too excited about extra syntax to get this kind of >>> thing. >>> Would not oppose it, but probably never use it. >>> - Carsten >> >> Those examples are not very readable IMO -- without a separator it's >> hard to see where the property values end and the marked up text begins. >> >> Yours, >> Christian > > - Carsten > > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- Christian Moe E-mail: mail@christianmoe.com Website: http://christianmoe.com