On Tue, 3 Aug 2021, at 00:50, Vivien Kraus via General Guile related discussions wrote: > Dear guilers, > > I’m playing with syntaxes as first-class objects, and I notice that the > syntax source location is ambiguous: > > (syntax-case > (call-with-input-string "(a\r b)" read-syntax) () > ((a b) > (values (syntax-source #'a) (syntax-source #'b)))) > > => > > $1 = ((line . 0) (column . 1)) > $2 = ((line . 0) (column . 1)) > > This is obviously because of #\return.
Well, if anything this has confused the guile reader. It is probably a bug: I suspect it resets the column because it anticipates a windows-style newline. But are you often dealing with lonely "\r" in sources? Using either \n (unix-style) or \r\n (window-style) will give you the correct results.