From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WIZKCbINUV8oewAA0tVLHw (envelope-from ) for ; Thu, 03 Sep 2020 15:37:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sJMRBbINUV+BMgAAB5/wlQ (envelope-from ) for ; Thu, 03 Sep 2020 15:37:22 +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 C234294021E for ; Thu, 3 Sep 2020 15:37:21 +0000 (UTC) Received: from localhost ([::1]:34732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDrIe-0005JT-NV for larch@yhetil.org; Thu, 03 Sep 2020 11:37:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDrDi-0007KB-FP for emacs-orgmode@gnu.org; Thu, 03 Sep 2020 11:32:14 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:46436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDrDf-0001E3-Np for emacs-orgmode@gnu.org; Thu, 03 Sep 2020 11:32:14 -0400 Received: by mail-pf1-x433.google.com with SMTP id b124so2591265pfg.13 for ; Thu, 03 Sep 2020 08:32:11 -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=OGjbASxmT6WR6q4XVtUP7z+zfrfVIUUVAE0WIFooEsg=; b=GePXM2bzmXmJunRJoWmPnymmgF9YzRMWGdvK/y5UZn2plB5iIVB5XNRB7ybXT8vTco qa46JjRCvADtLJsH1+ZTcfySNOgKddkST/dAYSchPTvzwJfKnG0QYQOkjatf1psYE+wY 5IxqVTXPk5b+oMjkwXpJLGZByYV6CtekEPl500KueDSzi6WfKrzvZORwOQpuxGeg+1cw BBvo1HvC8IAngp+maBWU67wHslHU6m28G7rmLcpPELq5KMIpTep6oVGuU3xSqtZIE6AV SD1QwHCVq30ZwvxM69qeetexGTcBTJq0KTXR13R4ymaQjoqzCQ53snCEo4cj+UbW2053 PYhA== 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=OGjbASxmT6WR6q4XVtUP7z+zfrfVIUUVAE0WIFooEsg=; b=awntErNWHyVo2ejDyN6Fw5w3URnNUWliIvHNzVDjBZ9Mt6dRzdKq4R37TZDqN2Pvkr HX5Lp+dZTIDCT3rtMLs1qWT30PlvCfZLJOzyXolQF43kE1o31IrgFtxXfXAg0ddMAm0X q7Vz0TA0ag90+3xMbNX24vV8yrgHZYXKSEvxcugv2aWtAcExg4hYDNBkBcTztf/7GltH xspFffdCoRsWMzRzjIznTJeENj4hYz6l1F63q5zR084UctdUIWUWZXJXDGhDxM5g8Nrf jNYVb52I0ZYKGsQjU3eTX+bYgT7WaYVZOudi+ft2UsH9qP6XjQRMvEhChaJOjr+ADoaw YifA== X-Gm-Message-State: AOAM533rTTdnvO+h+HRw4E6P4yJsxxXjUlNdlneQNT64u/u2+fOE0u/R spDI6AZCW0XaN9qBZhmeB8c= X-Google-Smtp-Source: ABdhPJzhwxKS5JaKQ9ASbzp6j49YVG5o5dWhyqgM1c6y18geELw9Vl7zzrT0j7pDNfS4rb4nnbipkA== X-Received: by 2002:a63:2a96:: with SMTP id q144mr3531960pgq.447.1599147130100; Thu, 03 Sep 2020 08:32:10 -0700 (PDT) Received: from localhost ([66.154.105.2]) by smtp.gmail.com with ESMTPSA id q5sm3038068pgi.31.2020.09.03.08.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 08:32:09 -0700 (PDT) From: Ihor Radchenko To: Michael Heerdegen Subject: Re: Headline generation as in diary? In-Reply-To: <87r1rjj6wx.fsf@web.de> References: <878sdth8fm.fsf@web.de> <87zh697ctp.fsf@ucl.ac.uk> <874kohh6el.fsf@web.de> <87v9gxcg9k.fsf@web.de> <87mu28l2bj.fsf@web.de> <87h7sflrmv.fsf@web.de> <87zh67j92p.fsf@web.de> <875z8vm18l.fsf@localhost> <87r1rjj6wx.fsf@web.de> Date: Thu, 03 Sep 2020 23:31:00 +0800 Message-ID: <87363ynah7.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=yantar92@gmail.com; helo=mail-pf1-x433.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: Robert Pluim , 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=GePXM2bz; 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: hcb0YvWd8po9 > Multi-line sexps in time stamps work would just be nice to have. Would > it be hard to achieve? I mean, since multi-line %%(...) entries already > work... The problem is that org-mode assumes that planning line must be a single line and a lot of internal logic hard-code this assumption. For example, below is a fragment of org-get-property-block: ;; Move point to its position according to its positional rules. (cond ((org-before-first-heading-p) (while (and (org-at-comment-p) (bolp)) (forward-line))) (t (forward-line) (when (looking-at-p org-planning-line-re) (forward-line)))) The last line clearly assumes that planning line is always a single line. The same assumption is made in many other places in org-mode internals. Though one may write a patch to make multi-line sexps work in org-mode, there is also a problem with external tools working with org. I do not think there is support of multi-line planning everywhere. > I think this is inconvenient. Ok, only a bit. But it would be nicer if > I could specify my dates in only one file. Jumping around in my org > file + my emacs init file is what I used to do. You can always use file-local definition at the beginning or end of your org file. Below is an example of local definition at the end of an org file. # Local Variables: # eval: (defun your-function () (sexp)) Best, Ihor Michael Heerdegen writes: > Ihor Radchenko writes: > >> > When dealing with complicated date rules it can likely happen that a >> > diary sexp doesn't fit into one line. >> >> Diary sexp can be a user-defined function. If your sexp needs to span >> multiple lines, it is probably worth defining a function and simply >> using <%%(your-function)> as a timestamp. > > I think this is inconvenient. Ok, only a bit. But it would be nicer if > I could specify my dates in only one file. Jumping around in my org > file + my emacs init file is what I used to do. > > Multi-line sexps in time stamps work would just be nice to have. Would > it be hard to achieve? I mean, since multi-line %%(...) entries already > work... > > > Thanks, > > Michael.