From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id mC3sGzdnN2Z5pQAA62LTzQ:P1 (envelope-from ) for ; Sun, 05 May 2024 13:02:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mC3sGzdnN2Z5pQAA62LTzQ (envelope-from ) for ; Sun, 05 May 2024 13:02:15 +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="U/3anncx"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714906935; 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=DMhTOY38mXPtXGEVxs1J9EjHPmG16WHw9TpdaPD24PA=; b=n3F8Ey5993AgvKaXHrxq2kDEsO6aNN7sveCquLQBlKYGbQkCyzN0y46PuZGBmlzV8pyDqO QtNWdyQnBrQw+7jJ10UJvJK3Ukul5Jx7he8XnrJFdjo8c8MNSdBL/oG5051JbFTAxoaJ3l xMAOgzUqBALWHryfKLfnjPwI93RzGDpm9U6SH8Ximo1KNKQFmouT1//x+EnGve2EQxxmvx cmCVSTb7pZ/vNW+3uNttvoey+FGNgMMNu4bzCbCcBYilydEUd+Lmkn33CGG0vUuZHNgCFL Lj3pROSE8g5MAeAszbFdVOVLhOI9jcsnQnT6NpQTir5d1b16r+XuccYBZQ9zuA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b="U/3anncx"; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714906935; a=rsa-sha256; cv=none; b=DTylqtnJ1PNzclSaYzyj1mhLJwVYg+VDY0hzH+4XZuDd+ofCLhXG285jF6MvnVDdPOxbtK w0Bybu7zcumQZi5Wp/rxT1c+7KVMXdj1y/bWY2LeniebgtEn/PeL4yxwT8hVhV0vWcIIFr Zm6wG9D5jjIOHlpQINikysEpjUa5DnDmqqrepJ6sUqpMNZeC2Iz21yY4QWcjilaFOn7SV0 Xl80ETLKadMO0xLJJKNTPpp4sjWVuSMSlOfIButyBd1qInT/SHiWlOTAyLzpDp//ztt05V VKWtmqquhVhgoqyfcFoWdZYnvBeF0f02aWEG4tMsSR0sK8Vp2Y3ffQPUGfHZQg== 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 2E541698EF for ; Sun, 5 May 2024 13:02:15 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3ZcS-0003Vi-9r; Sun, 05 May 2024 07:01:24 -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 1s3ZcM-0003Td-1L for emacs-orgmode@gnu.org; Sun, 05 May 2024 07:01:18 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3ZcI-0005WG-Ry for emacs-orgmode@gnu.org; Sun, 05 May 2024 07:01:17 -0400 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-51fea3031c3so1190281e87.0 for ; Sun, 05 May 2024 04:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714906869; x=1715511669; 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=DMhTOY38mXPtXGEVxs1J9EjHPmG16WHw9TpdaPD24PA=; b=U/3anncxl2UsphaVw47HLD4sQGMhL/OK+GXVNWCZV13q9RlMU7qiNFE/SHTUHhWJWY KlI2oRf0tkvDoSmVCmvADH5wnVmHLpsfY76TlJ04yu4HgasyIkSePae/wEJNnRfE7Cx3 uPXER4zYRHkTUR0F7WKAX1r5LnG26qxgCUI+6ymOEA05y0ZFwDtDYm6FF1YNPYGQ478R 0VovskK6HQQbSx2rqwCxoh4SqXP3kB/6H2l9Mwf86F765xrkR8u4G6Hcp7S7Xmdbizhx Pm+28yPZgAF0A0RY+fHcDxnvmNX5x1rOXVU7M39D289cY01AGCYEtg1O637TR/cLrihL lO8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714906869; x=1715511669; 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=DMhTOY38mXPtXGEVxs1J9EjHPmG16WHw9TpdaPD24PA=; b=VeysyPfZkAxMPM9nwgCfDwlyND+P22kUte4W3Z+FqreWiRO/ChSoQM8VwGPPf5Fx0F L6f+XUnHx7AHXIiaed2KMuCJHKYrEvn0os0HF5zqw0fCq1qgYBEM0L8laoabP/TEVXzt fSUB5FNrWswU1IrxhF9WSdtWSQXOeyeiM21Ox6k56mtA4KHTat/RVq2BwxTo9JYMQ0BN uiZCo5zP58cD8q7BqzMubEm3js09qpWa2+rWHbdQgAQFVjODB6u8hOrYFZeAcWGaHDle vcEyythN2o1lzxtMBh1ADU2eUrWRD/4HMByofwA+u/Xj1FXl9hwjo61JE/nG2upO/woy euqg== X-Gm-Message-State: AOJu0Yy8l1Q4tRYed3Agh5r/VS/qKtWcWuPkNiudyOQep/UkhonxfGG8 N5v8vHdYzepmbXrsj/u5VJYasBeFm84lLLMJa7B/0+k2jcGQ74ReXoVxCw== X-Google-Smtp-Source: AGHT+IEM05Vfjj5XJ0UZvgxsZPGhZuz8J3f8iUcIW3viMeIS4/rrX3upSkTgN6+Kx5v8t8cmS61J9Q== X-Received: by 2002:a19:9149:0:b0:51f:3f6c:7463 with SMTP id y9-20020a199149000000b0051f3f6c7463mr6174498lfj.52.1714906868995; Sun, 05 May 2024 04:01:08 -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 t18-20020a195f12000000b0051f95499c00sm881348lfb.103.2024.05.05.04.01.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 May 2024 04:01:08 -0700 (PDT) Message-ID: <9f6bbe0f-7cc2-4d55-a77d-331c8f71bb2c@gmail.com> Date: Sun, 5 May 2024 18:01:07 +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> 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: <87h6fdeb3i.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::134; envelope-from=manikulin@gmail.com; helo=mail-lf1-x134.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.62 X-Spam-Score: 2.62 X-Migadu-Queue-Id: 2E541698EF X-Migadu-Scanner: mx13.migadu.com X-TUID: ynOabHXXV71D On 05/05/2024 00:33, Bruno Cardoso wrote: > > I updated the patch to use the optional function argument instead. Thanks > +++ b/doc/org-manual.org > @@ -3372,6 +3372,10 @@ Here is the full set of built-in link types: > > Execute a shell command upon activation. > > +- =shortdoc= :: > + > +Link to short documentation summary for a function group. For more information, see [[info:emacs#Name Help][Help by Command or Variable Name]]. I would consider explicit mention that it is related to Emacs Lisp and perhaps that the origin of its name is the ~shortdoc-display-group~ user command. might be a better link. This line is rather long though I do not have a link where formatting conventions are documented. > +++ b/etc/ORG-NEWS > @@ -1369,6 +1369,10 @@ place the entry in the ~Misc~ category if ~TEXINFO_DIR_CATEGORY~ is missing. > =TEXINFO_DIR_TITLE= is renamed to =TEXINFO_DIR_NAME=. > The old name is obsolete. > > +*** =ol.el=: Support for =shortdoc= link type > + > +Add support for storing and inserting links to =shortdoc= groups. Again I am unsure that it is clear to all readers. > +++ b/lisp/ol.el > @@ -1582,6 +1582,41 @@ PATH is a symbol name, as a string." > :follow #'org-link--open-help > :store #'org-link--store-help) > > +;;;; "shortdoc" link type > +(when (version< "27" emacs-version) Is it correct? 2a7488d42d8 2020-10-11 05:51:16 +0200 Lars Ingebrigtsen: Add support for displaying short documentation for function groups git tag --contains 2a7488d42d8 emacs-28.0.90 > + (defun org-link--open-shortdoc (path _) > + "Open a \"shortdoc\" type link. > +PATH is a group name or \"group::#function\"." > + (string-match "\\`\\([^#:]*\\)\\(::#?\\(.*\\)\\)?\\'" path) I think, it is enough to use [^:] since next group is started from "::". You may use use non-capturing group \\(?:::# ...\\) (requires update of next index below) unless you are going add search code back. I am unsure concerning your intentions. You dropped search code, but "#" after "::" is still optional. > + (let ((group (match-string 1 path)) > + (fn (match-string 3 path))) > + (condition-case nil > + (shortdoc-display-group group (intern-soft fn)) > + (error (message "Unknown shortdoc group: %s" group))))) I do not have strong opinion what is better here: `user-error' (used in earlier revisions) or `error'. However I do not see the point of capturing original error and signalling another one if it is not `user-error'.