* bug#4400: 23.1.50; char-syntax @ 2009-09-11 6:38 ` Andreas Roehler 2009-09-11 10:15 ` Juanma Barranquero ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Andreas Roehler @ 2009-09-11 6:38 UTC (permalink / raw) To: emacs-pretest-bug Emacs -Q (char-syntax (char-after))a --> 119 which seems not what's told in docu: Return the syntax code of CHARACTER, described by a character. For example, if CHARACTER is a word constituent, the character `w' is returned. Thanks all! Andreas Röhler -- https://code.launchpad.net/s-x-emacs-werkstatt/ ;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of 2009-07-25 Windowing system distributor `The X.Org Foundation', version 11.0.70200000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: de_DE.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ( c h a r - s y n t a x SPC ( c h a r - a f t e r ) ) a <left> C-x C-e <down> C-j q - - > SPC 1 1 9 <return> <return> M-x r e p o r t - e m a c - b <backspace> <backspace> s - b u <tab> <return> Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. 119 Entering debugger... Back to top level. Load-path shadows: None found. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4400: 23.1.50; char-syntax 2009-09-11 6:38 ` bug#4400: 23.1.50; char-syntax Andreas Roehler @ 2009-09-11 10:15 ` Juanma Barranquero 2009-09-11 11:04 ` Kenichi Handa 2009-09-18 23:50 ` bug#4400: marked as done (23.1.50; char-syntax) Emacs bug Tracking System 2 siblings, 0 replies; 7+ messages in thread From: Juanma Barranquero @ 2009-09-11 10:15 UTC (permalink / raw) To: Andreas Roehler; +Cc: 4400 On Fri, Sep 11, 2009 at 08:38, Andreas Roehler <andreas.roehler@online.de> wrote: > > Emacs -Q > > (char-syntax (char-after))a > --> 119 > > which seems not what's told in docu: > > Return the syntax code of CHARACTER, described by a character. > For example, if CHARACTER is a word constituent, > the character `w' is returned. But 119 is `w'... ELISP> (char-syntax ?a) 119 ELISP> ?w 119 Perhaps you were expecting `char-syntax' to return a string with the syntax code, i.e., "w"? Juanma ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4400: 23.1.50; char-syntax 2009-09-11 6:38 ` bug#4400: 23.1.50; char-syntax Andreas Roehler 2009-09-11 10:15 ` Juanma Barranquero @ 2009-09-11 11:04 ` Kenichi Handa 2009-09-12 8:31 ` Andreas Röhler 2009-09-18 23:50 ` bug#4400: marked as done (23.1.50; char-syntax) Emacs bug Tracking System 2 siblings, 1 reply; 7+ messages in thread From: Kenichi Handa @ 2009-09-11 11:04 UTC (permalink / raw) To: Andreas Roehler, 4400; +Cc: emacs-pretest-bug In article <4AA9F057.5080507@online.de>, Andreas Roehler <andreas.roehler@online.de> writes: > Emacs -Q > (char-syntax (char-after))a > --> 119 > which seems not what's told in docu: > Return the syntax code of CHARACTER, described by a character. > For example, if CHARACTER is a word constituent, > the character `w' is returned. The character `w' == 119. In Emacs, a character is represented by an integer object (of valid character-code range). --- Kenichi Handa handa@m17n.org ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4400: 23.1.50; char-syntax 2009-09-11 11:04 ` Kenichi Handa @ 2009-09-12 8:31 ` Andreas Röhler 2009-09-12 15:53 ` Eli Zaretskii 0 siblings, 1 reply; 7+ messages in thread From: Andreas Röhler @ 2009-09-12 8:31 UTC (permalink / raw) To: Kenichi Handa; +Cc: Juanma Barranquero, 4400 Kenichi Handa wrote: > In article <4AA9F057.5080507@online.de>, Andreas Roehler <andreas.roehler@online.de> writes: > > >> Emacs -Q >> > > >> (char-syntax (char-after))a >> --> 119 >> > > >> which seems not what's told in docu: >> > > >> Return the syntax code of CHARACTER, described by a character. >> For example, if CHARACTER is a word constituent, >> the character `w' is returned. >> > > The character `w' == 119. > > In Emacs, a character is represented by an integer object > (of valid character-code range). > > --- > Kenichi Handa > handa@m17n.org > > > > > Thanks. Seems I have difficulties with understanding. What if docu would say: "For example, if CHARACTER is a word constituent, `119' is returned." or maybe still better "For example, if CHARACTER is a word constituent, numeric value of character `w' is returned, which is `119' in Emacs internal representation." BTW: Can't Emacs have more internal representations of `w' with Unicode? Andreas ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4400: 23.1.50; char-syntax 2009-09-12 8:31 ` Andreas Röhler @ 2009-09-12 15:53 ` Eli Zaretskii 2009-09-12 17:16 ` martin rudalics 0 siblings, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2009-09-12 15:53 UTC (permalink / raw) To: Andreas Röhler, 4400; +Cc: lekktu > Date: Sat, 12 Sep 2009 10:31:06 +0200 > From: Andreas =?UTF-8?Q?R=C3=B6hler?= <andreas.roehler@easy-emacs.de> > Cc: Juanma Barranquero <lekktu@gmail.com>, 4400@emacsbugs.donarmstrong.com > > > In Emacs, a character is represented by an integer object > > (of valid character-code range). > > What if docu would say: > > "For example, if CHARACTER is a word constituent, `119' is returned." > > or maybe still better > > "For example, if CHARACTER is a word constituent, numeric value of character `w' is returned, which is `119' in Emacs internal representation." In GNU Emacs, characters and integers are one and the same. So the text you suggest would make things even more confusing. A Lisp code that needs to test against character syntax class should use ?w etc. ?w is another way to say 119. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4400: 23.1.50; char-syntax 2009-09-12 15:53 ` Eli Zaretskii @ 2009-09-12 17:16 ` martin rudalics 0 siblings, 0 replies; 7+ messages in thread From: martin rudalics @ 2009-09-12 17:16 UTC (permalink / raw) To: Eli Zaretskii, 4400; +Cc: lekktu > In GNU Emacs, characters and integers are one and the same. So the > text you suggest would make things even more confusing. Admittedly, the Elisp manual seems more aware of Andreas' problem and does "use `string' to make it easier to see the character returned by `char-syntax'". > A Lisp code that needs to test against character syntax class should > use ?w etc. ?w is another way to say 119. We could pretend that a person who doesn't know that should not use `char-syntax'. But we could also be more helpful, for example, by providing a link to the manual. martin ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4400: marked as done (23.1.50; char-syntax) 2009-09-11 6:38 ` bug#4400: 23.1.50; char-syntax Andreas Roehler 2009-09-11 10:15 ` Juanma Barranquero 2009-09-11 11:04 ` Kenichi Handa @ 2009-09-18 23:50 ` Emacs bug Tracking System 2 siblings, 0 replies; 7+ messages in thread From: Emacs bug Tracking System @ 2009-09-18 23:50 UTC (permalink / raw) To: Chong Yidong [-- Attachment #1: Type: text/plain, Size: 840 bytes --] Your message dated Fri, 18 Sep 2009 19:42:22 -0400 with message-id <87pr9nom5d.fsf@stupidchicken.com> and subject line Re: bug#4400: 23.1.50; char-syntax has caused the Emacs bug report #4400, regarding 23.1.50; char-syntax to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) -- 4400: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4400 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 3835 bytes --] From: Andreas Roehler <andreas.roehler@online.de> To: emacs-pretest-bug@gnu.org Subject: 23.1.50; char-syntax Date: Fri, 11 Sep 2009 08:38:15 +0200 Message-ID: <4AA9F057.5080507@online.de> Emacs -Q (char-syntax (char-after))a --> 119 which seems not what's told in docu: Return the syntax code of CHARACTER, described by a character. For example, if CHARACTER is a word constituent, the character `w' is returned. Thanks all! Andreas Röhler -- https://code.launchpad.net/s-x-emacs-werkstatt/ ;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of 2009-07-25 Windowing system distributor `The X.Org Foundation', version 11.0.70200000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: de_DE.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ( c h a r - s y n t a x SPC ( c h a r - a f t e r ) ) a <left> C-x C-e <down> C-j q - - > SPC 1 1 9 <return> <return> M-x r e p o r t - e m a c - b <backspace> <backspace> s - b u <tab> <return> Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. 119 Entering debugger... Back to top level. Load-path shadows: None found. [-- Attachment #3: Type: message/rfc822, Size: 2219 bytes --] From: Chong Yidong <cyd@stupidchicken.com> To: martin rudalics <rudalics@gmx.at> Cc: 4400-done@emacsbugs.donarmstrong.com Subject: Re: bug#4400: 23.1.50; char-syntax Date: Fri, 18 Sep 2009 19:42:22 -0400 Message-ID: <87pr9nom5d.fsf@stupidchicken.com> > > In GNU Emacs, characters and integers are one and the same. So the > > text you suggest would make things even more confusing. > > Admittedly, the Elisp manual seems more aware of Andreas' problem and > does "use `string' to make it easier to see the character returned by > `char-syntax'". > > > A Lisp code that needs to test against character syntax class should > > use ?w etc. ?w is another way to say 119. > > We could pretend that a person who doesn't know that should not use > `char-syntax'. But we could also be more helpful, for example, by > providing a link to the manual. I don't think we need to link to the manual for every function that returns a character. The docstring for char-syntax already states that it returns the *character* `w' for a word constituent. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-09-18 23:50 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <87pr9nom5d.fsf@stupidchicken.com> 2009-09-11 6:38 ` bug#4400: 23.1.50; char-syntax Andreas Roehler 2009-09-11 10:15 ` Juanma Barranquero 2009-09-11 11:04 ` Kenichi Handa 2009-09-12 8:31 ` Andreas Röhler 2009-09-12 15:53 ` Eli Zaretskii 2009-09-12 17:16 ` martin rudalics 2009-09-18 23:50 ` bug#4400: marked as done (23.1.50; char-syntax) Emacs bug Tracking System
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).