Commit Graph

103 Commits

Author SHA1 Message Date
Stefan Kangas 2e1c984153 Prefer HTTPS to HTTP in most links 2021-03-21 15:21:22 -04:00
Stefan Kangas 8cc992f7b2 Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
stardiviner 3d80b5bff6
org-contacts.el: Display contacts buffer result.
* contrib/lisp/org-contacts.el (org-contacts-link-open): Display the
searched contacts file buffer.
2021-01-25 10:04:40 +08:00
Ihor Radchenko 9ea7ff5e2f Fix typo in f948234cb 2021-01-10 17:13:38 -05:00
stardiviner 94d1753ec8
org-contacts.el: Fix store link function does not return link.
* contrib/lisp/org-contacts.el (org-contacts-link-store): Fix
org-store-link return incorrect link without link type prefix.
2021-01-05 19:30:36 +08:00
David Florness 38f143830c
org-contacts.el: Use `bound-and-true-p' to check (unbound) var
* 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.
2021-01-05 19:28:11 +08:00
David Florness e6e1c08116
org-contacts.el: Only use org-id-store-link if org-id is loaded
Fixes bug introduced in 6b83c6e4e that made org-contacts-anniversaries
error if org-id was not loaded.
2021-01-05 01:33:20 +08:00
stardiviner c3888a8b74
org-contacts.el: replace obsolete alias `loop' with `cl-loop'
* contrib/lisp/org-contacts.el (org-contacts-get-icon): replace obsolete
alias `loop' with `cl-loop'.
2021-01-03 20:17:37 +08:00
stardiviner f948234cba
org-contacts.el: Add usage comments
* contrib/lisp/org-contacts.el: Add usage comments.
2021-01-03 20:16:41 +08:00
stardiviner 713b3bf7a0
org-contacts.el: Inherit face from org-link
* contrib/lisp/org-contacts.el (org-contacts-link-face): Don't use a
color for org-contacts line, inherit from face org-link directly.
2020-12-20 20:43:23 +08:00
stardiviner 6b83c6e4ea
org-contacts.el: Add support for org-id generated link.
* contrib/lisp/org-contacts.el (org-contacts-link-store): Use org-id
store link if org-id-link-to-org-use-id is t.
2020-12-17 14:38:15 +08:00
stardiviner e7f625d426
org-contacts.el: Fix org-store-link error caused by org-contacts
* contrib/lisp/org-contacts.el (org-contacts-link-store): Fix Org store
link by adding missing condition for org-contacts.
2020-12-17 14:38:11 +08:00
Bastien c822c80ef8 contrib/lisp/org-contacts.el: Add stardiviner as the maintainer 2020-12-15 15:26:35 +01:00
stardiviner e9c3993ee5 org-contacts.el: Add new link type "contact:"
* contrib/lisp/org-contacts.el (org-contacts-link-store): Store a link
of org-contacts in Org file.

* contrib/lisp/org-contacts.el (org-contacts-link-open): Open contact:
link in Org file.

* contrib/lisp/org-contacts.el (org-contacts-link-complete): Insert a
contact: link with completion of contacts.

* contrib/lisp/org-contacts.el (org-contacts-link-face): Set different
face for contact: link.
2020-11-11 09:35:01 +01:00
Nicolas Goaziou 6c9d0e86b1 Fix function declarations 2019-03-10 18:00:36 +01:00
Nicolas Goaziou cc7c4a6732 Rationalize `org-link-(un)escape'
* contrib/lisp/org-contacts.el (org-contacts-vcard-format):
* contrib/lisp/org-link-edit.el (org-link-edit--link-data):
* contrib/lisp/org-notmuch.el (org-notmuch-search-store-link):
(org-notmuch-search-follow-link):
(org-notmuch-tree-follow-link):
* lisp/org-docview.el (org-docview-export):
* lisp/org-element.el (org-element-link-parser):
* lisp/org-lint.el (org-lint-link-to-local-file):
* lisp/org-protocol.el (org-protocol-split-data):
(org-protocol-parse-parameters):
* lisp/org.el (org-open-at-point):
(org-display-inline-images):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex--inline-image):
(org-latex-link):
* lisp/ox-publish.el (org-publish-resolve-external-link):
* lisp/ox.el (org-export-custom-protocol-maybe):
(org-export-resolve-fuzzy-link): Do not call `org-link-unescape' when
the link is obtained through the parser or as a user input.
* doc/org-manual.org (Link Format): Document escape syntax.

