unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18337: 24.4.50; apropos fails on "scroll"
@ 2014-08-27 13:50 Detlev Zundel
  2014-08-27 15:46 ` Drew Adams
  0 siblings, 1 reply; 8+ messages in thread
From: Detlev Zundel @ 2014-08-27 13:50 UTC (permalink / raw)
  To: 18337


Simply call M-x apropos and enter "scroll".  This produces this error:

mapconcat: Wrong type argument: symbolp, 0

This error does not happen on all strings, but I don't see a clear
picture here.



In GNU Emacs 24.4.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
 of 2014-08-27 on deepthought
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
System Description:	Debian GNU/Linux unstable (sid)

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t

Recent input:
<escape> x a p r o p o s <return> s c r o l l <return> 
<escape> x r e p o r t - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
mapconcat: Wrong type argument: symbolp, 0

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils apropos time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer 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 make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 79506 9305)
 (symbols 48 18257 0)
 (miscs 40 103 114)
 (strings 32 10953 4671)
 (string-bytes 1 299349)
 (vectors 16 9564)
 (vector-slots 8 391713 10077)
 (floats 8 70 63)
 (intervals 56 317 181)
 (buffers 976 13)
 (heap 1024 43147 862))

-- 
Practice random senselessness and act kind of beautiful.





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

* bug#18337: 24.4.50; apropos fails on "scroll"
  2014-08-27 13:50 bug#18337: 24.4.50; apropos fails on "scroll" Detlev Zundel
@ 2014-08-27 15:46 ` Drew Adams
  2014-08-28  9:04   ` Detlev Zundel
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2014-08-27 15:46 UTC (permalink / raw)
  To: Detlev Zundel, 18337

> Simply call M-x apropos and enter "scroll".  This produces this
> error:
> 
> mapconcat: Wrong type argument: symbolp, 0

FWIW, I cannot repro it with this build:

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-06-28 on ODIEONE
Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''





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

* bug#18337: 24.4.50; apropos fails on "scroll"
  2014-08-27 15:46 ` Drew Adams
@ 2014-08-28  9:04   ` Detlev Zundel
  2014-08-28 13:17     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Detlev Zundel @ 2014-08-28  9:04 UTC (permalink / raw)
  To: Drew Adams; +Cc: 18337

Hi Drew,

thanks for looking into this.

>> Simply call M-x apropos and enter "scroll".  This produces this
>> error:
>> 
>> mapconcat: Wrong type argument: symbolp, 0
>
> FWIW, I cannot repro it with this build:
>
> In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
>  of 2014-06-28 on ODIEONE
> Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso
> Windowing system distributor `Microsoft Corp.', version 6.1.7601
> Configured using:
>  `configure --prefix=/c/Devel/emacs/snapshot/trunk
>  --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
>  LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
>  -Ic:/Devel/emacs/include''

Maybe I should add that this is a build from a
git://git.savannah.gnu.org/emacs.git - the last commit in there is:

  commit c4d022dad4d77869e4c8b8cefd4281fd0f3bd41a
  Author: Michael Albinus <michael.albinus@gmx.de>
  Date:   Wed Aug 27 13:22:37 2014 +0200
  
      * lisp.h (str_collate):
      * sysdep.c (str_collate): Return int.
      (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
  

But back to the issue.  I debuged this a little bit and found this to be
the problem:

(when (setq properties (symbol-plist 'vertical-scroll-bar))
  (setq doc (list (car properties)))
  (while (setq properties (cdr (cdr properties)))
    (setq doc (cons (car properties) doc)))
  (nreverse doc))

=> (0 event-symbol-element-mask event-symbol-elements modifier-cache variable-documentation)
  
Applying 'symbol-name to that list then yields the error.  Why
vertical-scroll-bar has this plist is beyond me however.  Does this ring
a bell to someone?

Thanks
  Detlev

-- 
Applied mathematicians do it by computer simulation.





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

* bug#18337: 24.4.50; apropos fails on "scroll"
  2014-08-28  9:04   ` Detlev Zundel
