all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: tsuucat via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 40600@debbugs.gnu.org
Subject: bug#40600: [PATCH] 27.0.90; M-x strokes-list-strokes error
Date: Wed, 15 Apr 2020 02:15:02 +0900	[thread overview]
Message-ID: <763AC822-39EF-4BC2-85C2-8A473EC6CD8E@icloud.com> (raw)
In-Reply-To: <851roqypvs.fsf@gmail.com>

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

> Why use prin1-to-string?

That’s simply because I imitate the code in strokes-list-strokes function.

> Actually, since string-lessp accepts symbols, an easier fix would be to
> just drop the calls to symbol-name.


Thanks for the advice! I made another patch and checked this  works well.

--
tsuucat

[-- Attachment #2: 0001-Fix-comparing-command-names-in-strokes.el-bug-40600.patch --]
[-- Type: application/octet-stream, Size: 1032 bytes --]

From af31735e07528973392cb1e163f9f9e1682951e4 Mon Sep 17 00:00:00 2001
From: Masahiro Nakamura <tsuucat@icloud.com>
Date: Tue, 14 Apr 2020 22:37:17 +0900
Subject: [PATCH] Fix comparing command names in strokes.el (bug#40600)

* lisp/strokes.el (strokes-alphabetic-lessp): Simply call string-lessp
because the cdr of the argument may be string.
---
 lisp/strokes.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/strokes.el b/lisp/strokes.el
index 7a887445..e511a63f 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -1373,9 +1373,7 @@ strokes-list-strokes
 
 (defun strokes-alphabetic-lessp (stroke1 stroke2)
   "Return t if STROKE1's command name precedes STROKE2's in lexicographic order."
-  (let ((command-name-1 (symbol-name (cdr stroke1)))
-	(command-name-2 (symbol-name (cdr stroke2))))
-    (string-lessp command-name-1 command-name-2)))
+  (string-lessp (cdr stroke1) (cdr stroke2)))
 
 (defvar strokes-mode-map
   (let ((map (make-sparse-keymap)))
-- 
2.21.0


  reply	other threads:[~2020-04-14 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13 15:51 bug#40600: 27.0.90; M-x strokes-list-strokes error tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found] ` <handler.40600.B.158679308724681.ack@debbugs.gnu.org>
2020-04-14 14:38   ` bug#40600: [PATCH] " tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-04-14 16:48     ` Noam Postavsky
2020-04-14 17:15       ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2020-04-17  0:49         ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=763AC822-39EF-4BC2-85C2-8A473EC6CD8E@icloud.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=40600@debbugs.gnu.org \
    --cc=npostavs@gmail.com \
    --cc=tsuucat@icloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.