From 85dd965906b91a4fa9e6450385be0c5535572dea Mon Sep 17 00:00:00 2001 From: stardiviner Date: Thu, 18 Nov 2021 15:08:05 +0800 Subject: [PATCH] Remove testing code --- org-contacts.el | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/org-contacts.el b/org-contacts.el index 55054bd..7f819df 100644 --- a/org-contacts.el +++ b/org-contacts.el @@ -676,7 +676,8 @@ description." (cons (current-buffer) position)))) (defun org-contacts-org-complete-function () - "Function used in `completion-at-point-functions' in `org-mode' to complete @name." + "Function used in `completion-at-point-functions' in `org-mode' to complete @name. +Usage: (add-hook 'completion-at-point-functions 'org-contacts-org-complete-function nil 'local)" (when-let* ((end (point)) (begin (save-excursion (skip-chars-backward "[:alnum:]@") (point))) (symbol (buffer-substring-no-properties begin end)) @@ -711,32 +712,6 @@ description." ;; :company-location #'org-contacts-org-complete--location-function )))) -(add-hook 'completion-at-point-functions 'org-contacts-org-complete-function nil 'local) - -(try-completion - "tri" - (mapcar - (lambda (contact) (plist-get contact :name)) - (org-contacts--all-contacts))) - -(all-completions "Chr" (nth 2 (org-contacts-org-complete-function))) - -;; @Chris - -;; (type-of -;; (all-completions -;; "tri" -;; (mapcar -;; (lambda (contact) (plist-get contact :name)) -;; (org-contacts--all-contacts)) -;; 'stringp)) - -;;; TEST -;;; @chris -;; (add-hook 'completion-at-point-functions 'org-contacts-org-complete-function nil 'local) -;; (remove-hook 'completion-at-point-functions 'org-contacts-completion-at-point 'local) -;; (add-to-list 'completion-at-point-functions 'org-contacts-org-complete-function) - (defun org-contacts-gnus-get-name-email () "Get name and email address from Gnus message." (if (gnus-alive-p)