[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-contacts-rebased 531d67a 014/118: Fix Emacs 24 compat
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/org-contacts-rebased 531d67a 014/118: Fix Emacs 24 compatibility issue with Emacs 24 |
Date: |
Fri, 12 Nov 2021 15:36:55 -0500 (EST) |
branch: scratch/org-contacts-rebased
commit 531d67a7150b3fbe4f97d736e65ab476706b1a31
Author: Tassilo Horn <tassilo@member.fsf.org>
Commit: Carsten Dominik <carsten.dominik@gmail.com>
Fix Emacs 24 compatibility issue with Emacs 24
* contrib/lisp/org-contacts.el (completion-table-case-fold): Make
completion compatible with Emacs 24Fix org-contacts completion at point
(was: org-contacts completion stopped working)
julien Barnier <julien@nozav.org> writes:
Hi Julien,
>> I use a very recent emacs 24 bzr checkout and org master from git.
>> Not sure who's the culprit.
>
> Same problem here. After a quick look it seems that there has been a
> recent change in the arguments taken by the completion-table-case-fold
> function in minibuffer.el :
>
> http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/105991
Thanks for the pointer!
> But I don't think I could be able to find a fix by myself.
But I was able, so good teamwork, mate. :-)
--8<---------------cut here---------------start------------->8---
>From d89ca3ce39cd7436e5205744adcf468d9619180f Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tassilo@member.fsf.org>
Date: Thu, 13 Oct 2011 17:02:07 +0200
Subject: [PATCH 2/2] Fix org-contacts completion at point.
---
org-contacts.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index f4d9cd7..4b21d26 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -169,9 +169,10 @@ If both match values are nil, return all contacts."
(when (not (fboundp 'completion-table-case-fold))
;; That function is new in Emacs 24...
- (defun completion-table-case-fold (table string pred action)
- (let ((completion-ignore-case t))
- (complete-with-action action table string pred))))
+ (defun completion-table-case-fold (table &optional dont-fold)
+ (lambda (string pred action)
+ (let ((completion-ignore-case (not dont-fold)))
+ (complete-with-action action table string pred)))))
(defun org-contacts-complete-name (&optional start)
"Complete text at START with a user name and email."
@@ -226,9 +227,7 @@ If both match values are nil, return all contacts."
;; If the user has an email
address, append USER <EMAIL>.
if email collect
(org-contacts-format-email contact-name email))
", ")))))
- (list start end (if org-contacts-completion-ignore-case
- (apply-partially #'completion-table-case-fold
completion-list)
- completion-list))))
+ (list start end (completion-table-case-fold completion-list (not
org-contacts-completion-ignore-case)))))
(defun org-contacts-message-complete-function ()
"Function used in `completion-at-point-functions' in `message-mode'."
- [elpa] scratch/org-contacts-rebased dcd313e 021/118: Tags/properties matcher: Fixed issues with todo-only matches, (continued)
- [elpa] scratch/org-contacts-rebased dcd313e 021/118: Tags/properties matcher: Fixed issues with todo-only matches, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 938ca34 019/118: Add missing word to org-contacts y-or-n-p question, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c0f4677 024/118: contrib/lisp/org-contacts.el: Require 'org-agenda., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 6b235b4 044/118: contrib/lisp/*el: Fix license information and add "This file is not part...", Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 66e23e6 008/118: org-contacts: added VCard 3.0 exporter and ADDRESS field, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased e585be0 009/118: org-contacts: added org-contacts-show-map (requires google-maps-el), Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 6c12101 010/118: org-contacts: Use `with-current-buffer' instead of `save-excursion'+`with-current-buffer'., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7cae69f 011/118: org-contacts: Require cl on compilation., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased ef5cb24 016/118: Copyright year fixes for contrib/., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5f1806a 012/118: org-contacts: fix errors when Gnus or ERC are not loaded, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 531d67a 014/118: Fix Emacs 24 compatibility issue with Emacs 24,
Stefan Monnier <=
- [elpa] scratch/org-contacts-rebased 2b1a75a 030/118: Improve `completion-at-point' for `org-contacts.el' in mail, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 010b2ec 029/118: org-contacts.el (org-contacts-format-name): New function, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 8bf8565 027/118: Update copyright years., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 72d2caf 022/118: add a missing require for gnus-util, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c297cb0 020/118: Merge branch 'maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased ea8cbe4 013/118: Fix copyright years for elisp files in core and contrib., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 15f35f7 040/118: orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries'., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 8b85530 037/118: org-contacts.el: Let the users decide if they want to use `org-contacts' to complete mail addresses, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 884d61f 042/118: Fix typo., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 48ca58b 033/118: Do not complete when it's not necessary, Stefan Monnier, 2021/11/12