From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: pxref in texinfo export Date: Mon, 25 Feb 2013 23:23:37 +0100 Message-ID: <87d2vodod2.fsf@gmail.com> References: <87hal0dqgn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA6Sf-0006jv-Fz for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 17:23:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UA6Sd-0000BY-TT for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 17:23:53 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:52223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA6Sd-0000Aq-Ky for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 17:23:51 -0500 Received: by mail-wi0-f182.google.com with SMTP id hi18so3879856wib.9 for ; Mon, 25 Feb 2013 14:23:50 -0800 (PST) In-Reply-To: (Jonathan Leech-Pepin's message of "Mon, 25 Feb 2013 17:06:03 -0500") 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: Jonathan Leech-Pepin Cc: Org-mode , Subhan Tindall Jonathan Leech-Pepin writes: > For @xref{} I would need to know if it was at the start of a sentence and > followed > by a comma or period. > For @pxref{} I would need to determine if it was at end of sentence, > mid sentence followed by a comma or within parentheses, and not preceeded by > "see" or "see". Although even this would not suffice, since there are > contexts where > @ref{} is the better choice. FWIW, from `org-texinfo-link', (org-export-data (org-export-get-previous-element link info t) info) will give you the exported string so far in the container element and (org-export-data (org-export-get-next-element link info t) info) will return the string that will follow your link. You need to upgrade Org for the first snippet, as order for `o-e-g-p-e' return value has changed. Regards, -- Nicolas Goaziou