From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Braun =?UTF-8?Q?G=C3=A1bor?= Newsgroups: gmane.emacs.bugs Subject: bug#34947: 26.1; cua-mode: wrong type argument when activating rectangle Date: Fri, 22 Mar 2019 16:11:44 +0100 Message-ID: <11259231.O9o76ZdvQC@gabor> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="244956"; mail-complaints-to="usenet@blaine.gmane.org" To: 34947@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 22 16:15:28 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h7LtH-0011W4-Ad for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Mar 2019 16:15:27 +0100 Original-Received: from localhost ([127.0.0.1]:58806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7LtG-0006ZQ-11 for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Mar 2019 11:15:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7Lr1-0004Yr-1P for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2019 11:13:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7Lqx-0001ns-Fg for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2019 11:13:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41054) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h7Lqx-0001nB-2K for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2019 11:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h7Lqw-0006ke-JR for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2019 11:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Braun =?UTF-8?Q?G=C3=A1bor?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Mar 2019 15:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34947 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155326753625894 (code B ref -1); Fri, 22 Mar 2019 15:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Mar 2019 15:12:16 +0000 Original-Received: from localhost ([127.0.0.1]:54597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h7LqB-0006ja-Qv for submit@debbugs.gnu.org; Fri, 22 Mar 2019 11:12:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h7Lq9-0006jM-7P for submit@debbugs.gnu.org; Fri, 22 Mar 2019 11:12:13 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:49984) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h7Lq3-0001E2-UJ for submit@debbugs.gnu.org; Fri, 22 Mar 2019 11:12:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7Lq0-0003ol-Hd for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2019 11:12:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7Lpw-000149-Kv for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2019 11:12:04 -0400 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:32801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h7Lpt-0000zu-Tg for bug-gnu-emacs@gnu.org; Fri, 22 Mar 2019 11:12:00 -0400 Original-Received: by mail-wm1-x32a.google.com with SMTP id z6so4536958wmi.0 for ; Fri, 22 Mar 2019 08:11:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=KogpmEMyKcJhjmghvOFX4rsJsWsndJg7GsDTsgB8vfE=; b=OjQ0WHQmv7uOb7U6FXeluc/MpkEV5T1zVhNaKRZD1zpH50LeoBmVdCxidLe8FtuVOP hoHCdaUJQqxzx+kxYPcJb1H5lVXGryyYbpsPKuD9Hru9yG5TV3SUN5s9FUy5IdXE7xOY DxUDTKsBqxvZB0ncBZqbnse8cfTSBcuJ2yTm7f5b1tAnugtgdjorvA7V1vkmVy5s3JyN wqs12YqkfcanxPDh6epZvCsp0lMtQ2gNB2E+YSd2wm6iaDvm/l9HCVzIp3F1Eyfl7kk0 FMHUbPh9EsIlgF33S4czx0qf/aIUioTV3WqD2ifXkjHPQnt4X+uxbWZaDkZfXCtoI6Z8 WLpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=KogpmEMyKcJhjmghvOFX4rsJsWsndJg7GsDTsgB8vfE=; b=iy9X73R6LwvcNSmXChhm9PN5lTU5Qy67GnPYH04bC4j5KsacYvmY0jjJoo7iObsDQi u8CIeODZIKvP0AAk0/iPjA9zo7VaSk22m9UMwpQLRWCg8/5sIFGtACO0JAhVD+B4tO8A GMUUcleqgppRTEq7i4Yy5/HbPM6QvGpb+xFhqWHKmUhIcWH98UPpBBFlSjk71AZ02zO9 Hwo+On9opgwsCNiNJnXtwEODxB/Lx4Z3AlysJm3CFKeNg5zbHaHt7CFb6bTM+sgDYI79 +XQeLcwofwURZzAltWkueQZ3OWWL3B2K4j/ivaEJnSFNi4efSKWZA8/FgbtTfikiksLV iD7Q== X-Gm-Message-State: APjAAAXV8tlbMfqJipUTgz/TplxrZtQDQEd9a60g4dvUpm9iuPBoSJha RdLUliOC1eR9qZi33alsjKgXAnJ9 X-Google-Smtp-Source: APXvYqwB10V0rqzg6Xp5qO6yEbxt/nLMuOzpdp0+MAPWkkNjXm+ArbbpIXRy9DUc+Iz6O6KLOjmlgQ== X-Received: by 2002:a7b:c743:: with SMTP id w3mr3003339wmk.75.1553267515446; Fri, 22 Mar 2019 08:11:55 -0700 (PDT) Original-Received: from gabor.localnet (254C559E.nat.pool.telekom.hu. [37.76.85.158]) by smtp.gmail.com with ESMTPSA id r1sm6854611wrt.37.2019.03.22.08.11.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Mar 2019 08:11:54 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156619 Archived-At: Hi, Ways to reproduce the bug: 1. Create the following .emacs file (it has been created by customizing some variables): =2D------------------ .emacs ---------------------- (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(cua-mode t nil (cua-base)) '(cua-rectangle-mark-key [f7]) '(custom-enabled-themes nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) =2D------------------------------------------------ Start Emacs by the command: emacs -Q -l .emacs Select some text, then press F7, to be explicit, press the following three keystrokes (copied from the help buffer shown by `C-h l'): [previous-line] [previous-line] [cua-toggle-rectangle-mark] The following error message appears at the bottom: Wrong type argument: commandp, cua-toggle-rectangle-mark 2.a) A second way to reproduce the bug: Start Emacs via emacs -Q -f cua-mode --eval "(custom-set-variables '(cua-rectangle-mark- key [(f7)]))" and press the same three keys as above: S-up S-up f7. The same error messae appears. 2.b) The problem does not happen when in the command starting Emacs, the last two arguments are swapped, then the rectangle is activated as=20 expected. emacs -Q --eval "(custom-set-variables '(cua-rectangle-mark-key=20 [(f7)]))" -f cua-mode Suggested patch: Autoload the command mentioned in the error message. Library cua-base.el binds cua-toggle-rectangle-mark to a key in the :set function in (defcustom cua-rectangle-mark-key ...), so it should ensure that the command is defined. =2D-- lisp/emulation/cua-base.el 2018-12-15 09:08:18 +0100 +++ lisp/emulation/cua-base.el 2019-03-09 09:08:18 +0100 @@ -592,6 +592,7 @@ (autoload 'cua-set-rectangle-mark "cua-rect" "Start rectangle at mouse click position." t nil) +(autoload 'cua-toggle-rectangle-mark "cua-rect" nil t) ;; Stub definitions until it is loaded (defvar cua--rectangle) The rest is not part of the patch. System information: In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.4) of 2019-02-03, modified by Debian built on zam904 Windowing system distributor 'The X.Org Foundation', version=20 11.0.12003000 System Description: Debian GNU/Linux buster/sid Recent messages: =46or information about GNU Emacs and the GNU system, type C-h C-a. Cua mode enabled Mark set command-execute: Wrong type argument: commandp, cua-toggle-rectangle- mark Type M-x delete-other-windows to delete the help window. Making completion list... Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site- lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/ usr/share/emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site- lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/ usr/share/emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fdebug-prefix-map=3D/build/emacs-26.1+1=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2 Important settings: value of $LANG: hu_HU.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: delete-selection-mode: t cua-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. =46eatures: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu cl-loaddefs cl-lib cus-start cus-load delsel cua-base elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 107807 14804) (symbols 48 21486 1) (miscs 40 66 204) (strings 32 30425 1350) (string-bytes 1 782154) (vectors 16 14931) (vector-slots 8 500152 12640) (floats 8 61 221) (intervals 56 284 0) (buffers 992 13)) Best wishes, G=C3=A1bor