See <http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00320.html>
2019-02-27 20:22:51 +01:00
Robert Klein d738c6849b Update tel link definition
* contrib/lisp/org-contacts.el ("contacts"):

Update to use org-link-set-parameters.
2016-08-08 11:10:04 +02:00
Nicolas Goaziou 72461eaeaf Use `string-match-p' instead of `org-string-match-p'
* contrib/lisp/org-contacts.el (org-contacts-filter):
(org-contacts-complete-group):
(org-contacts-complete-tags-props):
* contrib/lisp/org-wl.el (org-wl-open):
* contrib/lisp/ox-bibtex.el (org-bibtex-merge-contiguous-citations):
* lisp/ob-core.el (org-babel-demarcate-block):
* lisp/ob-processing.el (org-babel-processing-view-sketch):
* lisp/ob-stan.el (org-babel-execute:stan):
* lisp/org-agenda.el (org-agenda-get-category-icon):
* lisp/org-clock.el (org-clock-into-drawer):
* lisp/org-element.el (org-element-link-parser):
* lisp/org-lint.el (org-lint-orphaned-affiliated-keywords):
(org-lint-invalid-babel-call-block):
(org-lint-colon-in-name):
* lisp/org-list.el (org-list-item-body-column):
* lisp/org-macro.el (org-macro-replace-all):
* lisp/org-plot.el (org-plot/gnuplot-script):
* lisp/org-table.el (org-table-export):
(org-table-align):
(org-table-get-range):
(org-table-recalculate):
(org-table-expand-lhs-ranges):
(org-table-formula-substitute-names):
(org-table-show-reference):
(orgtbl-to-texinfo):
(org-table-remote-reference-indirection):
* lisp/org.el (org-make-link-string):
(org--open-elisp-link):
(org-open-at-point):
(org-store-log-note):
(org-cached-entry-get):
(org--valid-property-p):
(org-entry-properties):
(org-buffer-property-keys):
(org-insert-drawer):
(org-display-inline-images):
(org-in-commented-heading-p):
* lisp/ox-ascii.el (org-ascii-keyword):
* lisp/ox-beamer.el (org-beamer--format-frame):
* lisp/ox-html.el (org-html-keyword):
* lisp/ox-latex.el (org-latex--label):
(org-latex-headline):
(org-latex-item):
(org-latex-keyword):
(org-latex--inline-image):
(org-latex-src-block):
* lisp/ox-odt.el (org-odt-styles-dir):
(org-odt-keyword):
(org-odt--translate-latex-fragments):
* lisp/ox-texinfo.el (org-texinfo-template):
(org-texinfo-keyword):
(org-texinfo-src-block):
* lisp/ox.el (org-export-inline-image-p):
(org-export-file-uri):
* testing/lisp/test-org-table.el (test-org-table/to-generic):
(test-org-table/to-latex):
(test-org-table/to-html):
(test-org-table/named-field):
(test-org-table/named-column):
(test-org-table/tab-indent):
(test-org-table/first-rc):
(test-org-table/last-rc): Use `string-match-p' instead of
`org-string-match-p'.
2016-07-25 15:21:12 +02:00
Nicolas Goaziou ee7aa9878f Deprecate `org-no-warnings' in favor of `with-no-warnings'
* lisp/org-macs.el (org-no-warnings): Rewove macro.
* lisp/org-compat.el (org-no-warnings): Mark `org-no-warnings' as
  obsolete.
* contrib/lisp/org-contacts.el (defvar):
* contrib/lisp/org-wl.el (org-wl-open):
* lisp/org-agenda.el (defvar):
(org-anniversary):
(org-cyclic):
(org-block):
(org-date):
* lisp/org-bbdb.el (defvar):
* lisp/org-clock.el (org-clock-out):
(org-clock-cancel):
* lisp/org-mouse.el (org-mouse-show-context-menu):
* lisp/org.el (org-modify-ts-extra):
(org-order-calendar-date-args): Small refactoring.
* lisp/ox-odt.el (org-odt-htmlfontify-string):
2016-06-23 15:20:32 +02:00
Nicolas Goaziou 705904552c Deprecate `org-find-if' in favor of `cl-find-if'
* lisp/org.el (org-find-if): Remove function.
(org-key):
* contrib/lisp/org-contacts.el (org-contacts-db-need-update-p):
(org-contacts-filter):
(org-contacts-test-completion-prefix):
(org-contacts-remove-ignored-property-values): Use `cl-find-if'
* lisp/org-compat.el (org-find-if): Mark function as an obsolete alias
  for `cl-find-if'.
