emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#10258: closed (compilation-error-regexp-alist just


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10258: closed (compilation-error-regexp-alist just assumes columns not characters)
Date: Wed, 28 Dec 2011 10:22:03 +0000

Your message dated Tue, 27 Dec 2011 18:49:07 -0500
with message-id <address@hidden>
and subject line Re: bug#10258: compilation-error-regexp-alist just assumes 
columns not characters
has caused the debbugs.gnu.org bug report #10258,
regarding compilation-error-regexp-alist just assumes columns not characters
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10258: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10258
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: compilation-error-regexp-alist just assumes columns not characters Date: Sat, 10 Dec 2011 04:18:12 +0800
Gentlemen, why does *compilation* say

  basex -b y=3 TaiwanAMFMSW.xq
  Stopped at line 57, column 29 in 
/home/jidanni/millerliu/xquery/TaiwanAMFMSW.xq:
  [XPST0003] Expecting "return", found "r".

But the cursor upon next-error ends up at

        case "TaiwanAMFMSW_by_band" retrun let $K:= "AM/FM/SW" return ()
                            ^      ^
                            A, not B       if those blanks at front were a TAB.

Well that is because on
   (describe-variable (quote compilation-error-regexp-alist))
there is nary a mention of what to do when the compiler making the
message is counting characters (TAB=1) and emacs is thinking it is
counting columns (TAB=8, etc.).

All we see is
  COLUMN can also be of the form (COLUMN . END-COLUMN) meaning a range of
  columns starting on LINE and ending on END-LINE, if that matched.

There is no way to communicate to emacs that this certain compiler does
not know how many columns a TAB equals in emacs, and is just reporting a
character count from the last newline.

So one is forced to untabify ones source files!

So it seems that compilation-error-regexp-alist needs an extra parameter
to tell if we are just counting characters or actually counting columns.

P.S., guess what happens when there are wide characters involved,

        case "補補補TaiwanAMFMSW_by_band" retrun let $K:= "AM/FM/SW" return ()

you guessed it!

How can I tell emacs in
   (add-to-list 'compilation-error-regexp-alist-alist
   '(basex "^Stopped at line \\([0-9]+\\), column \\([0-9]+\\) in \\(.*?\\):$" 
3 1 2))
     (add-to-list 'compilation-error-regexp-alist 'basex)
that "column" means "char"?



--- End Message ---
--- Begin Message --- Subject: Re: bug#10258: compilation-error-regexp-alist just assumes columns not characters Date: Tue, 27 Dec 2011 18:49:07 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)
SM> Better not call make-variable-buffer-local except...
> OK thanks. Maybe
> (info "(emacs) Locals")
> more precisely,
> (Info-menu "Emacs (emacs-snapshot)" nil)
> (Info-index "make-variable-buffer-local")
> should warn/hint about that, just like
> (describe-function (quote make-variable-buffer-local))
> already does.

Indeed.  I've installed the patch below,


        Stefan


=== modified file 'doc/lispref/variables.texi'
--- doc/lispref/variables.texi  2011-12-23 13:14:12 +0000
+++ doc/lispref/variables.texi  2011-12-27 23:42:22 +0000
@@ -1352,6 +1352,8 @@
 This function marks @var{variable} (a symbol) automatically
 buffer-local, so that any subsequent attempt to set it will make it
 local to the current buffer at the time.
+Contrary to @code{make-local-variable} with which it is often confused, this
+cannot be undone, and affects the behavior of the variable in all buffers.
 
 A peculiar wrinkle of this feature is that binding the variable (with
 @code{let} or other binding constructs) does not create a buffer-local



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]