emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ox-icalendar.el: customizable vevent summary prefix


From: Ihor Radchenko
Subject: Re: [PATCH] ox-icalendar.el: customizable vevent summary prefix
Date: Tue, 25 Oct 2022 06:59:25 +0000

Mikhail Skorzhisnkii <mskorzhinskii@eml.cc> writes:

> Hi, Ihor,
>
> Sorry for the delay with fixes, took some time before I got time to finish 
> this. Thanks for your review and looking forward for the next iteration. See 
> new version in the attachment. Comments are inline.

Thanks!
Applied onto main with minor amendments (typos).
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d4e7bcb4bd87afbcb08a013111ebc976e3cf3b58
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=55767b792ee7dce41e43e6a48d48813dd9ad7f7c
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c3aa6a6d43fd621bf82c4510c7a63dca7768e6dd

>>>  (defcustom org-outline-path-complete-in-steps t
>>>    “Non-nil means complete the outline path in hierarchical steps.
>>> @@ -319,6 +320,11 @@ converted to a headline before refiling.”
>>>              (push (list (and (buffer-file-name (buffer-base-buffer))
>>>                                    (file-truename (buffer-file-name 
>>> (buffer-base-buffer))))
>>>                               f nil nil) tgs))
>>> +               (when (eq org-refile-use-outline-path ’title)
>>> +                 (push (list (or (org-get-title)
>>> +                                 (and f (file-name-nondirectory f)))
>>> +                             f nil nil)
>>> +                       tgs))
>>
>> We have very too many whens in this function. It will be more succinct
>> to use a single (pcase org-refile-use-outline-path …) instead.
>
> Yes. But then I will be refactoring quite a lot of (working) code that I have 
> not actually touching.
>
> I would prefer doing that in the separate patch. You’ve suggested some 
> changes in my patches which could be applied to some other places in org-mode 
> files I have seen. May be once we finish this discussion I would send a new 
> series of patches with restyling?

That would be great.

>> We generally use `code' for Elisp symbols and `#+TITLE:' for verbatim
>> non-code text. (This has not been consistently followed in etc/NEWS, but
>> at least please change `#+TITLE' to `#+TITLE'). See
>> doc/Documentation_Standards.org
>
> Ah, yes. There are many occasions in the ORG-NEWS where this is not followed. 
> Would you be interested in the patch fixing these irregularities?

Yes.

> And if you do, would you prefer to have a fixed-up commits for these ones or 
> just one big commit? I recently learned about existence of git absorb and 
> couldn’t recommend it enough.

We do not modify git logs on savannah servers.
Doing so would break user mirrors and could break commit links in the
mailing list.

>>>                       (if filetitle
>>> -                         (org-clock-get-file-title file-name)
>>> +                         (org-get-file-title file-name)
>>>                         (file-name-nondirectory file-name))
>>>                  (if level?    ”| “ ”“) ;level column, maybe
>>>                  (if timestamp ”| “ ”“) ;timestamp column, maybe
>>
>> This may introduce a compiler warning. I suggest running make after
>> applying your patch and fix possible compiler warnings. (I suspect that
>> you may need to add declare-function on top of org-clock.el)
>
> Hm, I have tried it on the latest stable emacs (28.2) and it does not produce 
> me a warning. `make compile' was just clean. Could you please refer me to the 
> library/documentation why would I need to call `declare-function'? This is 
> something from cl library?

If there is no warning, I was wrong.

declare-function is used when we do not explicitly require the library
containing that function but know for sure that the function will be
defined on runtime. See 13.15 Telling the Compiler that a Function is
Defined section of Elisp manual.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]