2016-06-23 09:22:49 +02:00
Nicolas Goaziou c112f40d51 org-agenda: Remove unnecessary visibility modification
* lisp/org.el (org-show-context-detail): Change default visibility span
  for agenda context.

* lisp/org-agenda.el (org-agenda-goto):
(org-agenda-todo):
(org-agenda-add-note):
(org-agenda-priority):
(org-agenda-set-tags):
(org-agenda-set-property):
(org-agenda-set-effort):
(org-agenda-toggle-archive-tag):
(org-agenda-clock-in): Special visibility is taken care of by
`org-show-context'.  Do not hard-code anything else.

* contrib/lisp/org-contacts.el (org-contacts-gnus-article-from-goto):
Special visibility is taken care of by `org-show-context'.  Do not
hard-code anything else.
2016-04-29 11:35:49 +02:00
Simon Thum aa78158036 org-contacts: Register "tel" link
This has the added benefit of not screwing up the exporter.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
2016-02-25 10:14:25 +01:00
Nicolas Goaziou a02a83793b Make `org-make-tags-matcher' lexical binding friendly
* lisp/org.el (org-make-tags-matcher): Return a function instead of
  a sexp.  Refactor code.
(org--matcher-tags-todo-only): New variable.  Replace `todo-only'
dynamic binding.
(org-scan-tags): Apply changes to `org-make-tags-matcher'.
(org-match-sparse-tree):
(org-map-entries): Use new variable.

* lisp/org-crypt.el (org-encrypt-entries):
(org-decrypt-entries): Use new variable.

* lisp/org-clock.el (org-clock-get-table-data): Apply changes to
  `org-make-tags-matcher'.

* lisp/org-agenda.el (org-tags-view): Use new variable.
2016-01-10 21:16:29 +01:00
Jan Malakhovski 0b6e63008a org-contacts: Fix org-contacts-matcher for BIRTHDAYs
* contrib/lisp/org-contacts.el (org-contacts-matcher): Fix expression to
  work for BIRTHDAY-only contacts.
2015-12-29 21:09:32 +01:00
Aaron Ecay ea238b78f8 contrib: move a few libraries to cl-lib in place of compile-time cl.
Specifically ob-julia, ob-stata, org-contacts, ox-bibtex.
2015-11-06 12:50:41 +00:00
Aaron Ecay e4cd3dd22b Remove some home-grown copies of cl-lib functions.
* lisp/org.el (org-count, org-remove-if, org-remove-if-not):
(org-reduce, org-every, org-some): Obsolete, use cl-lib versions
everywhere.
(org-sublist): Reimplement in terms of `cl-subseq'; make obsolete.
2015-11-06 12:50:40 +00:00
Philippe Crama 742d6f169f org-contacts.el: Catch `nextfile' in `org-contacts-db'
* org-contacts.el (org-contacts-db): Catch `nextfile'.

When a file in the list returned by the `org-contacts-files' function
doesn't exist and the user selects the option to attempt to remove it
from the `org-agenda-files' list, 'nextfile is thrown.  Catch it and
skip processing that file instead of failing.

TINYCHANGE
2015-06-23 23:47:46 +02:00
Aaron Ecay 30b0c09275 contrib: Fix error messages.
* contrib/lisp/ob-eukleides.el (org-babel-execute:eukleides):
* contrib/lisp/ob-oz.el (org-babel-execute:oz):
* contrib/lisp/ob-tcl.el (org-babel-prep-session:tcl):
(org-babel-tcl-evaluate):
* contrib/lisp/org-contacts.el (org-contacts-view-send-email):
* contrib/lisp/org-drill.el (org-drill-hide-heading-at-point):
* contrib/lisp/org-mew.el (org-mew-search):
(org-mew-capture):
* contrib/lisp/org-toc.el (org-toc-forward):
* contrib/lisp/ox-freemind.el (org-freemind--build-node-contents): Fix
formatting of error messages.
2015-01-26 02:54:17 -05:00
Grégoire Jadi 08e7795859 contrib/lisp/org-contacts.el: Allow the user to customize interactively the vcard export
* contrib/lisp/org-contacts.el (org-contacts-export-as-vcard): Wrap
  `org-contacts-export-as-vcard-internal' to prompt for the parameters
  when called interactively.
