From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id QORwFS/mNWaqWAAAqHPOHw:P1 (envelope-from ) for ; Sat, 04 May 2024 09:39:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id QORwFS/mNWaqWAAAqHPOHw (envelope-from ) for ; Sat, 04 May 2024 09:39:27 +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=A+KC4KZh; 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=1714808367; 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=oWB7oNAvmtdy4rJ0b5lXeg0coAQUSXc6xnnBOW/cwyY=; b=psGpsgAfRIrPRANW4a/JzpA0k/3kOpQYQY/5juG3z+TbRtzw4v1zZcUuLUgPAlyonCMKnF CQ7QYKTo2iCe6V5xXpknEIRFPOO1GwfznFkbuj8taZn8vU03xcWIvI7FJg/fb2xJEYEjop MO+Xz24zxD3UAmjmmEoBo1IbgaZLVh3npROEWTs2CE2K9zzQQred0fZgghrkxpXako17eK +/d2rHbzlbXUo6B29Ev9bOIc5vezezDRT0wqTDXExd/T0ImtXOqUhNM4rHdelXP8MTgoGx Chnmvc7FNYtsOi0eX6/LD5z5E7kz5rsRd1Xu/ki9bdK/xTcx1C1dpR45Ma3u6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=A+KC4KZh; 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=1714808367; a=rsa-sha256; cv=none; b=d4zHc1MTHtUwg9ubur8ZasesKEtWpwWxoTmD4Dji8dS3YdFseY8ENivkHNwweuYMJhWsiC 0rgCjVffGmMvfxqXN7p+pqdnPGTyjjfocaXK0yRV1rgXUoL2wxdC9GTsFpO6UW5fmE88mF o4fReletSckkqKk8svdEC3nxS6PWhAyBHQ1yAJJnKhasY78SzeX73bSDbv0FWeACtTAUOE mlsPJq1JeLdVFDb8N3LKS5P5FPqqzYsog8E8MqA4nwjJytvTXJnVhBVphHJjmMNnxbNhHJ xDxs224pFEyKO0AHD5CApuI0UXFx6q/MWt0G/ztNbZrC8/NELQGzfkK4KbwXvw== 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 23EF5A1C4 for ; Sat, 4 May 2024 09:39:27 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s39yp-0001d7-CF; Sat, 04 May 2024 03:38:47 -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 1s39yn-0001cf-MG for emacs-orgmode@gnu.org; Sat, 04 May 2024 03:38:45 -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 1s39ym-0006ps-18 for emacs-orgmode@gnu.org; Sat, 04 May 2024 03:38:45 -0400 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-51aa6a8e49aso485516e87.3 for ; Sat, 04 May 2024 00:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714808322; x=1715413122; darn=gnu.org; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=oWB7oNAvmtdy4rJ0b5lXeg0coAQUSXc6xnnBOW/cwyY=; b=A+KC4KZh4q611fy+dcgVpW0DpfR43tSbOSAh83fyT9wjYNTlynYcOTHYdWgtkb/6ww kf3Da/C7hVRqOSW5/QeP4iRE3QN9NVPLC4gCTPcR7ugKG0nhsMz47Gg2tG7FDKmJ1mJe rp1ROYWx6qfgLul7EtDtXBMYi0G0PNbzZdne2vXirdZl/lFx138fv3TOIMjTBzH4lJ1B 7B0zA+vXBSG/39z9huunbs9tMNqj+OdZBp8bvpU6YXISGBnSW8Z6Vs2I/MR9q8hq/uJ8 pnmHnk1i6pptv5ny6ogcAEVD7G8l7Ij/sINWDX0bM9uTDbGsKRZR47STvektY+8yR1n9 PN2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714808322; x=1715413122; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=oWB7oNAvmtdy4rJ0b5lXeg0coAQUSXc6xnnBOW/cwyY=; b=Uk4GPvZ1HFBPj2SyC9xByGgJty5y6qbOMHda5l+0p387hyfeB0de7henCWxrSfL2dl Z4ujJrEDMxTO4vzvaT56Gm+K7F2aFjyd7+EaugJ4wuOuVO/VO9X1u4NxQT3V/woz8SF5 Ejc+wMcRR/WpcHjfECx3FXGpsmemocTUp5yqRCdF6QiS7JW3nBAI4rKQbBXZ8i2fuv6Q uyGCm3LHkOVOEjDH2bMk4eX1sgn0UaQbVTk4huafRIxEX4NUkSzf3niSIJYr1AFL9qVQ LFSKHMF3jzU7b7D/SNVT+175CxvK4BAKJachymEZ2E81eKezTrDMcRwpzqQNgFMi35oi G4Ng== X-Gm-Message-State: AOJu0YyJlbZtGVWkD7QRQ7rAZh5TV9cBGuYqaBc11vKyjB7KtZHQs09+ 82L3edZFxbQThYryBoWD+m1lgqH4D+WvKxbbqYZ5MWF86jYgnQ1W2JG95FqG X-Google-Smtp-Source: AGHT+IHKRgSH/HQyGg/swO9FHpvveaIROEZ/tcazIbgGKfTQ9wPL8E0dQp7F3ltehMmtAKll41H/Ug== X-Received: by 2002:ac2:4dad:0:b0:51d:c46d:8844 with SMTP id h13-20020ac24dad000000b0051dc46d8844mr2798191lfe.27.1714808321610; Sat, 04 May 2024 00:38:41 -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 h2-20020a19ca42000000b005189964a79dsm818531lfj.172.2024.05.04.00.38.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 May 2024 00:38:41 -0700 (PDT) Message-ID: Date: Sat, 4 May 2024 14:38:40 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Add support for shortdoc link type To: Bruno Cardoso Cc: emacs-orgmode@gnu.org 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> Content-Language: en-US, ru-RU From: Max Nikulin Mail-Followup-To: Bruno Cardoso , emacs-orgmode@gnu.org In-Reply-To: <87v83uefpd.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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: 2.62 X-Migadu-Queue-Id: 23EF5A1C4 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: 2.62 X-TUID: LBhT4CMa0Ok7 On 04/05/2024 04:41, Bruno Cardoso wrote: > On 2024-05-02, 17:41 +0700, Max Nikulin wrote: >> >> [...] > I implemented the search option by borrowing the regexp from `ol-info': It is necessary to maintain backward compatibility for `ol-info'. I do not know what kind of separator was added earlier: "::" or "#". I suppose, for new link type, rules more close to file: links may be used, see (info "(org) Search Options") https://orgmode.org/manual/Search-Options.html That is why I suggested shortdoc:GROUP::#FUNCTION. This way shrotdoc:GROUP::SEARCH_STRING is possible as well. > (shortdoc-display-group group) > (when fn > (re-search-forward (concat "^(" (string-remove-prefix "#" fn)) > nil t) Notice that `shortdoc-display-group' has optional FUNCTION argument. > (beginning-of-line))) > (error (message "Unknown shortdoc group: %s" group))))) > > It works, but I'm not quite sure if this is the best approach. I do not have strong opinion as well. Some points to consider: - Unambiguous parsing of link target. - Flexibility it respect to later improvements.