From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id cC2QGH+3OGYswgAA62LTzQ:P1 (envelope-from ) for ; Mon, 06 May 2024 12:57:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id cC2QGH+3OGYswgAA62LTzQ (envelope-from ) for ; Mon, 06 May 2024 12:57:03 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="I/A10SSL"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714993023; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=jVzXVLR9R+Bh53G7th7P79Sdo5ivs19mpCmA2+TOnrQ=; b=A5XwevhrQGJXqPCawhfYPt35kKWPAdkzazpGb7Yu7YgbKQlvnRRmvBCyPaRj0N1HmVZ7Cm tRYo1YOzRQ0ZaJkY1QNH0DmlQIKtkQHgbOLtNWerr15sI4049uKy5scCtB2/WiALDkNJN5 Mmtjw0fqujOyXmhSaRSSi9nzUzhKGwT1jO8AZ1ubF3kR62bvft8tjKOpidVkogFMohAlNI GOkkGL/gGfYgqlyTW7904k/+MGgEOBRHVen75KcPdACnZrgKJ6e+Rjv8dU9GJf+GkCdvsL x65mkAXZRV+Q6sfwWKq7nOqdPvZrtjPzqZBLA7BQodkD2/AXNwC85iYG+htm+Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714993023; a=rsa-sha256; cv=none; b=j5ZxRIkKQy8UrKJ8Gh7w6J+O8KUmtcsYzjDuP22Tw/YVFjCOXRbwv/WxA4dpR0JWAMABKa fOTKtewRzIMFXvLgWwhAM+dW1pN4gdjukHLQPYH1f1b2QmMlL+bzvN3+P1BuTNwbHdJgcL 6DQmow7e4hUxi4g5DEZV9j+FFfgBBHewc0nLfDvZ9Ah0gGq5T7t3A9wF/EixYzmB9Gv6b7 Lr6M/gwW/cXNJJS3vb/oKDlfu/td/COFTTZRDYHT0XaeqLDcutS/iHbcKHIV68CW6KNAeQ 8Ppctndnitf+12iCPPHWoz5GeEfUDAV7XBssXQ4j4dmb3JexFgjZXN5krngq7w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="I/A10SSL"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 27F8D71C95 for ; Mon, 06 May 2024 12:57:02 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3w0b-0007Iw-7T; Mon, 06 May 2024 06:55:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3w0W-0007IL-Tn for emacs-orgmode@gnu.org; Mon, 06 May 2024 06:55:46 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3w0Q-0007wl-O8 for emacs-orgmode@gnu.org; Mon, 06 May 2024 06:55:44 -0400 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-51f1b378ca5so2853634e87.1 for ; Mon, 06 May 2024 03:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714992935; x=1715597735; darn=gnu.org; h=content-transfer-encoding:in-reply-to:mail-followup-to:cc:to:from :content-language:references:subject:user-agent:mime-version:date :message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=jVzXVLR9R+Bh53G7th7P79Sdo5ivs19mpCmA2+TOnrQ=; b=I/A10SSLIqSDoHNTF1Qc9Mp2D/yMxJXdMmKxypP+pdtontrIgOc/53hT80qUV0ThBA XESjOQClhQ+L6W0OJhUYYi3g0JYEKwDX2E+GhU1PIlyYobM8Btx/vVYP+HCOenJbIz2i Ht438DxgyvfBRuIB4ZxzJhCKHQ2T+D+zMfiYl7qm2wTvViLyIR5LHPqgaIReceTg5xu1 qSNizXrYdxesLhDjdpzJ40xLgqFwTLs2sABEoie92nXylC7D+ihK0ipBzHfVwnIkVwaB 5dAZSp3EJic4HGenIxqSC/tXdjlqU3Qz07opA5Z0qjR0Unm/BP2Tbx3wkLswFVOhwRP8 KPBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714992935; x=1715597735; h=content-transfer-encoding:in-reply-to:mail-followup-to:cc:to:from :content-language:references:subject:user-agent:mime-version:date :message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jVzXVLR9R+Bh53G7th7P79Sdo5ivs19mpCmA2+TOnrQ=; b=wjrlDhRZZOhPOxke/BUFr4cJ0RiCjAt5RvBIqHOlgJXAQB4Wfwlqlh8s7gvHkMHoVz enfQ1tOGUsaHs+RdX5vzRt7/rGdi6CPKoyCIVX7HYaR9GpVQQy8mMgf850aQz9yLlpKU KnNrYqBjEydxORfGaFYXRt5gUe6JlX88ZDSGJ3wYITiewxi1kD+8jH+hpI/qb3W+yLuY VSMmPzSpZNqimwaikmLUZTYQ08yDQBFWKZ7p80P/zyAYHWxF0hjCVXHeHctTdw2Iqr/A d9UHOjXlRz3hWFfy0Ot8YKZdiDOip7kmiPw/QwZDyWxmDHSyZgLU/DVpneuAPPNUVSTv v62Q== X-Gm-Message-State: AOJu0YxKz2fkkPIzcXV1X8LheR42cl9m4Zm9kgYb0YnVuv/VvhRQv1MU lYpYRGgkR9joClJwu3awzofGYWCaeMSyKPMZ2RI/svbgc+F/zFLzKXBvDw== X-Google-Smtp-Source: AGHT+IGUh5UhRmD9BcVik3Apmn6eU4hjlEyCbLQ5YMjMHboBuow0Ax4dDobuEL/kJd9kxCesSMLgCA== X-Received: by 2002:a05:6512:3609:b0:51d:23d8:3f9e with SMTP id f9-20020a056512360900b0051d23d83f9emr7894385lfs.27.1714992934765; Mon, 06 May 2024 03:55:34 -0700 (PDT) Received: from [192.168.0.102] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id d34-20020a0565123d2200b00516c50689dfsm1608780lfv.70.2024.05.06.03.55.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 May 2024 03:55:34 -0700 (PDT) Message-ID: <938098de-6933-4668-85b0-fbfbc02dd949@gmail.com> Date: Mon, 6 May 2024 17:55:33 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Add support for shortdoc link type References: <87zftatdkr.fsf@gmail.com> <87v83xer0d.fsf@localhost> <87wmodtqxt.fsf@gmail.com> <875xvxs9hi.fsf@localhost> <87ttjhtjx1.fsf@gmail.com> <4b69d3b8-cfe7-4ba2-b9b5-872bcaeb6fe6@gmail.com> <87v83uefpd.fsf@gmail.com> <87h6fdeb3i.fsf@gmail.com> <9f6bbe0f-7cc2-4d55-a77d-331c8f71bb2c@gmail.com> <87y18ondrt.fsf@gmail.com> Content-Language: en-US, ru-RU From: Max Nikulin To: emacs-orgmode@gnu.org Cc: Bruno Cardoso Mail-Followup-To: emacs-orgmode@gnu.org, Bruno Cardoso In-Reply-To: <87y18ondrt.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=manikulin@gmail.com; helo=mail-lf1-x136.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -2.28 X-Spam-Score: -2.28 X-Migadu-Queue-Id: 27F8D71C95 X-Migadu-Scanner: mx11.migadu.com X-TUID: xcyiFGQbyWqR On 06/05/2024 04:35, Bruno Cardoso wrote: > Fixed. I have tried the patch. It mostly works, so I do not insist on further polishing. However it should be resent with proper description. > I had dropped the search code because I wasn't considering the search > option properly. If I understand correctly, both "::" and "::#" should > match a function OR a search string? (e.g.: > `shortdoc:text-properties::#pos-property' will also search for > "pos-property" in the shortdoc buffer). This is the current behavior in > the attached patch. It seems my comments have led mostly to confusion rather than improvements. I am sorry for that. I have in mind 2 kind of links: - that may be handled solely by `shortdoc-display-group' with second argument. - that should cause (shortdoc-display-group group) (search-forward fn nil t) ; or (word-search-forward fn nil t) For `re-search-forward' used in the latest patch revision, from my point of view, link should be (similar to file: links). Support of search variant may be dropped, but that case I would not allow "::" as the separator. Mandatory "::#" allows to add text and regexp search later. > +++ b/doc/org-manual.org > @@ -3382,6 +3382,13 @@ Here is the full set of built-in link types: > > Execute a shell command upon activation. > > +- =shortdoc= :: > + > + Link to short documentation summary for an Emacs Lisp function group. > + Since Emacs 28, user command ~shortdoc-display-group~ lists all known > + documentation groups. For more information, see [[info:emacs#Name Help]] > + and [[info:elisp#Documentation Groups]]. I am unsure that links without description is a bright idea. Try https://orgmode.org/manual/Activation.html and M-: (info "(org) Activation") RET to get an impression of export result. > +++ b/lisp/ol.el > @@ -1582,6 +1582,44 @@ PATH is a symbol name, as a string." > :follow #'org-link--open-help > :store #'org-link--store-help) > > +;;;; "shortdoc" link type > +(when (version<= "28.0.90" emacs-version) > + (defun org-link--open-shortdoc (path _) > + "Open a \"shortdoc\" type link. > +PATH is a group name, \"group::#function\" or \"group::search_string\"." > + (string-match "\\`\\([^:]*\\)\\(?:::#?\\(.*\\)\\)?\\'" path) I just have realized that it is better to ignore anything unexpected after ":", e.g. if only ::# is allowed (no search text option) (string-match "\\`\\([^:]*\\)\\(?:::#\\(.*\\).*\\'\\)?" path) Try [[shortdoc:string:invalid]].