emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org version numbers in file - WAS: Tangling takes long - profili


From: Rainer M Krug
Subject: Re: [O] org version numbers in file - WAS: Tangling takes long - profiling and calling R
Date: Thu, 18 Jun 2015 15:25:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

Nicolas Goaziou <address@hidden> writes:

> Rainer M Krug <address@hidden> writes:
>
>> Yes - that's true. But who of the longer org users reads the manual of
>> features they use regularly?
>
> Ah well. I turned 3 `mapcar' calls into a single one. It should,
> hopefully improve speed in your case (could you confirm it).

Hm - it takes actually longer (as far as I can see), but the mapcar
calls in the function now take 24% each (compared to 20 before).

>
> Also, I suggest to signal the deprecation in ORG-NEWS (old timers read
> it, right?) and remove this part of code during 8.4 development.

I guess they might skim over it...

What about putting a warning in the function in tangling (and other
places where this construct is evaluated) that this construct will not
be be allowed in the next major release?

>
> WDYT?
>
>> org-lint seems to become the place where these changes can be marked and
>> the user be notified - that is really brilliant.
>
> Org Lint is not in master branch, yet.

I know - unfortunately. But as far as I understand, it will be in the
next major release?

>
>> I could imagine the following automatic workflow to enable automatic
>> linting of org files upon opening when they were saved under an older
>> (or unknown) version of org:
>>
>> 1) a new argument is introduced :
>>
>>   #+FILE_ORG_VERSION: 8.3beta
>>
>> 2) when opening an org file, this version is checked. The following
>> cases are possible:
>>
>>   - parameter not present: assume that file version is older and run org-lint
>>   - file version older then org version: run org-lint
>>   - file version identical to org version: just open
>>   - file version newer: run org-lint
>>
>> 3) after reviewing the results, org-lint could offer to update the file
>> version (#+FILE_ORG_VERSION) to the version of org-mode. This should be, by
>> the way, possible to do even when running org-lint manually.
>>
>> 4) this behavior should be possible to disabled by an additional header
>>   #+ORG_FILE_VERSION_CHECK: f
>>   but not via  emacs.el as this should be the standard behavior.
>
> The problem is that linting is not exact science. You shouldn't put too
> much trust into it.

True - but as far as deprecation of org constructs concerned, checks
could be explicitly put into the org-lint library - for some features
there are even conversion functions available - and linting could be
more robust in regards to deprecation checks?

Another option would be to use a function which does only file version
checking, but this would probably overlap with org-lint considerably.

>
> Also, "version" too broad: despite its name, some syntax changes were
> introduced in the middle of "8.3beta".

Well - users who use git (or other cutting edge sources) should be aware
that these things can happen - if they want to avoid it (or be informed
when it happens) they should stay with the official releases. So I don't
see a problem there. And even if I overlook a change in git, the check
in the next release would pick it up in longer unused org files.

I see this as a feature for non-power users (i.e. the ones who stick
with the normal releases) and org-from-git users (or other daily build users) 
are power users by
definition.

>
> Therefore, I'm not sure it's worth the hassle.

As there is nobody else responding, I guess you are right, although I
think it would make org much more robust.

In the spirit of reproducibility, I would at least suggest to introduce
a function which inserts an argument

#+ORG_FILE_VERSION: TheActualOrgVersionProbablyWithGitHash

if it does not exist, and if it exist, updates it to the actual version?

This should be incorporated into the default header sets.

This would lay the groundwork for introducing this feature at a later stage.

Thanks,

Rainer

>
>
> Regards,

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      address@hidden

Skype:      RMkrug

PGP: 0x0F52F982

Attachment: signature.asc
Description: PGP signature


reply via email to

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