From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: In-line code, italics, quotation marks, etc. Date: Tue, 04 Mar 2014 22:39:30 -0500 Message-ID: <878uspe2kt.fsf@gmail.com> References: <20140304210858.GB26421@pdavismbp15.iscinternal.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WL2gZ-0006X1-Me for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 22:40:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WL2gR-0007Li-Kd for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 22:39:59 -0500 Received: from plane.gmane.org ([80.91.229.3]:48539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WL2gR-0007Ld-Ec for emacs-orgmode@gnu.org; Tue, 04 Mar 2014 22:39:51 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WL2gP-0006gj-Nx for emacs-orgmode@gnu.org; Wed, 05 Mar 2014 04:39:49 +0100 Received: from pool-98-110-160-12.bstnma.fios.verizon.net ([98.110.160.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Mar 2014 04:39:49 +0100 Received: from ndokos by pool-98-110-160-12.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Mar 2014 04:39:49 +0100 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Peter Davis writes: > I'm trying to create an org page that contains a list of instructions, > some of this include code and/or URLs. I'm having a dickens of a time > trying to get this to format correctly, and the documentation isn't > much help. For example: > > - I want to have a numbered list with some of the steps being or > containing code, in monospaced text: > > 7) =something "abc"= > > However, the second quote seems to prevent the =...= notation from > being recognized. > > - I want a URL that does NOT get converted to a link, and in which I > can place italics to indicate that parts of the sample URL should be > replaced with other text: > > http://localhost:/path/to/file/file.html > > In this case, "port number" and probably "/path/to/file/" should be > italicized. > > - Of course, combining these, I get situations like: =var str1 = > " some other text."= Embedded equal signs, quotation > marks and emphasized text make this a nightmare. > > Can this be done, or is this just more complicated than org was > designed to handle? I can, of course, edit the exported files, but > that's pretty limiting. > Some of it can be done by modifying org-emphasis-regexp-components - the default value prohibits quotes from appearing in the "border" (right after the initial = or right before the final one) - see http://thread.gmane.org/gmane.emacs.orgmode/82300 and http://thread.gmane.org/gmane.emacs.orgmode/82571 for more. In particular, Oleh shared his method of modifying this variable - see http://thread.gmane.org/gmane.emacs.orgmode/82571/focus=82669 A slight modification of his method: (setf (nth 2 org-emphasis-regexp-components) " \t\r\n,") (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist)) allows both single and double quotes in the border. Since this is the third time in as many weeks that somebody brings this exact problem up, this probably qualifies as a FAQ. But before going there, is there *any* reason to forbid quotes in the border? IOW, maybe it's a better idea to change the default value of org-emphasis-regexp-components instead. AFAIK, you cannot have nested emphasis, so getting emphasized text within verbatim text will require the more backend-specific methods that John describes. -- Nick