This is required as a plus sign (e.g. +49 for germany) will cause
hexification in the link helper.
contrib/lisp/org-contacts.el: unhexify tel link
TINYCHANGE
* contrib/lisp/org-contacts.el (org-contacts-remove-ignored-property-values):
Use `org-remove-if' and `org-find-if' instead of the unprefixed variants.
* contrib/lisp/org-contacts.el (org-contacts-db-need-update-p):
Check if org-contacts-db cache contains markers with no buffer as well, when
determining if cache should be updated from files.
The function `org-contacts-db-need-update-p' does two checks to determine if the
contacts cache should be updated:
1. If the variable `org-contacts-last-update' is nil.
2. If modification time of any file containing contacts is more recent than
timestamp recorded in `org-contacts-last-update'.
There is another case where an update is required: when marker objects contained
in the contact cache `org-contacts-db' suddenly point to no buffer. If a buffer
containing contacts is killed, but underlying file is not modified, org-contacts
will not detect this, and cached markers that pointed to the now killed buffer
will become "dead" (e.g. have no buffer associated with them). This seems to cause
problems for instance in `org-contacts-anniversaries', which if used as diary
sexp in agenda file, will cause "Bad sexp" errors.
* contrib/lisp/org-contacts.el (org-contacts-metadata-prefix):
Provide same function for cycle ordering as is used for display ordering
in completion metadata.
When using cycle completion style for contacts, by setting
`completion-cycle-threshold' to some value, the ordering was not consistent
with order of email addresses in contact definition, nor the order
which was used for regular display completion. Fix that by also
supplying sort function for cycle completion in metadata.
* contrib/lisp/org-contacts.el: Add a complex org-contacts template to
the file header, which can help users to know all the org-contacts
properties quickly.
* contrib/lisp/org-contacts.el (org-contacts-ignore-property): Improve
formatting and spelling.
(org-contacts-complete-name): Improve formatting.
(org-contacts-vcard-format): Improve formatting and silent byte compiler.
(org-contacts-split-property): Fix a bug where `omit-nulls' were not
forced to `t' when `separators' was nil.
* contrib/lisp/org-contacts.el (org-contacts-ignore-property): New variable.
(org-contacts-remove-ignored-property-values): New function, which
remove all ignore-list's elements from list.
(org-contacts-complete-name): When completing, ignore the
values which has been included into the ignore property.
(org-contacts-vcard-format): Don't export the values which has
been included into the ignore property.
If emails or phones is included into the ignore property, they will
not show in complete buffer. When the contact is exported to vcard,
they will be ignored too.
* contrib/lisp/org-contacts.el (org-contacts-setup-completion-at-point):
Setup `completion-at-point-functions' in a dedicated function so it's
easier to add and to remove it from `message-mode-hook'.
(org-contacts-unload-hook): This function removes all hooks added while
loading `org-contacts' in order to respect Emacs coding conventions.
* contrib/lisp/org-contacts.el (org-contacts-filter): Add a PROP-MATCH
argument.
(org-contacts-gnus-article-from-get-marker): Search for email as a
property not a tag.
`org-contacts-gnus-article-from-get-marker' seems to assume that the
contact properties exist within the contact's tags as colon-separated
KEY={VALUE} entries. This isn't the case for me, using org-mode from
git master.
This commit adds a PROP-MATCH argument to `org-contacts-filter' so
that `org-contacts-gnus-article-from-get-marker` can filter by the
EMAIL property.
* contrib/lisp/org-contacts.el (org-contacts-db): Use
`make-progress-reporter' instead of `message' for messages. Also
change the sentence to present progressive tense.
* contrib/lisp/org-contacts.el (org-contacts-property-values-separators):
Definition of a new constant that will be used as default value of
separators for `org-contacts-split-property'.
* contrib/lisp/org-contacts.el (org-contacts-vcard-format): We are now
using the default separator in general.
* contrib/lisp/org-contacts.el (org-contacts-show-map): Line break
corrected.
* contrib/lisp/org-contacts.el (org-contacts-split-property): Correct
the comment describing the function. Application of the newly
defined constant `org-contacts-property-values-separators'.
* contrib/lisp/org-contacts.el (org-contacts-split-property):
Introduce a custom version of split-string that keeps org links
intact.
* contrib/lisp/org-contacts.el (org-contacts-strip-link): Introduce a
new function that removes brackets, description, link type and colon
from an org link string returning the pure link target.
* contrib/lisp/org-contacts.el (provide 'org-contacts): Remove a
redundant line.
* contrib/lisp/org-contacts.el (org-contacts-complete-group,
org-contacts-complete-name, org-contacts-view-send-email,
org-contacts-get-icon, org-contacts-vcard-format): Apply the new
functions to the already existing functions extracting telephone
numbers and email addresses from the properties.
Allowed separators for email addresses and phone numbers are `,', `;'
and whitespace. `:' is not allowed anymore as separator to avoid
confusion with implicit links.
Examples of properties that are possible after those changes:
* Surname, Name
:PROPERTIES:
:EMAIL: mailto:test2@test.de; [[mailto:name@test.de]] foo@bar.biz
:PHONE: [[tel:+49 351 4129535]], +491766626196 [[+49 (351) 41295-35]]
:END:
Phone links of the form [[tel:+49 351 412 95-35][My phone number]] or
[[tel:+49 351 41295-35]] are expected. `-', `/', `(', `)' and
whitespace characters are allowed in telephone numbers.
* contrib/lisp/org-contacts.el (org-contacts-db): fix typo in the
word `matching'.
* contrib/lisp/org-contacts.el (org-contacts-complete-group): fix typo
in the word `found'.
TINYCHANGE
* contrib/lisp/org-contacts.el (org-contacts-alias-property): add new
varible
(org-contacts-matcher): add org-contacts-alias-property to this list
Name alias is a very useful feature, especially for CJK users.
* contrib/lisp/org-contacts.el (org-contacts-export-as-vcard): Don't use
non-existent function `org-install-letbind'.
Thanks to Simon Thum for reporting this.
* org-contacts.el (org-contacts-vcard-format): let the function
work with email-address list.
The org-contact file is :
* Name
:PROPERTIES:
:EMAIL: name1@test.org; name2@test.org, name3@test.orgname4@test.org
:END:
The export result is like:
BEGIN:VCARD
VERSION:3.0
N:Name;;;
FN:Name
EMAIL:name1@test.org
EMAIL:name2@test.org
EMAIL:name3@test.org
EMAIL:name4@test.org
END:VCARD
* contrib/lisp/org-contacts.el: Add defvar for date. Similar to org.el.
(org-contacts-anniversaries): Setting date to nil breaks the
function. Bug was introduced in e4cebbe40.
Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* contrib/lisp/org-contacts.el (org-contacts-complete-name): Compute the
completion-list a bit earlier to prevent an error when there is no
completion available.
* contrib/lisp/org-contacts.el (org-contacts-enable-completion): A
custom boolean variable to enable the completion with
`org-contacts'. Enabled by default.
* contrib/lisp/org-contacts.el: Remove some compile-time warnings by adding the proper declarations.
(org-contacts-anniversaries): Hack around an undefined variable
because I wasn't able to understand how this function works.
(org-contacts-wl-get-from-header-content): Check whether the variable
`wl-summary-buffer-elmo-folder' is bound or not.
* contrib/lisp/org-contacts.el (org-contacts-db-need-update?): New
function to determine whether we need to refresh `org-contacts-db'.
(org-contacts-db): Use `org-contacts-db-need-updated?'.
* contrib/lisp/org-contacts.el: Use `org-agenda-prefix-format' to
format entry instead of unused org-agenda-format.
Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* contrib/lisp/org-contacts.el (org-contacts-message-complete-function):
Remove `completion-in-region--postch' from `post-command-hook'
because it doesn't (seem?) do anything really useful.
* org-contacts.el: Improve the completion part:
- When a group is found, it now replaces the name of the group by the
addresses of the member of the group rather than appending the
addresses.
- One can now complete on all part of an address and not only on the
beginning of the name.
lisp/org.el (org-scan-tags): Require todo-only argument, and document
that it should be the same one set by make-org-tags-matcher.
Fix documentation to explain that todo-only is really
not-done-todo-only.
(org-make-tags-matcher): If todo part of matcher starts with /!,
matcher now always checks that the TODO keyword is present and
is a not-done state. This matters e.g. for org-map-entries
which unlike org-scan-tags does not do its own separate todo-only
filtering. Added docs to explain matcher dependencies.
(org-map-entries): Make sure todo-only is correctly passed from
org-make-tags-matcher to org-scan-tags.
* lisp/org-clock.el: (org-clock-get-table-data): Make sure todo-only
does not leak when it is set by make-org-tags-macher.
* lisp/org-crypt.el: (org-encrypt-entries, org-decrypt-entries): Make
sure todo-only is correctly passed from org-make-tags-matcher to
org-scan-tags.
* contrib/lisp/contacts.el: (org-contacts-filter) : Make sure todo-only
is correctly passed from org-make-tags-matcher to org-scan-tags.
Additionally, replace one
(or (org-mode-p) (derived-mode-p 'org-mode))
with
(derived-mode-p 'org-mode)
cause that is reflexive anyway (returns true, if the current mode is
org-mode).
Delete one check testing for org-mode or org derived mode