emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug: org-sort-list, `f'
@ 2011-05-26  5:38 Le Wang
  2011-05-26 15:51 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Le Wang @ 2011-05-26  5:38 UTC (permalink / raw)
  To: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

patch fixes sorting lists with custom getkey-func.  Bug was trying to
evaluate getkey-func while setting it, so it was always nil.

-- 
Le

[-- Attachment #2: org-list.el.diff --]
[-- Type: application/octet-stream, Size: 583 bytes --]

diff --git a/lisp/org-list.el b/lisp/org-list.el
index 38a62e2..5df25d7 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -2559,8 +2559,10 @@ compare entries."
 	    (read-char-exclusive)))
 	 (getkey-func (and (= (downcase sorting-type) ?f)
 			   (org-icompleting-read "Sort using function: "
-						 obarray 'fboundp t nil nil)
-			   (intern getkey-func))))
+						 obarray 'fboundp t nil nil))))
+
+    (when (stringp getkey-func)
+      (setq getkey-func (intern getkey-func)))
     (message "Sorting items...")
     (save-restriction
       (narrow-to-region start end)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: bug: org-sort-list, `f'
  2011-05-26  5:38 bug: org-sort-list, `f' Le Wang
@ 2011-05-26 15:51 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2011-05-26 15:51 UTC (permalink / raw)
  To: Le Wang; +Cc: Orgmode Mailing List

Hello,

Le Wang <l26wang@gmail.com> writes:

> patch fixes sorting lists with custom getkey-func.  Bug was trying to
> evaluate getkey-func while setting it, so it was always nil.

Indeed !

I've applied a slightly modified version of your patch. Thank you for
reporting this and providing the patch.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-26 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26  5:38 bug: org-sort-list, `f' Le Wang
2011-05-26 15:51 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).