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 ms13.migadu.com with LMTPS id YIp1BI0SvmZPDAEAe85BDQ:P1 (envelope-from ) for ; Thu, 15 Aug 2024 14:37:01 +0000 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 YIp1BI0SvmZPDAEAe85BDQ (envelope-from ) for ; Thu, 15 Aug 2024 16:37:01 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=lwVMOPI5; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723732621; 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=/MyoWPwbxCdNMiBA2+heJ5NivEB5Afyk9eNbRtWWakQ=; b=qu1zQHSig3WHl/8Z7pzh74nqLwcq24py6fSmHTNfUBBxfmkad21iVCmu989q3+MWBxKGoa 32WTVWjMIphe+D25V4WLOC90fPukzKn2DR0ZLkFjZHjh+OB4/hk4hRVp1ON3ilujlnfg53 xyBE/KBnIMF6QBx39eybxECG5HQBUsAECyKH2AVK93XF5JsQvnYbXoYrVTKMR0/GEftW0+ mHgJnUl1l+AiyEhtUTpRAytOFVDPp7USn3CtI5eGvP7m7Kqmem+gT+bE9UNn+mgG2JSXPB 7aXhrEYDz4XaKkRK03j8l8wPM/FZ05fz1Rn2bkY4c7mB86Rps9z/hWc/5QzMBg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723732621; a=rsa-sha256; cv=none; b=QNeeB0wbPsiIirkPjf5IHwK81tZcDckw/pSvTkQEaTgmcsTf/KmfrMTauIuniTZ1XtI113 BfdBUCK/pbF2rHoiIbGi+l9P+lAUt0LCt+R4qk+czf88AimZjqYaY/GVABsF477QUAJLrH dVZzYs73Yo1LGzceqUgFGnfzr11513GU3k/TlhIgyq1WqE3MNm+G/zHcdbAOzhgZfhIP1z Yqf1gbuFfm09q3UkO8rGjQpAdXXY0y36SylgFZ79GIFCvbk/8+e6sXLtLceZz5LHAuQ05q fIaOefFBW3vEVbuFepwp+mXtHLOAuu/sHw+GtKfNlbf4TpPlMQWgT9CZpm5Hpw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=lwVMOPI5; 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" 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 819E5B029 for ; Thu, 15 Aug 2024 16:37:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seba9-0007zs-CA; Thu, 15 Aug 2024 10:36:05 -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 1seba8-0007zd-8s for emacs-orgmode@gnu.org; Thu, 15 Aug 2024 10:36:04 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seba6-0006Mi-Jt for emacs-orgmode@gnu.org; Thu, 15 Aug 2024 10:36:04 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a7a975fb47eso136853566b.3 for ; Thu, 15 Aug 2024 07:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723732560; x=1724337360; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=/MyoWPwbxCdNMiBA2+heJ5NivEB5Afyk9eNbRtWWakQ=; b=lwVMOPI5dh12Tzem2vj8DD2kqenLVJOqhOnwK/+wbNtNMihejzRFjujjpxbxIAown9 jX+yTqgn1VPV4GvndSglIfzEzB+ixr7Pl8OaqgQgt//+fUDIk9ticm8p8hQa262ZmaWd bAm5Wd9zw2p3IUQHnIl3o5JuBK+96CUh9WhU7BL0sdlMFEictp+vsP4Sb4bgFsB1bFg5 g4g3BNYHnF+GUhhltLv2HYZRWn9fWWPCyQuWhucsxqMCjAPEmbEgD4yOTUWDzU+AOs+p 2PzAiPrq8gcQvnGCEAYYcy2l/5EBXerT5mb1F58cF3aCVZc+rBuFLOkkp8qmFLB/dDAJ 5s8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723732560; x=1724337360; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/MyoWPwbxCdNMiBA2+heJ5NivEB5Afyk9eNbRtWWakQ=; b=rrzV0JeswQEmEbkcwMzUoAkI8uzQpBURQERDdY8P+HRn5A6BUtY3FiQAa0rty81kU7 6HlTczsmUiK5x7pihy9uvVKHHcmRUA9kJfT2SzckAHUwgWQPrC33yKtoMACc9YHXuAvs onRbm6HrG+UwqHYHBTWZZbXxYr9SBscFTD9tOvKo2M/SvfmTUnKgMxSFffldGlqEQVkh uvNMAZqKpwciksP6m4Is7VVeeLOe8+F3EZprslf2b47QGnln5xM8Ay2K85zDW8+EiDob hw13+5pHGjgmzIHR7XP21hzszsQr3O79Uo6aTcMt8M8fJTJD5eIgobluxK0Ly6pB3Bew I6Bw== X-Gm-Message-State: AOJu0YxRw+v/OffvqIoBIhriG/n1nFdl8Dma7RKXT4FAiEppcyjJUxNB F0D9U4EaCEpTKx5mtm9QhavWjo3lIOdqQrbVdMMteo5kyEZJ+6gXGnEz7g== X-Google-Smtp-Source: AGHT+IEGNYExejHyjBhQDiNvJJeeyWIbMqq9Sjhjk9YoWVScD/lHyvXCAfromfEZgVypdgriOKHuVg== X-Received: by 2002:a17:907:f194:b0:a7a:bae8:f299 with SMTP id a640c23a62f3a-a83670342d3mr439853966b.51.1723732559813; Thu, 15 Aug 2024 07:35:59 -0700 (PDT) Received: from windows (83.6.108.108.ipv4.supernova.orange.pl. [83.6.108.108]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a83839342f6sm110111666b.137.2024.08.15.07.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 07:35:59 -0700 (PDT) From: =?utf-8?Q?S=C5=82awomir?= Grochowski To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [FR] org-colview.el, add annotation for functions summary-types In-Reply-To: <87r0aw34yx.fsf@localhost> References: <87plqiewa6.fsf@gmail.com> <87r0aw34yx.fsf@localhost> Date: Thu, 15 Aug 2024 16:35:52 +0200 Message-ID: <87ttfllupj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=slawomir.grochowski@gmail.com; helo=mail-ej1-x629.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, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.78 X-Spam-Score: -6.78 X-Migadu-Queue-Id: 819E5B029 X-Migadu-Scanner: mx11.migadu.com X-TUID: +EAxQJnq3uib Thank you for your help Ihor. Ihor Radchenko writes: > See `help--symbol-completion-table-affixation'. It's a private function and I need only a part of it. Should I extract that part and create a new function? Like this below? (defun first-line-docstring (fun) (let* ((doc (condition-case nil (documentation fun) (error nil))) (doc (and doc (substring doc 0 (string-search "\n" doc))))) (if doc (format " -- %s" doc) ""))) Or just copy the needed part and put it in org-columns-new? > I'd also prefer using a proper completing-read API instead of > `completion-extra-properties' - by using `completion-extra-properties', > we disallow users from utilizing this variable. OK. Based on this example https://emacs.stackexchange.com/questions/74547/completing-read-search-also-in-annotations I came up with this snippet below: (completing-read "Summary: " (lambda (s pred flag) (pcase flag ('t (all-completions s (mapcar #'car org-columns-summary-types-default) pred)) ('metadata (list 'metadata (cons 'annotation-function (lambda (c) (first-line-docstring (cdr (assoc c org-columns-summary-types-default)))))))))) Thank you for the feedback. Regards, -- Slawomir Grochowski