From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wBEQN6yeWV/NDwAA0tVLHw (envelope-from ) for ; Thu, 10 Sep 2020 03:34:04 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uODjMqyeWV8MNwAAbx9fmQ (envelope-from ) for ; Thu, 10 Sep 2020 03:34:04 +0000 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 81FC39401D0 for ; Thu, 10 Sep 2020 03:34:04 +0000 (UTC) Received: from localhost ([::1]:35596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGDLX-0000vo-Bh for larch@yhetil.org; Wed, 09 Sep 2020 23:34:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGDL5-0000um-Uk for emacs-orgmode@gnu.org; Wed, 09 Sep 2020 23:33:36 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:38268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGDL4-0003BT-9c for emacs-orgmode@gnu.org; Wed, 09 Sep 2020 23:33:35 -0400 Received: by mail-pg1-x535.google.com with SMTP id l191so3491822pgd.5 for ; Wed, 09 Sep 2020 20:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=30/w5wiZ40bmdVUu+EvdUoJQG3tC5B9Y9Y5q5mzibUY=; b=oHYRnB9gLtq616z3v8IuyWGXD8mR/CKi/S2iw//TCrFsUC8MnoEUUcEQllRtC6kgcG 5HL7eN1DONKtrFL+r1TjAIM8oCGpHXnlduhJJvUsVdtesbkCgcqGwpcQbfPcj/NejFBO BKL/pUsUm0/tLhJdMClPZR/zuzxuFHLJoHkFiKrRU12bBgxli4D3Ul+4C0ljoCP4t2K1 GbGpIlkw8xRa+Nsinc1zZ1SCYIJT1V6CUU8WidsNi/Jln1sf+46CewhIlVJ8zOT/gTDV xD0iyM9wQuHbTKepm43HmUipWwBkoJHnJirJs6nrMkv9LVKgaVuli10XVuUQhCecs+Ra WC0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=30/w5wiZ40bmdVUu+EvdUoJQG3tC5B9Y9Y5q5mzibUY=; b=oDBDNkDfENz69LbcVDVCNzUhFkf6Srqf5fpIg12KbEiaesWlkRBUEXfkHnYXO4hZBd PWpuhncW14xH6YZDYETC3HX8H/JRZq9bT50jCIzR91doqjkjFG765NAh+LGE0XAE5unp uf3Gr2H9ifCFIa/x3AIM39bp0JIABMkH5ew37uVIogTWiFxw2MYctkML2u6qdOrTNfVc Bd0c5LGLFt5oBfbX4raiWdq9tw/b63NcHKARLPoRNBU83MOed27QLmtDIU7k/vPC/Xv8 pXSwXzfV7uzBUzLS7n2Q7YdzzeBAHsdAgvXZKC5O85DEmN2OZIp30aFdCF5FOoH3hx6s Ps9Q== X-Gm-Message-State: AOAM531d7p/2lRAOXcdfK/EsXf+mj+bS6CCll92qTyYYftn829ojm0z+ Hb3XktQO/6eYpVApAr1XM7w= X-Google-Smtp-Source: ABdhPJzz0I9llD6u/k3vaiw1wswV38QdfXfdEffcbiuc6VfOBDNhSYGESHh7PE+aRJeje/81JJd+Ow== X-Received: by 2002:a63:fe49:: with SMTP id x9mr2861035pgj.446.1599708812767; Wed, 09 Sep 2020 20:33:32 -0700 (PDT) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id j9sm3938800pfe.170.2020.09.09.20.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 20:33:32 -0700 (PDT) From: Ihor Radchenko To: Maxim Nikulin , emacs-orgmode@gnu.org Subject: Re: org-store-link and help for a key In-Reply-To: References: Date: Thu, 10 Sep 2020 11:32:33 +0800 Message-ID: <87eenajoha.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=yantar92@gmail.com; helo=mail-pg1-x535.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=oHYRnB9g; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: a6LYG3cMdLfn > Such behavior exists for ages, at least since 8.2.10 till current master. I can reproduce this. The reason of error is simple: help buffers for key combinations where not considered when writing help: link type. Current code does not even store the link to such help buffers correctly - when the key sequence has more than a single key only the first key will be stored (tested in k k help buffer). The code to open help: link type also does not know that help: link can point to anything other than function or variable. I can see two solutions: 1. Avoid storing links to help buffers describing key sequences. Show error when trying to store such link instead 2. Write proper handlers for storing and following links to help buffers other than just function/variable help (in addition to key sequence help buffers, org-store/follow-link also fails to work with describe-face buffers at least) To do this, one need to change org-link--open-help and org-store-link (see "(eq major-mode 'help-mode)" line). Patches are welcome. P.S. Would it be cleaner to have separate :store link properties for standard link types instead of hard-coding them into org-store-link? Best, Ihor Maxim Nikulin writes: > Either I missed something obvious or org-store-link from a help page for > a keystroke works incorrectly > > Let's try to save a link to the *keystroke* help for e.g. org-insert-link: > > 1. Open help page with =C-h k C-c C-l= > 2. Switch to the help buffer =C-x o= > 3. Store link =M-x org-store-link RET= > 4. Switch back to the org file =C-x o= > 5. Insert link =C-c C-l RET RET= > > I get =[[help:C-c]]= and an error if I try to follow the link with =C-c C-o= > > user-error: Unknown function or variable: C-c > > If I ask a help page for the *function* > > 1b, =C-h f org-insert-link RET= > > I get the working link =[[help:org-inser-link]]=. I expect the similar > result for the keystroke help link or maybe something special that leads > to the description of the current keystroke binding. > > Such behavior exists for ages, at least since 8.2.10 till current master.