(org-contacts-export-as-vcard-internal): The old function
  `org-contacts-export-as-vcard'.

Thanks to Esben Stien for the suggestion.
2014-07-26 13:36:46 +09:00
Grégoire Jadi 9cf3c4e971 contrib/lisp/org-contacts.el: Fix a bug when contacts don't have an email address
* contrib/lisp/org-contacts.el (org-contacts-complete-tags-props,
org-contacts-complete-group): Fix a bug when contacts don't have an
email address.
2014-07-13 19:34:27 +09:00
Grégoire Jadi a11ce0b456 contrib/lisp/org-contacts.el: Complete contacts using tags and properties
* contrib/lisp/org-contacts.el (org-contacts-complete-tags-props): New
function that allows the user to retrieve contacts based on tags and
properties.

(org-contacts-complete-functions): Add
org-contacts-complete-tags-props to the completion functions.

(org-contacts-tags-props-prefix): Prefix used to detect the
completion method wished.

Based on the idea and implementation of John Kitchin
2014-07-13 19:28:49 +09:00
Grégoire Jadi 9303717691 contrib/lisp/org-contacts.el: Factorize the construction of the database
* contrib/lisp/org-contacts.el (org-contacts-at-point): New function
  used to return the contact at point.
(org-contacts-db): Factorize the construction of the database using
`org-contacts-at-point' and fix a small typo.
2014-06-17 16:42:08 +09:00
Grégoire Jadi e57c4c6e32 contrib/lisp/org-contacts.el: Add a hook to allow users to plug completion functions
* contrib/lisp/org-contacts.el (org-contacts-complete-functions): A
  hook that contains the list of functions used to complete contacts.
(org-contacts-message-complete-function): Use the new hook.

Suggested by John Kitchin.
2014-06-17 16:41:49 +09:00
Bastien Guerry f8e1745440 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-07 14:19:03 +01:00
Bastien Guerry 7d9a883b50 Update copyright years again.
Hint: copyright years are all updated in Emacs.
2014-01-07 14:18:17 +01:00
Bastien Guerry c41f5075ac Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-05 06:36:11 +01:00
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Bastien Guerry 096ff7e078 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Simon Thum 5f73d93711 un-hexify TEL links in vCard export
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
2013-09-25 14:32:58 +02:00
Aaron Ecay 17b9475f7e org-contacts: use `org-' prefixed variants of cl functions
* contrib/lisp/org-contacts.el (org-contacts-remove-ignored-property-values):
Use `org-remove-if' and `org-find-if' instead of the unprefixed variants.
2013-07-27 01:21:27 -04:00
Øyvind Stegard cc74ae8b7a org-contacts: Ensure contacts cache is updated if it contains markers with no buffer
* 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.
2013-07-20 17:21:37 +02:00
Øyvind Stegard d3fb1812fa org-contacts: Provide ordering when using cycle completion
* 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.
2013-06-11 20:43:19 +02:00
Feng Shu e3cc1ca792 contrib/lisp/org-contacts.el: Add a complex org-contacts template to the file header
* 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.
2013-06-04 00:35:28 +02:00
Grégoire Jadi 1399c34e2a contrib/lisp/org-contacts.el: Various formatting improvements and bug fixes
* 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.
2013-05-31 01:54:19 +02:00
Feng Shu c81b905f44 contrib/lisp/org-contacts.el: Add a feature, which can ignore emails or phones with property
* 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.
2013-05-31 01:17:58 +02:00
Grégoire Jadi d9d9226c92 contrib/lisp/org-contacts.el (org-contacts-vcard-format): Silence byte-compiler
* contrib/lisp/org-contacts.el (org-contacts-vcard-format): Silence byte-compiler.
2013-05-09 00:37:54 +02:00
Grégoire Jadi c82b34adb6 contrib/lisp/org-contacts.el: Permit to unload properly `org-contacts'
* 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.
2013-05-09 00:37:53 +02:00
Rodney Lorrimar ccfe83666b org-contacts: Fix org-contacts-gnus-article-from-goto
* 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.
2013-05-04 18:48:28 +02:00
Rodney Lorrimar 40b24a82f4 org-contacts: Use progress-reporter for cache update message
* 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.
2013-05-04 18:47:55 +02:00