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 KPTOBTibR1+2WgAA0tVLHw (envelope-from ) for ; Thu, 27 Aug 2020 11:38:32 +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 cM6XATibR19rGAAAbx9fmQ (envelope-from ) for ; Thu, 27 Aug 2020 11:38:32 +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 6879E9404E1 for ; Thu, 27 Aug 2020 11:38:31 +0000 (UTC) Received: from localhost ([::1]:41910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBGEe-0006Un-UI for larch@yhetil.org; Thu, 27 Aug 2020 07:38:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBGEK-0006UH-5y for emacs-orgmode@gnu.org; Thu, 27 Aug 2020 07:38:08 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:39957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBGEI-0005YS-Fk for emacs-orgmode@gnu.org; Thu, 27 Aug 2020 07:38:07 -0400 Received: by mail-pg1-x52e.google.com with SMTP id h12so3155113pgm.7 for ; Thu, 27 Aug 2020 04:38:06 -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=UcQ4FFI8W04IcXh2zbBRX5rBK89qJaA3MedI3pr3ZUM=; b=HqIcG5hy7hmtR846x57CgGyeLRs5exUr7VGBI3C5s1SfXMlpLGNCmYN5r7ODeZSvmo KT/MZcTysDydRD/pdr1ogsvB08yy6XZvU/vHQhc5b+WYR/1GsS922DS0M+iClnNiYCNd v1H4M5iDK8ivbsdhp3TFMs/0+rf5DIVepteV6hIJ8OG2vVwmrCKh26ceIezJ/TRWOK4U ZayMoPOMCFG5N+wc+7mOqC2D8cEZTBjXABPv1CeMKeG5PBUMuNXvWNPp10B4F5sS6aYb PaBrX2WhDWJOPEcpO0HPmS23foickzoU5erDwxhXU+4e1Ws5JrCMwRBik/EL85bvGrbU IF/Q== 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=UcQ4FFI8W04IcXh2zbBRX5rBK89qJaA3MedI3pr3ZUM=; b=oPutdAWjjfGuK2s5yLyO+/JVwqKh5PWecbSi/j0Zs3+B01MbNAK1G6kdf+/x3K3WRO r2ZZLdGY+C5+hS5nQPTOLcFaK4uNje2SPooHLHlJd9dZ8is/9BIRaE38pIojo4ViUCHY 8BqRNx+BhFM0hWEWqt/ZxLjKbvb44UZHAaz6yYDAxvbv/cgAdh4G8ZsHrl3e9e65JqL7 CQAWd72QYMkXTURVlorANfItYaIH691OLMAOBbFwtMS8M+aQTUGQSRUbRFIt4C/p5tnL T1aDQuYmk0do3yFA8ITPNHcVGSYUg9YgVxABnD7qkb6SaWq2t3T6lfLRGtimasOsStme HEGg== X-Gm-Message-State: AOAM530LkEsY237PCPUoE3nKqLxjvu4OqtW4FcDvP+Xo2rqcZzETMhaD rIYkiGvtrXaBn2XczkZR1Og= X-Google-Smtp-Source: ABdhPJzB1SvgVU2g6mVCWVS2LYnBY4tL6F96bKp8vlhWQ9vWu8VIwwr+IFbLu1K7yJGypFsprhmPBw== X-Received: by 2002:a63:5848:: with SMTP id i8mr8306067pgm.452.1598528285084; Thu, 27 Aug 2020 04:38:05 -0700 (PDT) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id x7sm2458401pff.110.2020.08.27.04.38.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 04:38:03 -0700 (PDT) From: Ihor Radchenko To: TRS-80 , emacs-orgmode@gnu.org Subject: Re: org-link-set-parameters :complete how to prompt for description? In-Reply-To: <63e143a961c8eec498b0cfe234794df6@isnotmyreal.name> References: <63e143a961c8eec498b0cfe234794df6@isnotmyreal.name> Date: Thu, 27 Aug 2020 19:37:08 +0800 Message-ID: <87wo1k2ucb.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52e.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=HqIcG5hy; 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: -0.21 X-TUID: LQIqxrm8hcVr > Any tips would be greatly appreciated. Take a look at org-link-make-description-function Best, Ihor TRS-80 writes: > Good day, everyone! > > I have been trying to create a new custom link type with > org-link-set-parameters, which in turn calls functions for the various > "methods" (for lack of a better term), like so: > > (org-link-set-parameters "zdlink" > :complete #'my-zetteldeft-org-complete-link > :follow #'my-zetteldeft-org-follow-link > :help-echo #'my-zetteldeft-org-help-echo > :store #'my-zetteldeft-org-store-link) > > The only one I seem to be having trouble with is :complete. I can get > it to > prompt me for completing-read, and it returns the link portion only, but > how > to get it to also prompt for a description? Here is my :complete > function: > > (defun my-zetteldeft-org-complete-link () > "Link completion for Org zdlink type links" > (let* ((file (completing-read "File to link to: " > (deft-find-all-files-no-prefix))) > (link (zetteldeft--lift-id file))) > (unless link (user-error "No file selected")) > (concat "zdlink:" link))) > > I searched the Internet, this mailing list archives, etc. high and low, > all > to no avail. So I decide to join the mailing list today. Probably long > overdue anyway. :) > > Any tips would be greatly appreciated. > > Cheers, > TRS-80