From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Implement texinfo @ref dwim Date: Tue, 05 Feb 2019 18:31:28 +0200 Message-ID: <83lg2utcwv.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="92404"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 05 17:32:04 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gr3di-000NqH-5f for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2019 17:32:02 +0100 Original-Received: from localhost ([127.0.0.1]:34509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr3dh-0004vc-3p for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2019 11:32:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr3dU-0004sV-Cc for emacs-devel@gnu.org; Tue, 05 Feb 2019 11:31:49 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr3dR-00047Z-Vq; Tue, 05 Feb 2019 11:31:46 -0500 Original-Received: from [176.228.60.248] (port=3099 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gr3dK-0001Th-Vz; Tue, 05 Feb 2019 11:31:41 -0500 In-reply-to: (message from Robert Pluim on Tue, 05 Feb 2019 13:10:07 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233003 Archived-At: > From: Robert Pluim > Date: Tue, 05 Feb 2019 13:10:07 +0100 > > This has been sitting around in my patch queue for a while, and Iʼd > like to get it in so I can also get the manual update into the texinfo > project. I think Iʼve addressed all the comments from the last time > around. Thanks, I think this command will be useful. > * etc/NEWS: Describe new texinfo dwim reference functionality. I understand that the corresponding update to the Texinfo manual will be submitted to the Texinfo maintainers? If so, the NEWS entry should be marked with "+++", I think. > +(define-skeleton texinfo-insert-dwim-@ref > + "Insert appropriate `@pxref{...}', `@xref{}', or `@ref{}' command. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Is Emacs smart enough not to highlight these as links? > + ;; parenthesis > + ((eq (char-before) ?\() > + "@pxref{") @pxref is also good inside parentheses, not just after the opening paren. Can this command be smarter and support also cases like (bla-bla yak-yak @pxref{foo}) ? > + ;; beginning of sentence > + ((looking-back (sentence-end) (point-at-bol 0)) > + "@xref{") What about BOB? Can we produce @xref there as well?