[-- Attachment #1: Type: text/plain, Size: 1080 bytes --] Fixes bug introduced in 6b83c6e4e that made org-contacts-anniversaries error if org-id was not loaded. --- Alternatively, we could autoload org-id-link-to-org-use-id. If you all would prefer this, let me know and I can send a v2 patch. 6b83c6e4e was found using git-blame. contrib/lisp/org-contacts.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 82881ecd0..7ad425519 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -1166,7 +1166,7 @@ are effectively trimmed). If nil, all zero-length substrings are retained." "Store the contact in `org-contacts-files' with a link." (when (and (eq major-mode 'org-mode) (member (buffer-file-name) (mapcar 'expand-file-name org-contacts-files))) - (if org-id-link-to-org-use-id + (if (and (featurep 'org-id) org-id-link-to-org-use-id) (org-id-store-link) (let ((headline-str (substring-no-properties (org-get-heading t t t t)))) (org-store-link-props -- 2.30.0 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 511 bytes --]
Thanks for your patch. :smile: Can you send patch file as attachment? I don't know how to apply patch in email body. David Florness <david@florness.com> writes: > Fixes bug introduced in 6b83c6e4e that made org-contacts-anniversaries > error if org-id was not loaded. > --- > Alternatively, we could autoload org-id-link-to-org-use-id. If you all > would prefer this, let me know and I can send a v2 patch. > > 6b83c6e4e was found using git-blame. > > contrib/lisp/org-contacts.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el > index 82881ecd0..7ad425519 100644 > --- a/contrib/lisp/org-contacts.el > +++ b/contrib/lisp/org-contacts.el > @@ -1166,7 +1166,7 @@ are effectively trimmed). If nil, all zero-length substrings are retained." > "Store the contact in `org-contacts-files' with a link." > (when (and (eq major-mode 'org-mode) > (member (buffer-file-name) (mapcar 'expand-file-name org-contacts-files))) > - (if org-id-link-to-org-use-id > + (if (and (featurep 'org-id) org-id-link-to-org-use-id) > (org-id-store-link) > (let ((headline-str (substring-no-properties (org-get-heading t t t t)))) > (org-store-link-props -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
[-- Attachment #1: Type: text/plain, Size: 617 bytes --] miles christopher <numbchild@gmail.com> writes: > Thanks for your patch. :smile: > > Can you send patch file as attachment? I don't know how to apply patch in email body. Hi Miles, If you download the raw email message (which you should be able to do in the Gmail UI) you can apply the patch like so: git am < /path/to/download.eml Alternatively, you can download the email from the orgmode list archives and apply the patch using this one-line command: curl -s https://orgmode.org/list/874kjxpqht.fsf@florness.com/raw | git am Let me know if you run into any trouble. -- David [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 511 bytes --]
I applied your patch, thanks. I don't want to use Gmail web UI or find out email URL in mailing list archive. I'm using mu4e. Is there a convenient simple way for mu4e user? David Florness <david@florness.com> writes: > miles christopher <numbchild@gmail.com> writes: > >> Thanks for your patch. :smile: >> >> Can you send patch file as attachment? I don't know how to apply patch in email body. > > Hi Miles, > > If you download the raw email message (which you should be able to do in > the Gmail UI) you can apply the patch like so: > > git am < /path/to/download.eml > > Alternatively, you can download the email from the orgmode list archives > and apply the patch using this one-line command: > > curl -s https://orgmode.org/list/874kjxpqht.fsf@florness.com/raw | git am > > Let me know if you run into any trouble. -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
[-- Attachment #1: Type: text/plain, Size: 869 bytes --] miles christopher <numbchild@gmail.com> writes: > I applied your patch, thanks. I don't want to use Gmail web UI or find > out email URL in mailing list archive. I'm using mu4e. Is there a > convenient simple way for mu4e user? Oh cool, I use mu4e also :) I guessed you were using the Gmail UI since you have a Gmail address. Anyways, mu4e has an action function called `mu4e-action-git-apply-patch' [0] for this. If you setup this action with (add-to-list 'mu4e-view-actions '("git am" . mu4e-action-git-apply-mbox)) and then type `a g` (`g` may be a different key that should display in the message buffer) when viewing a PATCH email, Emacs should prompt you for the repo's directory and the patch will be applied. Hope this helps, -- David [0]: https://github.com/djcb/mu/blob/1.4.14/mu4e/mu4e-actions.el#L251 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 511 bytes --]
[-- Attachment #1: Type: text/plain, Size: 232 bytes --] David Florness <david@florness.com> writes: > Anyways, mu4e has an action function called > `mu4e-action-git-apply-patch' [0] for this. If you setup this action with I meant `mu4e-action-git-apply-mbox' here. -- David [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 511 bytes --]
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --] Fixes bug introduced in 6b83c6e4e that made org-contacts-anniversaries error if org-id was not loaded. --- v1 -> v2: Stefan Monnier made a good suggestion to use bound-and-true-p instead here: https://lists.gnu.org/r/emacs-devel/2021-01/msg00257.html Alternatively, we could autoload org-id-link-to-org-use-id. If you all would prefer this, let me know and I can send a v3 patch. 6b83c6e4e was found using git-blame. contrib/lisp/org-contacts.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 82881ecd0..3df1b52dd 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -1166,7 +1166,7 @@ are effectively trimmed). If nil, all zero-length substrings are retained." "Store the contact in `org-contacts-files' with a link." (when (and (eq major-mode 'org-mode) (member (buffer-file-name) (mapcar 'expand-file-name org-contacts-files))) - (if org-id-link-to-org-use-id + (if (bound-and-true-p org-id-link-to-org-use-id) (org-id-store-link) (let ((headline-str (substring-no-properties (org-get-heading t t t t)))) (org-store-link-props -- 2.30.0 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 511 bytes --]
David Florness writes:
> Fixes bug introduced in 6b83c6e4e that made org-contacts-anniversaries
> error if org-id was not loaded.
> ---
> v1 -> v2: Stefan Monnier made a good suggestion to use bound-and-true-p
> instead here: https://lists.gnu.org/r/emacs-devel/2021-01/msg00257.html
stardiviner already applied/pushed v1 to master, so please reposition
the patch on top of the previous commit (e6e1c0811). Also, while we're
less strict about the commit message format for contrib/ files, it'd
still be good to follow the changelog entry convention.
Thanks.
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --] * org-contacts.el (org-contacts-link-store): Use `bound-and-true-p' to check the truthiness of org-id-link-to-org-use-id, which may or may not be bound depending on whether org-id has been loaded. This simplifies the code. --- Thank you, Kyle. This patch should do the trick. I'm always happy to send another revision so feel free to nitpick. contrib/lisp/org-contacts.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 7ad425519..3df1b52dd 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -1166,7 +1166,7 @@ are effectively trimmed). If nil, all zero-length substrings are retained." "Store the contact in `org-contacts-files' with a link." (when (and (eq major-mode 'org-mode) (member (buffer-file-name) (mapcar 'expand-file-name org-contacts-files))) - (if (and (featurep 'org-id) org-id-link-to-org-use-id) + (if (bound-and-true-p org-id-link-to-org-use-id) (org-id-store-link) (let ((headline-str (substring-no-properties (org-get-heading t t t t)))) (org-store-link-props -- 2.30.0 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 511 bytes --]
David Florness writes:
> Thank you, Kyle. This patch should do the trick. I'm always happy to
> send another revision so feel free to nitpick.
Thank you. Looks good to me, but I'll leave the final review/apply up
to stardiviner.
Applied, I think this should be the final version. I also fixed a problem in org-contacts-store-link. David Florness <david@florness.com> writes: > * org-contacts.el (org-contacts-link-store): Use `bound-and-true-p' to > check the truthiness of org-id-link-to-org-use-id, which may or may > not be bound depending on whether org-id has been loaded. This > simplifies the code. > --- > Thank you, Kyle. This patch should do the trick. I'm always happy to > send another revision so feel free to nitpick. > > contrib/lisp/org-contacts.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el > index 7ad425519..3df1b52dd 100644 > --- a/contrib/lisp/org-contacts.el > +++ b/contrib/lisp/org-contacts.el > @@ -1166,7 +1166,7 @@ are effectively trimmed). If nil, all zero-length substrings are retained." > "Store the contact in `org-contacts-files' with a link." > (when (and (eq major-mode 'org-mode) > (member (buffer-file-name) (mapcar 'expand-file-name org-contacts-files))) > - (if (and (featurep 'org-id) org-id-link-to-org-use-id) > + (if (bound-and-true-p org-id-link-to-org-use-id) > (org-id-store-link) > (let ((headline-str (substring-no-properties (org-get-heading t t t t)))) > (org-store-link-props -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
This was not marked as applied on updates.orgmode.org.
Doing so with the X-Woof-Patch header.
miles christopher <numbchild@gmail.com> writes:
> Applied, I think this should be the final version.