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 QJYqDh9gTF86CgAA0tVLHw (envelope-from ) for ; Mon, 31 Aug 2020 02:27:43 +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 wCHOCR9gTF+7NgAAbx9fmQ (envelope-from ) for ; Mon, 31 Aug 2020 02:27:43 +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 BA2D7940390 for ; Mon, 31 Aug 2020 02:27:42 +0000 (UTC) Received: from localhost ([::1]:40010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCZXp-0004Q6-Ht for larch@yhetil.org; Sun, 30 Aug 2020 22:27:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCZXS-0004Pm-VH for emacs-orgmode@gnu.org; Sun, 30 Aug 2020 22:27:18 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:40000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCZXR-0006PU-2A for emacs-orgmode@gnu.org; Sun, 30 Aug 2020 22:27:18 -0400 Received: by mail-pj1-x1044.google.com with SMTP id kx11so2197782pjb.5 for ; Sun, 30 Aug 2020 19:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=C8biswamR9QtEYp9i+6uJZn5J+pyHzLA2aQjbZ/Oi0M=; b=Gi3reFGsEwYFhRc8j11bTkBrG0sZmrsx0BObF66yHBF0Il0C3/kklf7NlRj/jKompl 08nLp9vUwgqXauBWWDKH5QcZl2FXNtFV54kDVql3EsCcbnBsCGfU6ZvMe+DHb3sV+LA+ bT2KMX7nL9JCL+v+NHRf05V1ReFKk2E1W0AuBgpZEmsLRg/UcvKFpQArEpUzCKl51IBL j4Ng9iYTkSld7Afyagqe3FOi4L2vw3mzGSVI9atAimLdTdzKjS3BHnxywDPoHyxbc5rM Kdmu5iZYaYg/KXbzT+lpHUV2PjlaFWRCgnSju/r4Hf5yY4BN1/DDohARYGhTa0+0XyA+ rheQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=C8biswamR9QtEYp9i+6uJZn5J+pyHzLA2aQjbZ/Oi0M=; b=J85YusYL/dPXmBlbERsMKmc8qWUDchca8X3HJW56O7avsdnkoLkc3PJTcWvbpkOAZF 6KTJSX6cmcCTUGWrqZZjjoZJiwZ77IHDLMe348g79g88fftT1mVRNVHFoMwnCQLcGeKX qEIiSm07NxMzIYMEq8X3GAPFSIoep/Rec+gDiLh46tJ0xNbPWy8xqVL6G9vvf1FBoP/W z8rR0HCqTdjbdGwbuM8DuiP83zDLMi9+zAO5Gd7/fem1PVkqWrhtWGgLocEIdllFmchi R68XpF96lWhZWsGiy7Rw9GE93FNh64XErbXNljs3nkZ+jApzFGOFeuRstYX/SDKGMX66 zfYQ== X-Gm-Message-State: AOAM532cMZudN6/JXjLF9Vh0sH+fcwR65z/QLoDOK89Vzc6iZUfrsudY j4rHjeqgEhYHwapjFB4EOt4crLvHL3shcA== X-Google-Smtp-Source: ABdhPJw3SJGgtfCVryJ8tPjGEv8bH6DhbPXYnENXQEDCusQJCYegNBOMi1n7qHfIaQdkkKYmJ7MX6g== X-Received: by 2002:a17:902:a584:: with SMTP id az4mr7156527plb.165.1598840835459; Sun, 30 Aug 2020 19:27:15 -0700 (PDT) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id p184sm6165009pfb.47.2020.08.30.19.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Aug 2020 19:27:14 -0700 (PDT) From: Ihor Radchenko To: Nicolas Goaziou Subject: Re: [feature request] A new cookie type [!] showing the last note taken In-Reply-To: <87sgc470lk.fsf@nicolasgoaziou.fr> References: <87zh6eymxs.fsf@localhost> <87h7skldpt.fsf@nicolasgoaziou.fr> <875z90xvqk.fsf@localhost> <871rjo8kgr.fsf@nicolasgoaziou.fr> <873644xr6y.fsf@localhost> <87sgc470lk.fsf@nicolasgoaziou.fr> Date: Mon, 31 Aug 2020 10:26:15 +0800 Message-ID: <87y2lvwny0.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1044.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: , Cc: emacs-orgmode@gnu.org 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=Gi3reFGs; 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: MkzNbUqgpoRE > I wouldn't dismiss plain text insertion too easily, either. It also > includes external tools. What happens if an external tool automatically > insert notes? > > The feature you are requesting could make sense if notes had a clear > syntax. This would bring some interesting features, too (e.g., being > able to list all notes in an entry, accurately). But it would also raise > new problems, as any syntax change (backward compatibility with old > documents, external tools...). I would not call defining syntax for notes "a syntax change". Rather addition to syntax. Since there was no formal definition of notes in the past, introducing formal syntax for notes should not break any existing tool. If anything, it should make it easier for those tools to deal with notes. For the compatibility, we can reuse the frequently used (at least, because it is built-in) syntax used by `org-add-note' (see below). > This is more realistic, but you are then binding the tool > (`org-add-note') to the syntax ("[!]"), which is a step in the wrong > direction. We must not assume Org mode is the only tool writing Org > documents. Good point. Instead of linking to the function, we can define the format used by `org-add-note' as a formal format for notes. Currently `org-add-note' uses the following format: - \\ The is taken from `org-log-note-headings'. Notably, this syntax is partially used in org, despite lack of formal definition. For example, `org-habit-parse-todo' assumes that state change notes were added by `org-add-note' using format defined in `org-log-note-headings'. All the external tools dealing with state change statistics already have to consider this syntax. Also, it can nicely play with the existing built-in `org-element-plain-list-parser' with note being a special kind of list element. Best, Ihor Nicolas Goaziou writes: > Ihor Radchenko writes: > >> I feel that my understand of "note" in context of org is different from >> yours. Is there a formal definition of "note" in org? > > As I stated in my first post a few hours ago: > > Notes are mostly free-form; there is no syntax describing them. > >> However, we can formalise the "last note taken" to "last note taken >> using org-add-note". > > This is more realistic, but you are then binding the tool > (`org-add-note') to the syntax ("[!]"), which is a step in the wrong > direction. We must not assume Org mode is the only tool writing Org > documents. > >> org-add-note is the only way I am aware about (except plain text, >> indeed). That's why I wrote the function saving the last note taken >> using org-add-note into SUMMARY. The property is only used here for >> convenient retrieval, not because I implied showing a property value. > > I understand the property was used for convenience, but showing its > value is the only problem your can really claim solving at the moment. > >> May I know what are the other ways to add note via interactive function >> in Org? > > Capture is certainly one way. In fact, `org-add-note' could (should ?) > be rewritten using Capture library. > > I wouldn't dismiss plain text insertion too easily, either. It also > includes external tools. What happens if an external tool automatically > insert notes? > > The feature you are requesting could make sense if notes had a clear > syntax. This would bring some interesting features, too (e.g., being > able to list all notes in an entry, accurately). But it would also raise > new problems, as any syntax change (backward compatibility with old > documents, external tools...). > > Regards,