From cdaeb80704c89ab4aa193bf33e5f990d0d1308ce Mon Sep 17 00:00:00 2001 From: Clemens Radermacher Date: Wed, 27 Jan 2021 12:43:20 +0100 Subject: [PATCH 1/3] Remove selectrum-candidate-full property --- CHANGELOG.md | 1 + README.md | 7 ------- selectrum.el | 10 +++++----- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe792765..89658172 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog]. your configuration or also adjust it to `auto`. For configuring the window height you should use the new `selectrum-max-window-height` option now ([#305]). +* The text property `selectrum-candidate-full` has been removed. ### Features * The new option `selectrum-max-window-height` can now be used to diff --git a/README.md b/README.md index d31f05c6..26792491 100644 --- a/README.md +++ b/README.md @@ -547,13 +547,6 @@ which may be applied to candidates using `propertize`: but it's postpended instead of prepended when the candidate is dispalyed. This is used, for example, to display candidate annotations under `completion-in-region`. -* `selectrum-candidate-full`: controls how the candidate appears in - the user input area of the minibuffer. If this property is present, - then it specifies the canonical representation of the candidate. - This is the value that will be returned from `selectrum-read`. It is - also the value that will be inserted when the user presses `TAB`. In - `find-file`, the canonical representation of each candidate is its - absolute path on the filesystem. Besides, we have: diff --git a/selectrum.el b/selectrum.el index cc5b1600..ab17df09 100644 --- a/selectrum.el +++ b/selectrum.el @@ -644,7 +644,7 @@ behavior." (defun selectrum--get-full (candidate) "Get full form of CANDIDATE." - (or (get-text-property 0 'selectrum-candidate-full candidate) + (or (get-text-property 0 'selectrum--candidate-full candidate) (when minibuffer-completing-file-name (if (and selectrum--current-candidate-index (< selectrum--current-candidate-index 0)) @@ -2306,7 +2306,7 @@ Selectrum unless RAW is non-nil." "./" match)) (full (concat prefix path suffix))) (propertize path - 'selectrum-candidate-full + 'selectrum--candidate-full full 'selectrum--partial prefix)))))))) @@ -2322,9 +2322,9 @@ For STRING, CANDS, PRED and POINT see (cands (cl-loop for cand in cands collect (propertize (concat prefix cand) - 'selectrum-candidate-full + 'selectrum--candidate-full (get-text-property - 0 'selectrum-candidate-full cand)))) + 0 'selectrum--candidate-full cand)))) (res (selectrum--partial-file-completions string cands pred 'raw))) (cl-loop for cand in res collect (substring cand len))))) @@ -2372,7 +2372,7 @@ For PROMPT, COLLECTION, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, collect (propertize var - 'selectrum-candidate-full + 'selectrum--candidate-full (concat dir val) 'selectrum-candidate-display-right-margin val))) From 81b9384ca1282045aca2ee61ea0eb0c4684a3ec1 Mon Sep 17 00:00:00 2001 From: Clemens Radermacher Date: Wed, 27 Jan 2021 12:44:30 +0100 Subject: [PATCH 2/3] Add ref --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89658172..611fc6b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,8 @@ The format is based on [Keep a Changelog]. your configuration or also adjust it to `auto`. For configuring the window height you should use the new `selectrum-max-window-height` option now ([#305]). -* The text property `selectrum-candidate-full` has been removed. +* The text property `selectrum-candidate-full` has been removed + ([#403]). ### Features * The new option `selectrum-max-window-height` can now be used to @@ -334,6 +335,7 @@ The format is based on [Keep a Changelog]. [#398]: https://github.com/raxod502/selectrum/pull/398 [#401]: https://github.com/raxod502/selectrum/pull/401 [#402]: https://github.com/raxod502/selectrum/pull/402 +[#403]: https://github.com/raxod502/selectrum/pull/403 ## 3.0 (released 2020-10-20) ### Breaking changes From d94906f747dd46837765a37833b618517f38b81a Mon Sep 17 00:00:00 2001 From: Clemens Radermacher Date: Wed, 27 Jan 2021 12:46:52 +0100 Subject: [PATCH 3/3] Rephrase --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 611fc6b5..23865a1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,8 +19,8 @@ The format is based on [Keep a Changelog]. your configuration or also adjust it to `auto`. For configuring the window height you should use the new `selectrum-max-window-height` option now ([#305]). -* The text property `selectrum-candidate-full` has been removed - ([#403]). +* The special text property `selectrum-candidate-full` to change the + canonical representation of a candidate has been removed ([#403]). ### Features * The new option `selectrum-max-window-height` can now be used to