all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Visuwesh <visuweshm@gmail.com>
Cc: 57969@debbugs.gnu.org
Subject: bug#57969: 29.0.50; `device-class' errors when NAME is nil
Date: Wed, 21 Sep 2022 19:54:07 +0800	[thread overview]
Message-ID: <87tu51eye8.fsf@yahoo.com> (raw)
In-Reply-To: <87r105tblc.fsf@gmail.com> (Visuwesh's message of "Wed, 21 Sep 2022 13:15:19 +0530")

Visuwesh <visuweshm@gmail.com> writes:

> According to the docstring of `device-class', nil is a valid value for
> the NAME argument however it errors out since `x-device-class' uses
> `downcase' without checking if NAME is non-nil.  Backtrace is below,
>
> Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
>   downcase(nil)
>   (let ((downcased-name (downcase name))) (cond ((string-match-p "XTEST" name) 'test) ((string= "Virtual core pointer" name) 'core-pointer) ((string= "Virtual core keyboard" name) 'core-keyboard) ((string-match-p "eraser" downcased-name) 'eraser) ((string-match-p " pad" downcased-name) 'pad) ((or (or (string-match-p "wacom" downcased-name) (string-match-p "pen" downcased-name)) (string-match-p "stylus" downcased-name)) 'pen) ((or (string-prefix-p "xwayland-touch:" name) (string-match-p "touchscreen" downcased-name)) 'touchscreen) ((or (string-match-p "trackpoint" downcased-name) (string-match-p "stick" downcased-name)) 'trackpoint) ((or (string-match-p "mouse" downcased-name) (string-match-p "optical" downcased-name) (string-match-p "pointer" downcased-name)) 'mouse) ((string-match-p "cursor" downcased-name) 'puck) ((or (string-match-p "keyboard" downcased-name) (string= name "USB USB Keykoard")) 'keyboard) ((string-match-p "button" downcased-name) 'power-button) ((string-match-p "touchpad" downcased-name) 'touchpad) ((or (string-match-p "midi" downcased-name) (string-match-p "piano" downcased-name)) 'piano) ((or (string-match-p "wskbd" downcased-name) (and (string-match-p "/dev" downcased-name) (string-match-p "kbd" downcased-name))) 'keyboard)))
>   x-device-class(nil)
>   device-class(#<frame *unsent mail to bug-gnu-emacs@gnu.org* emacs@astatine 0x562ae5daf070> nil)
>   eval((device-class last-event-frame nil) nil)
>   elisp--eval-last-sexp(nil)
>   eval-last-sexp(nil)
>   eros-eval-last-sexp(nil)
>   funcall-interactively(eros-eval-last-sexp nil)
>   call-interactively(eros-eval-last-sexp nil nil)
>   command-execute(eros-eval-last-sexp)

Should be fixed now, thanks.





  parent reply	other threads:[~2022-09-21 11:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21  7:45 bug#57969: 29.0.50; `device-class' errors when NAME is nil Visuwesh
2022-09-21 11:47 ` Lars Ingebrigtsen
2022-09-21 11:53   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-21 12:03     ` Lars Ingebrigtsen
2022-09-21 12:15       ` Visuwesh
2022-09-24 16:34         ` Lars Ingebrigtsen
2022-09-21 12:40       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-21 12:02   ` Visuwesh
2022-09-21 11:54 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-09-21 12:15   ` Visuwesh

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=87tu51eye8.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=57969@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=visuweshm@gmail.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.