@ 2014-08-28 13:17     ` Stefan Monnier
  2014-08-29 13:13       ` Detlev Zundel
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2014-08-28 13:17 UTC (permalink / raw)
  To: Detlev Zundel; +Cc: 18337

> (when (setq properties (symbol-plist 'vertical-scroll-bar))
>   (setq doc (list (car properties)))
>   (while (setq properties (cdr (cdr properties)))
>     (setq doc (cons (car properties) doc)))
>   (nreverse doc))

> => (0 event-symbol-element-mask event-symbol-elements modifier-cache variable-documentation)
  
> Applying 'symbol-name to that list then yields the error.

Note that, while convention is to use a symbol for property names, that
is not the only valid choice.  0 is a valid property name (tho an odd
one, arguably).

So while this 0 should probably be changed the mapconcat code that burps
on it should probably be changed not to assume that only symbols will
be used as property names.


        Stefan





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

* bug#18337: 24.4.50; apropos fails on "scroll"
  2014-08-28 13:17     ` Stefan Monnier
@ 2014-08-29 13:13       ` Detlev Zundel
  2014-09-11  8:42         ` Detlev Zundel
  0 siblings, 1 reply; 8+ messages in thread
From: Detlev Zundel @ 2014-08-29 13:13 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Dmitry Antipov, 18337

Hi Stefan,

[added Dmitry on CC as the changelog seems to make a connection to the
problem at hand]

>> (when (setq properties (symbol-plist 'vertical-scroll-bar))
>>   (setq doc (list (car properties)))
>>   (while (setq properties (cdr (cdr properties)))
>>     (setq doc (cons (car properties) doc)))
>>   (nreverse doc))
>
>> => (0 event-symbol-element-mask event-symbol-elements modifier-cache variable-documentation)
>   
>> Applying 'symbol-name to that list then yields the error.
>
> Note that, while convention is to use a symbol for property names, that
> is not the only valid choice.  0 is a valid property name (tho an odd
> one, arguably).

I think in this case it actually caught an error though.

> So while this 0 should probably be changed the mapconcat code that burps
> on it should probably be changed not to assume that only symbols will
> be used as property names.

Looking deeper, it turns out that the 0 results from this:

buffer.c:5473

  DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar");
  Fput (Qvertical_scroll_bar, Qchoice, list4 (Qnil, Qt, Qleft, Qright));
  DEFSYM (Qhorizontal_scroll_bar, "horizontal-scroll-bar");

  DEFSYM (Qfraction, "fraction");
  Fput (Qfraction, Qrange, Fcons (make_float (0.0), make_float (1.0)));

  DEFSYM (Qoverwrite_mode, "overwrite-mode");
  Fput (Qoverwrite_mode, Qchoice,
	list3 (Qnil, intern ("overwrite-mode-textual"),
	       intern ("overwrite-mode-binary")));

As far as I can tell, it should thus really be 'choice.  Actually both
vertical-scroll-bar and overwrite-mode have the problem:

(symbol-plist 'vertical-scroll-bar)

=> (0 (nil t left right) event-symbol-element-mask (vertical-scroll-bar 0) event-symbol-elements (vertical-scroll-bar) modifier-cache ((0 . vertical-scroll-bar)) variable-documentation 374228)

(symbol-plist 'overwrite-mode)

=> (0 (nil overwrite-mode-textual overwrite-mode-binary) event-symbol-element-mask (overwrite-mode 0) event-symbol-elements (overwrite-mode) modifier-cache ((0 . overwrite-mode)) :minor-mode-function binary-overwrite-mode variable-documentation 370277)

The changelog mentions this

2014-07-16  Dmitry Antipov  <dmantipov@yandex.ru>

	More precise control over values of some buffer-local variables.
	* keyboard.c (Qvertical_scroll_bar):
	* frame.c (Qleft, Qright): Move to ...
	* buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
	* buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
	(syms_of_buffer): DEFSYM all of the above, attach special properties.
	Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
	vertical-scroll-bar, scroll-up-aggressively
	and scroll-down-aggressively.

Dmitry, do you know why the construct for choice fails?

Thanks
  Detlev
  
-- 
We can forgive a man for making a useful thing as long as he does not
admire it.  The only excuse  for making  a useless  thing is that one
admires it intensely.
                                    --- Oscar Wilde





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

* bug#18337: 24.4.50; apropos fails on "scroll"
  2014-08-29 13:13       ` Detlev Zundel
@ 2014-09-11  8:42         ` Detlev Zundel
  2014-09-12 11:16           ` Dmitry Antipov
  0 siblings, 1 reply; 8+ messages in thread
From: Detlev Zundel @ 2014-09-11  8:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Dmitry Antipov, 18337

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

Hi,

> Hi Stefan,
>
> [added Dmitry on CC as the changelog seems to make a connection to the
> problem at hand]
>
>>> (when (setq properties (symbol-plist 'vertical-scroll-bar))
>>>   (setq doc (list (car properties)))
>>>   (while (setq properties (cdr (cdr properties)))
>>>     (setq doc (cons (car properties) doc)))
>>>   (nreverse doc))
>>
>>> => (0 event-symbol-element-mask event-symbol-elements
>>> modifier-cache variable-documentation)
>>   
>>> Applying 'symbol-name to that list then yields the error.
>>
>> Note that, while convention is to use a symbol for property names, that
>> is not the only valid choice.  0 is a valid property name (tho an odd
>> one, arguably).
>
> I think in this case it actually caught an error though.
>
>> So while this 0 should probably be changed the mapconcat code that burps
>> on it should probably be changed not to assume that only symbols will
>> be used as property names.
>
> Looking deeper, it turns out that the 0 results from this:
>
> buffer.c:5473
>
>   DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar");
>   Fput (Qvertical_scroll_bar, Qchoice, list4 (Qnil, Qt, Qleft, Qright));
>   DEFSYM (Qhorizontal_scroll_bar, "horizontal-scroll-bar");
>
>   DEFSYM (Qfraction, "fraction");
>   Fput (Qfraction, Qrange, Fcons (make_float (0.0), make_float (1.0)));
>
>   DEFSYM (Qoverwrite_mode, "overwrite-mode");
>   Fput (Qoverwrite_mode, Qchoice,
> 	list3 (Qnil, intern ("overwrite-mode-textual"),
> 	       intern ("overwrite-mode-binary")));
>
> As far as I can tell, it should thus really be 'choice.  Actually both
> vertical-scroll-bar and overwrite-mode have the problem:
>
> (symbol-plist 'vertical-scroll-bar)
>
> => (0 (nil t left right) event-symbol-element-mask (vertical-scroll-bar 0) event-symbol-elements (vertical-scroll-bar) modifier-cache ((0 . vertical-scroll-bar)) variable-documentation 374228)
>
> (symbol-plist 'overwrite-mode)
>
> => (0 (nil overwrite-mode-textual overwrite-mode-binary) event-symbol-element-mask (overwrite-mode 0) event-symbol-elements (overwrite-mode) modifier-cache ((0 . overwrite-mode)) :minor-mode-function binary-overwrite-mode variable-documentation 370277)
>
> The changelog mentions this
>
> 2014-07-16  Dmitry Antipov  <dmantipov@yandex.ru>
>
> 	More precise control over values of some buffer-local variables.
> 	* keyboard.c (Qvertical_scroll_bar):
> 	* frame.c (Qleft, Qright): Move to ...
> 	* buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
> 	* buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
> 	(syms_of_buffer): DEFSYM all of the above, attach special properties.
> 	Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
> 	vertical-scroll-bar, scroll-up-aggressively
> 	and scroll-down-aggressively.
>
> Dmitry, do you know why the construct for choice fails?

The attached patch fixes the problem for me as the plist now looks like
this:

(symbol-plist 'vertical-scroll-bar)
=> (choice (nil t left right) event-symbol-element-mask (vertical-scroll-bar 0) event-symbol-elements (vertical-scroll-bar) modifier-cache ((0 . vertical-scroll-bar)) variable-documentation 374812)

Cheers
  Detlev
  
-- 
The 82558 B-step and later generation devices do not maintain a link
in D3 if PME is disabled or if the device does not have power.
                                        -- Intel documentation

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-src-buffer.c-syms_of_buffer-Add-forgotten-Qchoice-DE.patch --]
[-- Type: text/x-diff, Size: 1015 bytes --]

From 5294eb80883abc3fb06805f972693664b294079f Mon Sep 17 00:00:00 2001
From: Detlev Zundel <dzu@member.fsf.org>
Date: Thu, 11 Sep 2014 10:37:54 +0200
Subject: [PATCH] * src/buffer.c (syms_of_buffer): Add forgotten Qchoice DEFSYM

---
 src/ChangeLog | 4 ++++
 src/buffer.c  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/ChangeLog b/src/ChangeLog
index e20072d..393fbe7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-09-11  Detlev Zundel  <dzu@member.fsf.org>
+
+	* buffer.c (syms_of_buffer): Add forgotten Qchoice DEFSYM
+
 2014-09-03  Martin Rudalics  <rudalics@gmx.at>
 
 	* buffer.c (scroll-bar-height): Fix typo in doc-string.
diff --git a/src/buffer.c b/src/buffer.c
index 45e614f..dd1e205 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5386,6 +5386,7 @@ syms_of_buffer (void)
   staticpro (&Qpermanent_local);
   staticpro (&Qkill_buffer_hook);
 
+  DEFSYM (Qchoice, "choice");
   DEFSYM (Qleft, "left");
   DEFSYM (Qright, "right");
   DEFSYM (Qrange, "range");
-- 
2.1.0


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

* bug#18337: 24.4.50; apropos fails on "scroll"
  2014-09-11  8:42         ` Detlev Zundel
@ 2014-09-12 11:16           ` Dmitry Antipov
  2014-09-12 12:33             ` Detlev Zundel
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Antipov @ 2014-09-12 11:16 UTC (permalink / raw)
  To: Detlev Zundel; +Cc: 18337

On 09/11/2014 12:42 PM, Detlev Zundel wrote:

> * buffer.c (syms_of_buffer): Add forgotten Qchoice DEFSYM

Thanks, installed as r117868.

Dmitry






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

* bug#18337: 24.4.50; apropos fails on "scroll"
  2014-09-12 11:16           ` Dmitry Antipov
@ 2014-09-12 12:33             ` Detlev Zundel
  0 siblings, 0 replies; 8+ messages in thread
From: Detlev Zundel @ 2014-09-12 12:33 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: 18337

Hi Dmitry,

> On 09/11/2014 12:42 PM, Detlev Zundel wrote:
>
>> * buffer.c (syms_of_buffer): Add forgotten Qchoice DEFSYM
>
> Thanks, installed as r117868.

Thanks!
  Detlev

-- 
I haven't lost my mind, I know exactly where I left it.





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

end of thread, other threads:[~2014-09-12 12:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27 13:50 bug#18337: 24.4.50; apropos fails on "scroll" Detlev Zundel
2014-08-27 15:46 ` Drew Adams
2014-08-28  9:04   ` Detlev Zundel
2014-08-28 13:17     ` Stefan Monnier
2014-08-29 13:13       ` Detlev Zundel
2014-09-11  8:42         ` Detlev Zundel
2014-09-12 11:16           ` Dmitry Antipov
2014-09-12 12:33             ` Detlev Zundel

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

	https://git.savannah.gnu.org/cgit/emacs.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).