all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs version and LISP interpretation
@ 2010-05-12  3:44 richard.christensen
  2010-05-12 14:58 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: richard.christensen @ 2010-05-12  3:44 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I was transferring a new mode and .emacs file from my PC to my work
linux box.  My PC is running 23.1.1 and my linux box is running
21.3.1.  Anyway I was getting the following error from the Linux
version "Invalid escape character syntax".  I was able to trace it
down to instances like (insert ?\s). My PC will insert a space and on
the linux box will give an error.  I did try (insert " ") and this
works just fine as well as (insert ?\t).  Why isn't \s recognized?  Is
this common problem from older versions?  What would be the best work-
around?  Have the current version of emacs installed?

Thanks.

Richard.


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

* Re: Emacs version and LISP interpretation
  2010-05-12  3:44 Emacs version and LISP interpretation richard.christensen
@ 2010-05-12 14:58 ` Stefan Monnier
       [not found]   ` <mailman.16.1291834103.24257.help-gnu-emacs@gnu.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2010-05-12 14:58 UTC (permalink / raw)
  To: help-gnu-emacs

> version "Invalid escape character syntax".  I was able to trace it
> down to instances like (insert ?\s). My PC will insert a space and on

?\s is a "new" syntax for the space character, introduced in Emacs-22.


        Stefan


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

* Re: Emacs version and LISP interpretation
       [not found]   ` <mailman.16.1291834103.24257.help-gnu-emacs@gnu.org>
@ 2010-12-10  3:54     ` Stefan Monnier
  2010-12-10  5:43       ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2010-12-10  3:54 UTC (permalink / raw)
  To: help-gnu-emacs

> So the answer is that you need to change (insert ?\s) to (insert ?\s ).
> That is, leave at least one space after the \s.

No, ?\s is new, so ?\s won't work even if you add a space after it.
The old syntax is ?\  (where the space after the backslash is important).

> I've seen more than one library broken this way (broken for older Emacs
> versions).

We (Emacs maintainers) only changed the code of the files distributed
along with Emacs, so we don't get to introduce such bugs directly.
Of course, some of those changes are then fed back upstream and the
upstream maintainer may either fail to notice the incompatibility
introduced, or consider it to be minor.


        Stefan


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

* RE: Emacs version and LISP interpretation
  2010-12-10  3:54     ` Stefan Monnier
@ 2010-12-10  5:43       ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2010-12-10  5:43 UTC (permalink / raw)
  To: 'Stefan Monnier', help-gnu-emacs

> > So the answer is that you need to change (insert ?\s) to 
> > (insert ?\s ).  That is, leave at least one space after the \s.
> 
> No, ?\s is new, so ?\s won't work even if you add a space after it.
> The old syntax is ?\  (where the space after the backslash is 
> important).

Right, my bad; good catch.  What you say is what I meant to say:
change (insert ?\s) to (insert ?\ ), where, as you point out, the space is
important.

(I was no doubt confusing the SPC char syntax with the regexp syntax for
matching a whitespace char, which is `\s ' or `\s-'.)




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

end of thread, other threads:[~2010-12-10  5:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-12  3:44 Emacs version and LISP interpretation richard.christensen
2010-05-12 14:58 ` Stefan Monnier
     [not found]   ` <mailman.16.1291834103.24257.help-gnu-emacs@gnu.org>
2010-12-10  3:54     ` Stefan Monnier
2010-12-10  5:43       ` Drew Adams

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.