Hugo Heagren writes:
> Hugo
> From 039c2131462f5454f2804e809e085a055b5bf552 Mon Sep 17 00:00:00 2001
> From: Hugo Heagren
> Date: Mon, 28 Mar 2022 23:18:45 +0100
> Subject: [PATCH 1/2] ol.el: add description format parameter to
> org-link-param
Adding Org ML back to CC.
Hugo Heagren writes:
>> The rx-to-string call may still suffer from the described edge case.
>
> Yes, I think this is a good idea.
>
>> (and all-prefixes ...)
>
> I'm not sure what you mean, but I don't think it will work.
I mean
(and ,all-prefixes (rx-to-string `(: s
Hugo Heagren writes:
> The test fails because of an error in `rx-to-string', which is called
> by `org-insert-link'. It was failing because I have the following
> code:
>
> ,
> | (rx-to-string `(: string-start (submatch (or ,@all-prefixes)) ":"))
> `
> ...
> We could just as easily do it
On 25/07/2022 18:55, Hugo Heagren wrote:
In any case, we cannot, unfortunately, use map-do here and should
probably fall back to the previous version with cl-loop.
You're right, this is strange. Oh well, I've moved back to the version
of the macro which used `cl-loop' in the current patch. Noth
Hi Ihor and Hugo,
Ihor Radchenko writes:
> Bastien, can you please confirm that Hugo is listed in the FSF
> records
Yes I do!
> and then add him to the contributors.org?
Done.
--
Bastien
Hugo Heagren writes:
> On 18/07/2022 17:55, Max Nikulin wrote:
>
>> I am sorry if I am wrong, but I do not see you among known Org,
>> contributors. You patch is likely greater than it is allowed for
>> TINYCHANGE, so before you patch can be committed, copyright assignment
>> should be signed, s
Max Nikulin writes:
>>> It is `map-do' that causes the problem. Maybe earlier implementation in
>>> Emacs-26 has some peculiarities. It is the version available from the
>>> system repository for Ubuntu-20.04 LTS focal.
>>
>> Tests do not fail on my side using Emacs 26.3
>
> Ihor, what is the or
On 23/07/2022 20:06, Ihor Radchenko wrote:
Max Nikulin writes:
If it still fails, could you try isolating whether it's a specific
`should' clause which is the problem, if it fails with any of them?
It is `map-do' that causes the problem. Maybe earlier implementation in
Emacs-26 has some pecul
On 23/07/2022 20:06, Ihor Radchenko wrote:
Max Nikulin writes:
If it still fails, could you try isolating whether it's a specific
`should' clause which is the problem, if it fails with any of them?
It is `map-do' that causes the problem. Maybe earlier implementation in
Emacs-26 has some pecul
Max Nikulin writes:
>> If it still fails, could you try isolating whether it's a specific
>> `should' clause which is the problem, if it fails with any of them?
>
> It is `map-do' that causes the problem. Maybe earlier implementation in
> Emacs-26 has some peculiarities. It is the version availa
On 23/07/2022 14:48, Hugo Heagren wrote:
I've already assigned copyright to the FSF for work on Emacs (see
attached certificate). Do I need to do anything else for org-mode in
particular?
Great, I hope, it is enough, but my answer is not authoritative.
Emacs-26.3:
make test-dirty BTEST_RE=te
Hugo,
I am sorry if I am wrong, but I do not see you among known Org
contributors. You patch is likely greater than it is allowed for
TINYCHANGE, so before you patch can be committed, copyright assignment
should be signed, see
https://orgmode.org/worg/org-contribute.html#copyright for details
Max Nikulin writes:
> Ihor, Hugo raised a question how to interpret nil returned by
> :insert-description functions. Do you have any opinion? I do not like
> the idea to consider it as an error since string is expected. I would
> prefer to call `org-link-make-description-function' as a fallbac
Hugo Heagren writes:
>> Can you also update the documentation for
>> org-link-make-description-function?
>
> I'm not sure what sort of documentation you have in mind? What should
> I add?
I referred to my earlier statement:
> tl;dr The question is: what is the Good Behaviour when
Hi,
Ihor, Hugo raised a question how to interpret nil returned by
:insert-description functions. Do you have any opinion? I do not like
the idea to consider it as an error since string is expected. I would
prefer to call `org-link-make-description-function' as a fallback.
On 17/07/2022 04:20
n for
org-link-make-description-function?
> From cd5268bc05324140a4cf384ce12b99bba1ddab47 Mon Sep 17 00:00:00 2001
> From: Hugo Heagren
> Date: Mon, 28 Mar 2022 23:18:45 +0100
> Subject: [PATCH] ol.el: add description format parameter to
> org-link-parameters
Also, can you please review the comments
On 08/07/2022 02:57, Hugo Heagren wrote:
Since the last version of this patch, I have:
Thank you, this version should be more reliable.
tl;dr The question is: what is the Good Behaviour when
:default-description is set to something, which is meant to return a
string and returns 'nil instead?
link-set-parameters ,type orig-parameters)
> + ;; Return whatever the body returned
> + rtn)
> + ;; In case of error, restore state anyway AND really error
> + (error
> +(apply 'org-link-set-parameters ,type orig-parameters)
> +(
"id:foo-bar")))
+ ;; Description argument should override `:default-description'
+ (should
+ (string=
+ "notfoobar"
+(test-ol-with-link-parameters-as
+ "id" (:default-description "foobar")
+ (test-ol-insert-link-get-desc "
On 21/06/2022 19:03, Hugo Heagren wrote:
+(defmacro test-ol-with-link-parameters-as (type parameters &rest body)
[...]
+ `(progn
+ (setq orig-parameters org-link-parameters)
I can easily miss something, but wouldn't it be enough to use let-binding
`(let ((org-link-parameters org-link-pa
> On Tue, 21 Jun 2022 13:03:32 +0100, Hugo Heagren said:
Hugo> They're very nearly just right, but for some reason
Hugo> `test-ol-with-link-parameters-as' doesn't always reset the parameters
Hugo> correctly for me. However I have them set to originally, it sets
Hugo> `:default
test-ol-insert-link-get-desc "id:foo-bar")))
+ ;; Description argument should override `:default-description'
+ (should
+ (string=
+"notfoobar"
+(test-ol-with-link-parameters-as
+ "id" (:default-description "foobar")
+ (test-ol-insert-
Hugo Heagren writes:
> I've added the condition-case back to the check on
> `org-link-make-description', and added a new one to the check for the
> `:default-description' parameter, as Ihor suggested. I've also
> modified the handling of that parameter, to reflect
> `org-link-make-description', a
* ol.el (org-link-parameters): add parameter `:default-description', a
string or a function.
* (org-insert-link): if no description is provided (pre-existing or as
an argument), next option is to use the `:default-description' (if
non-nil) parameter to generate one.
Default descriptions are predic
Hugo Heagren writes:
> * ol.el (org-link-parameters): add parameter `:default-description', a
> string or a function.
LGTM in general. Note that I proposed (and never followed up on) a
similar patch in the past:
https://orgmode.org/list/87pnauvxht.fsf@localhost
I like that you introduced an opt
* ol.el (org-link-parameters): add parameter `:default-description', a
string or a function.
* (org-insert-link): if no description is provided (pre-existing or as
an argument), next option is to use the `:default-description' (if
non-nil) parameter to generate one.
Default descriptions are predic
Suggested patch to add a new link parameter controlling how the
default description is generated. As explained in the commit, this
behaviour is often similar between links of the same type, but differs
between those types, so a parameter seems like a good place to specify
it.
I've tried to make `o
27 matches
Mail list logo