From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ENxnEMcR7mJqWwAAbAwnHQ (envelope-from ) for ; Sat, 06 Aug 2022 09:01:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2Pt/EMcR7mKQYwEA9RJhRA (envelope-from ) for ; Sat, 06 Aug 2022 09:01:27 +0200 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 CE4A12700 for ; Sat, 6 Aug 2022 09:01:26 +0200 (CEST) Received: from localhost ([::1]:49112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKDoL-0001LP-Od for larch@yhetil.org; Sat, 06 Aug 2022 03:01:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKDmj-0001L1-S7 for emacs-orgmode@gnu.org; Sat, 06 Aug 2022 02:59:45 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:44575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oKDmi-0006B7-2I for emacs-orgmode@gnu.org; Sat, 06 Aug 2022 02:59:45 -0400 Received: by mail-pj1-x1036.google.com with SMTP id e8-20020a17090a280800b001f2fef7886eso4775177pjd.3 for ; Fri, 05 Aug 2022 23:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=JsvvyaOazPKfRQT2vhLwq401PqdRU2WIAq13ZNJYmz0=; b=TUlgv+ozpLzy9ECdc/XZdAgk9etw9pxkybevDN5WlxAWJu3ndHmrO1tuV+eI+f2KiK 4eyFjiHoijDvaZ9Ww7JPQIzyqm0vbfchnTo2JlqRkAmlB6j1+nAUTlhi91x5l+8xOE09 eeclUmB5q6MmNSPGhpKbeFAcYkywZn9zIUvmGxG/Dhalb0iaTwfiHpeXjVyL7t1ICYNd ppw3MwxOmVdwebe2FuOTeUjOkepYaTVzu4zDb8czf+VBsBw2qXw0i9Yeow5//EaSvrvd W8/U8ekWrum4efJYP5X4tHDLC41wGWBK8GUSgi21NG9/DVH2P8IC1P+QTJHUM7SZ34pJ nm1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=JsvvyaOazPKfRQT2vhLwq401PqdRU2WIAq13ZNJYmz0=; b=k5Fd2e+wY2eRGJd7taQWRS0JUayzIqyxYmMpTZNkJRU+N+Kc9tgTKecjKV70mxGU1j 37nAIEUd7DHpgZDeUmC4W4cGI2jLON+DAiwcyDHqj+74d1yAckZB4nRJHI9fHl0CcK/A CapuG8Ne/gZfLfXvAGw+5nLjK5nB9Tb638Fww5GQ0m/EQEkAtJCu/B5JCTQejNbbHyFm WoBxKMAvaw9MhZIwQX74JcAE4k8GHDVzUYkUFyUV0vV6kajzyr0E0XcgJaDlo6Cwv74K CLl8kzsILIGve2XZaLdgsmNxd4aApf7em1+21+ddDlpj4BrJGMBnzFKZS0+hmnUduA0r XiDA== X-Gm-Message-State: ACgBeo1HJk6cCEaB2m/TzcMYEEe3K5w2/xFj9Y6fMONfWV36omWHLJMc saKF0ZDpWEAnu7/KFyRTzQw= X-Google-Smtp-Source: AA6agR5uP2CjLgKDhZvzWNcsmI/pRRWO25m2tlee7WboR77MZuQltckOgxUeGMv9HF+FOUTOoLDMww== X-Received: by 2002:a17:902:ff0f:b0:16f:923:a000 with SMTP id f15-20020a170902ff0f00b0016f0923a000mr10331346plj.66.1659769182489; Fri, 05 Aug 2022 23:59:42 -0700 (PDT) Received: from localhost ([1.83.155.1]) by smtp.gmail.com with ESMTPSA id m17-20020a170902d19100b0016d83ed0a2csm4144391plb.80.2022.08.05.23.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 23:59:41 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: Hugo Heagren , emacs-orgmode@gnu.org Subject: Re: [PATCH] ol-info: Enable :insert-description feature In-Reply-To: <8bbccdb4-52f4-b9b5-eb10-252bb15108ec@gmail.com> References: <87zgl1npow.fsf@localhost> <87v8s8n1bm.fsf@heagren.com> <87let39d3c.fsf@localhost> <877d4flu3x.fsf@heagren.com> <87cze5e84m.fsf@localhost> <87tu7gkb4l.fsf@heagren.com> <87y1ws6o0c.fsf@localhost> <87k08bjw0t.fsf@heagren.com> <47248a4f-10aa-0980-c054-563f30c05aaa@gmail.com> <87mtd0gthe.fsf@heagren.com> <78b97c9e-fced-0ee4-f3f2-3cbe81080ffa@gmail.com> <87sfms9dx7.fsf@localhost> <87v8rmd53g.fsf@localhost> <871qu9xv8q.fsf@heagren.com> <0da49392-26c6-8ba3-f657-647522d59342@gmail.com> <87zggrg2om.fsf@heagren.com> <87edy3t8o0.fsf@localhost> <87tu6zf2o1.fsf@heagren.com> <871qu3rpt9.fsf@localhost> <8bbccdb4-52f4-b9b5-eb10-252bb15108ec@gmail.com> Date: Sat, 06 Aug 2022 15:00:43 +0800 Message-ID: <87a68hn9es.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1036.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659769286; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=JsvvyaOazPKfRQT2vhLwq401PqdRU2WIAq13ZNJYmz0=; b=S7c9/QiVhLkcVRIeSeUuaw3h8sqRtBp4rnamJmRSM6J2bzRMhbw++YCOdhI5O8QNPpQ5G2 GMX0jHGifi6Lj8NjMc0nbGwOD1eg/vNBMs1nwUjxyRG8QVa3WI8bm907d+ylQqDHQnC+Nu U8HECsbY002M1KeXm9Dc6pRSbTGFiYs3rSQR3OBpjwKjgGth5E5WIYJOmuU2PSHjpXAhYl 4GmLMqFC+yNNQLFnrwnoAOWMt91HBR+eKgUOtSp4rPXb9xu2NgJgAnYGp34TIgunO+SBkm RuphBfAPAithORPyjAx4HkkIJrI9sdKPmac/kuR3i5I7rqOvar/l0oP1fhu3fw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659769286; a=rsa-sha256; cv=none; b=uTjL/PPArF8nC3+KKY7FaGISF53ELXf/iSQ3GzxMJ/n5fYplkr8wTvj3EiY/tcCvC+vMSK 5vhrllQu3tNYZ96nA741UMqxg+wTdZWaLzuPforIDRg8tgVAAPeE5f8AAu+TKMsNE9yR78 X9cUdTxtkRHGd7aln6vEEEjAIc7L5wL9em6mAqGqDOlred4Hid1miu0fMy+goOX9gZ0WAC ZZZJ99ogyysbJhJ06HZ9/URModkxIr79VOFOaZ1r0So+6pcc0pg1shAllyqdTNL5JcKrFt /+jgA76qlrPs+3UBeHZj7d8s3JnczznMsMkVS+AB/zkUyGOPNVzjSHW2YKY66w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=TUlgv+oz; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -3.39 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=TUlgv+oz; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: CE4A12700 X-Spam-Score: -3.39 X-Migadu-Scanner: scn1.migadu.com X-TUID: rxt6yBk/IUxQ Max Nikulin writes: > To get impression of the new feature in action, I modified ol-info.el. > First patch does not depend on :insert-description and might be useful > per se. Second one just enables the feature. Thanks! The patches look useful. You should also add an entry to ORG-NEWS. Otherwise, I just have two minor comments. > +(defun org-info-description-as-command (link desc) > + "Info link description that can be pasted as command. > + > +For the folloing LINK ^following > + > + \"info:elisp::Non-ASCII in Strings\" > + > +the result is > + > + info \"(elisp) Non-ASCII in Strings\" > + > +that may be executed as a shell command or evaluated by > +\\[eval-expression] (wrapped with parenthesis) to read the manual > +in Emacs. > + > +Calling convention is similar to `org-link-make-description-function'. > +DESC has higher priority and returned when it is not nil. > +If LINK is not an info link then DESC is returned." > + (or (org-string-nw-p desc) > + (let* ((file-node (org-info-link-file-node link)) > + (file (car file-node)) > + (node (cadr file-node))) pcase-let would be shorter here. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92