From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aG5FFq80v2Y/7QAAe85BDQ:P1 (envelope-from ) for ; Fri, 16 Aug 2024 11:14:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id aG5FFq80v2Y/7QAAe85BDQ (envelope-from ) for ; Fri, 16 Aug 2024 13:14:55 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZE731bK7; 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=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723806895; 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=0095Rg7YsCnhzgaQwTSOTgZMRtLch82Y//AKLpjwMUg=; b=UuxL05nY0nTpqsp9MSteVCTNK/7Go3RlpMJKjZ2lu7SEv81YFsv11YbzUpSHN3vJm63KS9 33SMG3ubc1FbcxF7mWnWjUMCPs81MTi7h6+K+TQbnWPKbpXpDU6iwwyc+o9+0lTG7BZwGA kYZJvMa1JOTFBZpTeIowIlLBOQS2nEwFRKXvcl03yE9sKbrg7eDcweY0qHtBt9nvXtv1ee aBh7zvuYrOdIQcY7Th2INdPO41L0+L3YcxLwXfP+7LydyFMez1nvjs2Kxjodd0otACJJYz hqR/G9EHCr6V+XgSI1nk/YLnN5fKZsmOIWOaABZgp5fIiEq4sYwIMdeLU20ksA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZE731bK7; 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=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723806895; a=rsa-sha256; cv=none; b=OaXBtcfs6VC9j7DdA/4wu0RK8EW1UYtCnDA4gTKh070ovhTp2RVLRfxkxx/eM5f76q8nJa 5e2Z+aAmyjt4bFzX+e8OmGrRWjlkDgefUIPJCb0rmaIelpl06PX4zFvjdXshcOFBj2vGmu mvDj3m4v3TZ33kJLItZPtdsG4OsH1ngJT1VoFeuh8hqsrgqnQwLNNtDLqPQSO5IUPI7Ddb ty217Ym+9VIQ4S3guHFr38ahte6f3fm/SzS5Bzow6vgSFX9t0NoF7Z5szGew6OIc2LgHV2 QPSq5xS7li7icOuC5EUjyQLzj0ZcqOBsozA39ANjSTWEMMX0o5QwthwZtFrIqg== 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 0F5C09873 for ; Fri, 16 Aug 2024 13:14:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seuty-0000qY-Th; Fri, 16 Aug 2024 07:13:50 -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 1seutw-0000qO-UD for emacs-orgmode@gnu.org; Fri, 16 Aug 2024 07:13:48 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seutv-0003mF-DH for emacs-orgmode@gnu.org; Fri, 16 Aug 2024 07:13:48 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5becfd14353so453088a12.1 for ; Fri, 16 Aug 2024 04:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723806825; x=1724411625; 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=0095Rg7YsCnhzgaQwTSOTgZMRtLch82Y//AKLpjwMUg=; b=ZE731bK7umi0HzplhW9TMbrC3laY8DqnPX2dBJRbOfhl1F+HQKFehNVTSVAckoUsJ4 6DRc/XEwdKU293TgXRw3FhWmfVsdeQUZYzvt8ey8pz3gqZdxtD7HNXZkDbu94SOXevID iHkrH42DbJsI9PPzHD6c2CxCbNHLQ7Pq09VTDvIgHtEO1pyYIfOQLY6/ldkFSVHYA0OI mpegfre0DXkcrdTh0CKZ9NIRwG6xqrnYYJ6+23DAoc226MbPvXWNNK1ZXwQPoSLAcQsF 8WsRQ2wR/jk7ATv6QLB40a9nMmkPWDDu+n1HRz3fAX/kUPm+BEQW22BnA/lWJ3ubpQ17 Eggw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723806825; x=1724411625; 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=0095Rg7YsCnhzgaQwTSOTgZMRtLch82Y//AKLpjwMUg=; b=OCOQTXJPXY4yvGwxK4as4Wzy9o8hFYvfiBe28XC4PrkH5xuecf1J1TZ2tYP7lt+Ue9 2hxXIHsqPo4cbtWwgNYzJQnKiNN5kkH5xRxjEsYutNcdRE4dZf/y/01E1fHaavVQHKSx pbYqRDNuRbUGuenHsqN9N9qBK1d1KwB4UjIXr4WyzF7abbaaBz7MfDadmEBJrvnJhUWt pIMU//qGJcfL2QZGTwMVg41ODO2QsdBKC24YPic1QoQftyCAizTKW0mma5l0UAczwJEC 3hwyhl92Q/RC71hCQaRM6hYyfitox34TW1DTxEaqMbAL6QcSPC0AcgzWyl2HbtdH8Dp1 /pLQ== X-Gm-Message-State: AOJu0YyZ4q5GFbCmFCm5tqY+h8UH+BzXK+8K6shNA1ocuwSovPPL1tLB qn4yiYGweq9HQtbKGhJJL9Oo/Qod4iAC4GVWigTOzuKvPiFTV8rRV/790A== X-Google-Smtp-Source: AGHT+IFiU1fSBXsYkkGObDyDWc+S294VA2uLs/RlVblBMv5ZysUwF5XSbW1KtwuayN7AB5rV02lAdg== X-Received: by 2002:a17:907:f1a1:b0:a77:dcda:1fe1 with SMTP id a640c23a62f3a-a83928d7859mr191735166b.25.1723806824203; Fri, 16 Aug 2024 04:13:44 -0700 (PDT) Received: from windows (83.24.148.34.ipv4.supernova.orange.pl. [83.24.148.34]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a83839471f7sm237676666b.162.2024.08.16.04.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2024 04:13:43 -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: <87wmkh1y6f.fsf@localhost> References: <87plqiewa6.fsf@gmail.com> <87r0aw34yx.fsf@localhost> <87ttfllupj.fsf@gmail.com> <878qwx3f6k.fsf@localhost> <87r0aplmok.fsf@gmail.com> <87wmkh1y6f.fsf@localhost> Date: Fri, 16 Aug 2024 13:13:37 +0200 Message-ID: <87o75slnz2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=slawomir.grochowski@gmail.com; helo=mail-ed1-x52b.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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.79 X-Migadu-Queue-Id: 0F5C09873 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.79 X-TUID: w4W0co5JanKi Ihor Radchenko writes: > Ok. But please double-check that it is really the case. Checked. So I have those 3 code snipets: (defun org-columns--summary-types-completion-function (string) (docstring-first-line (cdr (assoc string (append org-columns-summary-types org-columns-summary-types-default))))) (completing-read "Summary: " (lambda (string pred flag) (pcase flag ('t (all-completions string (delete-dups (cons '("") ;Allow empty operator. (mapcar #'car (append org-columns-summary-types org-columns-summary-types-default)))) pred)) ('metadata (list 'metadata (cons 'annotation-function 'org-columns--summary-types-completion-function)))))) (defun docstring-first-line (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) ""))) But I have no idea where to put this piece: (if doc (format " -- %s" doc) "") It should not be in docstring-first-line. What do you think? -- Slawomir Grochowski