Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ivy-mode error when setting Org-mode property #1565

Closed
stardiviner opened this issue May 13, 2018 · 3 comments · Fixed by #1568

Comments

@stardiviner
Copy link

commented May 13, 2018

Test with swiper source code.
In the current latest commit caused this error.

Debugger entered--Lisp error: (wrong-type-argument stringp ("AUTHOR"))
  string-lessp(("AUTHOR") ("ARCHIVE"))
  sort((("ARCHIVE")) string-lessp)
  cl-sort((("ARCHIVE")) string-lessp)
  ivy--reset-state(#s(ivy-state "Property: " (("ARCHIVE") ("AUTHOR") ("CATEGORY") ("CLOCK_MODELINE_TOTAL") ("COLUMNS") ("COOKIE_DATA") ("CRYPTKEY") ("CUSTOM_ID") ("DATE") ("DESCRIPTION") ("DRILL_CARD_TYPE") ("Effort") ("EXPORT_AUTHOR") ("EXPORT_DATE") ("EXPORT_FILE_NAME") ("EXPORT_OPTIONS") ("EXPORT_TEXT") ("EXPORT_TITLE") ("header-args") ("HTML_CONTAINER_CLASS") ("ISSUE") ("LOCATION") ("LOGGING") ("LOG_INTO_DRAWER") ("NOBLOCKING") ("ORDERED") ("ORGTBL") ("Pull_Request") ("REPEAT_TO_STATE") ("Source_Code") ("STYLE") ("SUMMARY") ("TABLE_EXPORT_FILE") ("TABLE_EXPORT_FORMAT") ("TIME") ("Translation-Chinese") ("UNNUMBERED") ("URL") ("VISIBILITY")) nil nil nil nil nil nil nil t #<frame emacs@dark 0xe29b6a0> #<window 10 on My Bash Syntax Reference.org> #<buffer My Bash Syntax Reference.org> nil (1 ("o" identity "default") ("i" #[257 "\211;\203\11\0\211\202\13\0\211@c\207" [] 2 "\n\n(fn X)"] "insert") ("w" #[257 "\300\1;\203\n\0\1\202\f\0\1@!\207" [kill-new] 3 "\n\n(fn X)"] "copy")) nil nil nil nil nil "/home/stardiviner/Org/Wiki/Computer Technology/Programming/Programming Languages/Shell/Bash/Data/Manuals/My Bash Syntax Reference/" nil nil nil))
  ivy-read("Property: " (("ARCHIVE") ("AUTHOR") ("CATEGORY") ("CLOCK_MODELINE_TOTAL") ("COLUMNS") ("COOKIE_DATA") ("CRYPTKEY") ("CUSTOM_ID") ("DATE") ("DESCRIPTION") ("DRILL_CARD_TYPE") ("Effort") ("EXPORT_AUTHOR") ("EXPORT_DATE") ("EXPORT_FILE_NAME") ("EXPORT_OPTIONS") ("EXPORT_TEXT") ("EXPORT_TITLE") ("header-args") ("HTML_CONTAINER_CLASS") ("ISSUE") ("LOCATION") ("LOGGING") ("LOG_INTO_DRAWER") ("NOBLOCKING") ("ORDERED") ("ORGTBL") ("Pull_Request") ("REPEAT_TO_STATE") ("Source_Code") ("STYLE") ("SUMMARY") ("TABLE_EXPORT_FILE") ("TABLE_EXPORT_FORMAT") ("TIME") ("Translation-Chinese") ("UNNUMBERED") ("URL") ("VISIBILITY")) :predicate nil :require-match nil :initial-input nil :preselect nil :def nil :history nil :keymap nil :sort t :dynamic-collection nil :caller nil)
  ivy-completing-read("Property: " (("ARCHIVE") ("AUTHOR") ("CATEGORY") ("CLOCK_MODELINE_TOTAL") ("COLUMNS") ("COOKIE_DATA") ("CRYPTKEY") ("CUSTOM_ID") ("DATE") ("DESCRIPTION") ("DRILL_CARD_TYPE") ("Effort") ("EXPORT_AUTHOR") ("EXPORT_DATE") ("EXPORT_FILE_NAME") ("EXPORT_OPTIONS") ("EXPORT_TEXT") ("EXPORT_TITLE") ("header-args") ("HTML_CONTAINER_CLASS") ("ISSUE") ("LOCATION") ("LOGGING") ("LOG_INTO_DRAWER") ("NOBLOCKING") ("ORDERED") ("ORGTBL") ("Pull_Request") ("REPEAT_TO_STATE") ("Source_Code") ("STYLE") ("SUMMARY") ("TABLE_EXPORT_FILE") ("TABLE_EXPORT_FORMAT") ("TIME") ("Translation-Chinese") ("UNNUMBERED") ("URL") ("VISIBILITY")) nil nil nil nil nil nil)
  completing-read("Property: " (("ARCHIVE") ("AUTHOR") ("CATEGORY") ("CLOCK_MODELINE_TOTAL") ("COLUMNS") ("COOKIE_DATA") ("CRYPTKEY") ("CUSTOM_ID") ("DATE") ("DESCRIPTION") ("DRILL_CARD_TYPE") ("Effort") ("EXPORT_AUTHOR") ("EXPORT_DATE") ("EXPORT_FILE_NAME") ("EXPORT_OPTIONS") ("EXPORT_TEXT") ("EXPORT_TITLE") ("header-args") ("HTML_CONTAINER_CLASS") ("ISSUE") ("LOCATION") ("LOGGING") ("LOG_INTO_DRAWER") ("NOBLOCKING") ("ORDERED") ("ORGTBL") ("Pull_Request") ("REPEAT_TO_STATE") ("Source_Code") ("STYLE") ("SUMMARY") ("TABLE_EXPORT_FILE") ("TABLE_EXPORT_FORMAT") ("TIME") ("Translation-Chinese") ("UNNUMBERED") ("URL") ("VISIBILITY")) nil nil nil nil nil nil)
  apply(completing-read ("Property: " (("ARCHIVE") ("AUTHOR") ("CATEGORY") ("CLOCK_MODELINE_TOTAL") ("COLUMNS") ("COOKIE_DATA") ("CRYPTKEY") ("CUSTOM_ID") ("DATE") ("DESCRIPTION") ("DRILL_CARD_TYPE") ("Effort") ("EXPORT_AUTHOR") ("EXPORT_DATE") ("EXPORT_FILE_NAME") ("EXPORT_OPTIONS") ("EXPORT_TEXT") ("EXPORT_TITLE") ("header-args") ("HTML_CONTAINER_CLASS") ("ISSUE") ("LOCATION") ("LOGGING") ("LOG_INTO_DRAWER") ("NOBLOCKING") ("ORDERED") ("ORGTBL") ("Pull_Request") ("REPEAT_TO_STATE") ("Source_Code") ("STYLE") ("SUMMARY") ("TABLE_EXPORT_FILE") ("TABLE_EXPORT_FORMAT") ("TIME") ("Translation-Chinese") ("UNNUMBERED") ("URL") ("VISIBILITY")) nil nil nil nil nil))
  (let ((enable-recursive-minibuffers t) (minibuffer-local-completion-map (copy-keymap minibuffer-local-completion-map))) (define-key minibuffer-local-completion-map " " 'self-insert-command) (define-key minibuffer-local-completion-map "?" 'self-insert-command) (define-key minibuffer-local-completion-map (kbd "C-c !") 'org-time-stamp-inactive) (apply (function completing-read) args))
  org-completing-read("Property: " (("ARCHIVE") ("AUTHOR") ("CATEGORY") ("CLOCK_MODELINE_TOTAL") ("COLUMNS") ("COOKIE_DATA") ("CRYPTKEY") ("CUSTOM_ID") ("DATE") ("DESCRIPTION") ("DRILL_CARD_TYPE") ("Effort") ("EXPORT_AUTHOR") ("EXPORT_DATE") ("EXPORT_FILE_NAME") ("EXPORT_OPTIONS") ("EXPORT_TEXT") ("EXPORT_TITLE") ("header-args") ("HTML_CONTAINER_CLASS") ("ISSUE") ("LOCATION") ("LOGGING") ("LOG_INTO_DRAWER") ("NOBLOCKING") ("ORDERED") ("ORGTBL") ("Pull_Request") ("REPEAT_TO_STATE") ("Source_Code") ("STYLE") ("SUMMARY") ("TABLE_EXPORT_FILE") ("TABLE_EXPORT_FORMAT") ("TIME") ("Translation-Chinese") ("UNNUMBERED") ("URL") ("VISIBILITY")) nil nil nil nil nil)
  (let ((completion-ignore-case t) (default-prop (or (and (org-at-property-p) (match-string-no-properties 2)) org-last-set-property))) (org-completing-read (concat "Property" (if default-prop (concat " [" default-prop "]") "") ": ") (mapcar (function list) (org-buffer-property-keys nil t t)) nil nil nil nil default-prop))
  org-read-property-name()
  (or property (org-read-property-name))
  (let ((property (or property (org-read-property-name)))) (if (org--valid-property-p property) nil (user-error "Invalid property name: \"%s\"" property)) (let ((value (or value (org-read-property-value property))) (fn (cdr (assoc-string property org-properties-postprocess-alist t)))) (setq org-last-set-property property) (setq org-last-set-property-value (concat property ": " value)) (if fn (progn (setq value (funcall fn value)))) (if (equal (org-entry-get nil property) value) nil (org-entry-put nil property value))))
  org-set-property(nil nil)
  funcall-interactively(org-set-property nil nil)
  call-interactively(org-set-property nil nil)
  command-execute(org-set-property)
@brookter

This comment has been minimized.

Copy link

commented May 13, 2018

I'm also finding the same error message with Sparse Tree - Keywords (and also setting tags).

Debugger entered--Lisp error: (wrong-type-argument stringp ("NEXT"))
  string-lessp(("NEXT") ("TODO"))
  sort((("TODO")) string-lessp)
  cl-sort((("TODO")) string-lessp)
  ivy--reset-state(#s(ivy-state :prompt "Keyword (or KWD1|KWD2|...): " :collection (("TODO") ("NEXT") ("DONE") ("WAIT") ("HOLD") ("CCLD") ("PHONE") ("MEETING")) :predicate nil :require-match nil :initial-input nil :history nil :preselect nil :keymap nil :update-fn nil :sort t :frame #<frame todo.org 0x102877630> :window #<window 3 on todo.org> :buffer #<buffer todo.org> :text nil :action (1 ("o" identity "default") ("i" #f(compiled-function (x) #<bytecode 0x40cea9e9>) "insert") ("w" #f(compiled-function (x) #<bytecode 0x40cea9f9>) "copy")) :unwind nil :re-builder nil :matcher nil :dynamic-collection nil :display-transformer-fn nil :directory "/Users/david/Dropbox/Org/" :caller nil :current nil :def nil))
  ivy-read("Keyword (or KWD1|KWD2|...): " (("TODO") ("NEXT") ("DONE") ("WAIT") ("HOLD") ("CCLD") ("PHONE") ("MEETING")) :predicate nil :require-match nil :initial-input nil :preselect nil :def nil :history nil :keymap nil :sort t :dynamic-collection nil :caller nil)
  ivy-completing-read("Keyword (or KWD1|KWD2|...): " (("TODO") ("NEXT") ("DONE") ("WAIT") ("HOLD") ("CCLD") ("PHONE") ("MEETING")) nil nil nil nil nil nil)
  completing-read("Keyword (or KWD1|KWD2|...): " (("TODO") ("NEXT") ("DONE") ("WAIT") ("HOLD") ("CCLD") ("PHONE") ("MEETING")))
  org-show-todo-tree((4))
  org-sparse-tree(nil)

Thanks.

@basil-conto

This comment has been minimized.

Copy link
Collaborator

commented May 13, 2018

This issue is duplicated by #1567, where I initiated some discussion before seeing this issue; sorry.

basil-conto added a commit to basil-conto/swiper that referenced this issue May 13, 2018
ivy.el: Change default fallback sort function
(ivy-string<): New function.
(ivy-sort-functions-alist): Fall back on it.

Fixes abo-abo#1565, abo-abo#1567
@brookter

This comment has been minimized.

Copy link

commented May 13, 2018

Thanks very much for such a prompt fix. And thank you the work that goes into providing such helpful software in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.