From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 wE69FX8APmaydQAAe85BDQ:P1 (envelope-from ) for ; Fri, 10 May 2024 13:09:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id wE69FX8APmaydQAAe85BDQ (envelope-from ) for ; Fri, 10 May 2024 13:09:51 +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=F+6Qlt8+; 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=1715339391; 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=PUEYCjEh3hjJSxlZAtP5HXQZyb3Hb8evdnEmK/E30MY=; b=saYsZhtsaucST66q5rvbWiYvQMsc2UaZdkqNYUQYyQa/JMYC7iV29rZnMSEDVPSQtKSoRU 1nTcvm3U9QwToeP9rIj4GshRz46WCnUkLGO6YEYxR3jY9IKqrsRZrIycvXAphu6hguQZL2 owkd5hZ8W+EBuhhYD+OQdwBDM4szx3epn9HWXOAIZhiCCnumHz+AmtN3GLk2NtFTpNa0xA 9wCMovlB/ZZEj1WznWdgFrWEv0kAMWryJotTOsjZ6ibk9WCk69SjjfmBpjRtiBIlsMnnSr ndUqcZXJUcgLkAcnx5HOaMPhmAa7TvYPqMGTogZysVSqwrce9/uh3HH9ZYIxDA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715339391; a=rsa-sha256; cv=none; b=f5vlCulg/3LP6n3bDz8XSvbCHk2Ja6riRc93lX7dJrbJd1htbQ1EdwMniU+ISMHGd0yTs9 WKue2JNd7kJT3Fs+LtBFU/MEDnPhkjqGnk5NxtkHOxSewARdfn8c1s1hKTaOgLJ+ZImpUF mm7xw0QfgBzdu8A2DfB+QGbNSpcGOUMjSZrIMl4cMg2Vt+g3MfG0ck/mFrTk2YU5CwRQW7 yLU8dEirEv7Z6koXz/sTHUyUnbUniB2Ou0kcJZ/THfj62oquf878qUkdxAkjcsgg286hXP A24BrwaNbhznSJszBq4WTf0bWMky0Sv6oVeq4MCvNU8wdDNLSWomoBorJqgxhQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=F+6Qlt8+; 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 E98473A62E for ; Fri, 10 May 2024 13:09:50 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5O7j-0006M3-6a; Fri, 10 May 2024 07:09:11 -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 1s5O7g-0006Ln-4w for emacs-orgmode@gnu.org; Fri, 10 May 2024 07:09:08 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s5O7e-0007HD-Bx for emacs-orgmode@gnu.org; Fri, 10 May 2024 07:09:07 -0400 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2e3e18c23f9so24187991fa.3 for ; Fri, 10 May 2024 04:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715339343; x=1715944143; 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=PUEYCjEh3hjJSxlZAtP5HXQZyb3Hb8evdnEmK/E30MY=; b=F+6Qlt8+YRYlZ1QYOC2CZdq4yfT187U+EFAzjs7yPjVPQMpSbN4gJWtszID647tiX9 YG42rINwcsdiqixSV4X5IodDJoL6Kuo3SoLFT8paF9dJBHmL9q+pTPKWc2mfqAlT3GcT edtaWzNbmQ9PCr1QOEGoVXRM5/s+hLRUZrpL0XR74T1FxJJu9MdsVTUSbAHO3puT8gAl 2I9evyL/qZyxSYBGkoEjW63mTfoWeyJ07nO/+bGPHOJkLpzZStr0twHps7B2UxReUEc7 2epSNxLx5RVfYJ/6s0npd6dqeQZFLD/V8E/uN1jZgAPcwh5PcSFmijt81y4zbVYVWbym 9v8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715339343; x=1715944143; 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=PUEYCjEh3hjJSxlZAtP5HXQZyb3Hb8evdnEmK/E30MY=; b=qewJgFgGJBxmkJ/NCQzV01JeUVRZI+S+NYow35YbOff9Gv/WRtBe8V08ALNO3eL4r6 WVFJn4pt8Dxl9L5pKHyGnEj6ckbC7YjVbuh7CKxmS+MUjLDt7oi2oEY4vUPp+kgFjJC/ quIlrhehKWlI23U95CHztMZzH0lqez8E4/sSZsLStHWYhKi1QAXFY3dVJE7vO1VOYxfO NemqIVqTtt0zWIJ1ui1cIM02U3XeKahxEDhEyn2h8J1urnikKspSD+zjhF4tkXJiDrnh 3GrbDSIsByDvjy4/me4Px4XfZ3ZabcG94ztQKUR+PS21r2d/K3SOCticl1mq4TLDLDuT IMVA== X-Gm-Message-State: AOJu0YwOxQ0z3EGJ3VCx7hbFR22OcmRe6rBYyHVuUPEvi0s/oTk0sHXe 7810g4xmTxa/SJOQxEXzPm9g63VXUoMfwGNkTbFhSSy/wOCgExj3qkJvQQ== X-Google-Smtp-Source: AGHT+IFtetV2h/iEtdgJodeGdDtPrmuSUDHJXWeFLdzjhwbu0iM3nT2k7WuUYcWyNvlpa+eLR9sfxw== X-Received: by 2002:a2e:be13:0:b0:2de:25e2:6187 with SMTP id 38308e7fff4ca-2e51fe57b06mr15643221fa.23.1715339342725; Fri, 10 May 2024 04:09:02 -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 38308e7fff4ca-2e4d0ef21e6sm4772881fa.68.2024.05.10.04.09.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 May 2024 04:09:02 -0700 (PDT) Message-ID: Date: Fri, 10 May 2024 18:09:00 +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> <938098de-6933-4668-85b0-fbfbc02dd949@gmail.com> <87v83pnm56.fsf@gmail.com> <87seysnggb.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: <87seysnggb.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::22c; envelope-from=manikulin@gmail.com; helo=mail-lj1-x22c.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.27 X-Spam-Score: -2.27 X-Migadu-Queue-Id: E98473A62E X-Migadu-Scanner: mx11.migadu.com X-TUID: iAW/aiflQmGJ On 09/05/2024 04:26, Bruno Cardoso wrote: > On 2024-05-08, 18:20 +0700, Max Nikulin wrote: > >> I have not managed to get all known groups with `shortdoc-display-group' >> in Emacs-28. Is it a feature of `shortdoc' in Emacs-29? > > In Emacs-29 `shortdoc' is an alias for `shortdoc-display-group'. > Interactvely, it prompts the user for a group from `shortdoc--groups' > (that's what I meant by "all known groups"). Thank you for the explanation. Reading "lists all" I expected something like list of all info manuals in the case of M-x info RET when there are no info buffers yet. >> "\\`\\([^:]+\\)\\(?:::\\(.+\\)\\'\\)?" > > `shortdoc-display-group' already handles empty group or function. > Replacing "*" by "+" will throw an "Args out of range" error in the > corner case you mentioned ("shortdoc:::file"). So I think it's fine to > keep "*" there. Out of range error happens because of `string-match' is called despite `match-string' failure and match groups from some earlier regexp are applied. Generally `match-string' should be inside `if', `when', `and', etc., however I agree that the regexp with stars always succeeds, perhaps really matching nothing. That is why I do not insist. The following garbage in - garbage out case is a bit confusing: => "No such documentation group " > ol.el: Add support for `shortdoc' link type Bruno, has you signed the copyright form? This patch is above the TINYCHANGE limit. It will be a bit less work for the maintainer if you attach result of "git format-patch" command. It adds email-like headers allowing to properly set commit author. > * lisp/ol.el: Add support for storing and inserting links to `shortdoc' > documentation groups for Emacs Lisp functions. List of new functions is missed: * lisp/ol.el (org-link--open-shortdoc org-link--store-shortdoc) (org-link--complete-shortdoc): Add support... > * doc/org-manual.org (External Links): Add shortdoc link type > documentation. > > * etc/ORG-NEWS (=ol.el=: Support for =shortdoc= link type): Document > the new feature. Empty line is separator before free-form comments, so list of formal changes should be dense. > + (condition-case nil > + (progn > + (shortdoc-display-group group fn) > + (and str (not fn) (search-forward str nil t))) > + (user-error "Unknown shortdoc group: %s" group)))) Sorry, it does not work so. It means catch `user-error' however `shortdoc-display-group' signals `error'. Try to enable debug-on-error and to open a broken link. Either `condition-case' should be dropped or proper signal should be captured.