GNU bug report logs - #19178
11.88; 11.88 Xemacs 11.88 problem with env and labels

Previous Next

Package: auctex;

Reported by: Uwe Brauer <oub <at> mat.ucm.es>

Date: Tue, 25 Nov 2014 14:13:01 UTC

Severity: normal

Merged with 19199

Found in version 11.88

Done: Mosè Giordano <mose <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19178 in the body.
You can then email your comments to 19178 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Tue, 25 Nov 2014 14:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Uwe Brauer <oub <at> mat.ucm.es>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Tue, 25 Nov 2014 14:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: bug-auctex <at> gnu.org
Subject: 11.88; 11.88 Xemacs 11.88 problem with env and labels
Date: Tue, 25 Nov 2014 15:11:42 +0100
[Message part 1 (text/plain, inline)]

Hello

I used for years the following function 

(defun LaTeX-rem-insert (environment)	;Version:1.20
  (if (y-or-n-p
	   (format "Do you want a title "))
	  (let ((title (read-input " Title: ")))
		(LaTeX-insert-environment "rem" (concat "[" title "]"))
		(and (LaTeX-label environment)
			 (newline-and-indent)))
    (LaTeX-insert-environment "rem")
    (and (LaTeX-label environment)
       (newline-and-indent))))

Which worked till version 11.87, however in 11.88 an error is triggered
which I attach below.

BTW I promised to sync 11.88 with the official xemacs pkg, but I was a bit
busy these days. Now that the bug appeared I have an excuse....

Uwe Brauer 




Emacs  : XEmacs 21.5  (beta33) "horseradish" [Lucid] (i686-pc-linux, Mule) of Fri Oct 17 2014 on Burrurr
Package: 11.88

current state:
==============
(setq
 AUCTeX-date "2014-10-29"
 window-system 'x
 LaTeX-version "2e"
 TeX-style-path '("/home/oub/.xemacs/xemacs-packages/etc/auctex/auto/"
				  "/home/oub/.xemacs/xemacs-packages/etc/auctex/style" "/home/oub/.emacs.d/auctex/auto"
				  "/home/oub/.emacs.d/auctex/style" "auto" "style")
 TeX-auto-save t
 TeX-parse-self t
 TeX-master t
 TeX-command-list '(("TeX" "%(PDF)%(tex) %(extraopts) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil
					 (plain-tex-mode texinfo-mode ams-tex-mode) :help "Run plain TeX")
					("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX")
					("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile nil (texinfo-mode) :help
					 "Run Makeinfo with Info output")
					("Makeinfo HTML" "makeinfo %(extraopts) --html %t" TeX-run-compile nil (texinfo-mode) :help
					 "Run Makeinfo with HTML output")
					("AmSTeX" "%(PDF)amstex %(extraopts) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil
					 (ams-tex-mode) :help "Run AMSTeX")
					("ConTeXt" "texexec --once --texutil %(extraopts) %(execopts)%t" TeX-run-TeX nil
					 (context-mode) :help "Run ConTeXt once")
					("ConTeXt Full" "texexec %(extraopts) %(execopts)%t" TeX-run-TeX nil (context-mode) :help
					 "Run ConTeXt until completion")
					("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX")
					("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
					("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer")
					("evince" "/usr/bin/evince %G" TeX-run-command t t)
					("xpdf" "/usr/bin/xpdf %G" TeX-run-command t t)
					("fullxpdf" "/usr/bin/xpdf -fullscreen %G" TeX-run-command t t)
					("oolatex" "/usr/share/tex4ht/oolatex %t" TeX-run-command t t)
					("panlatex2odt" "pandoc -s -R -f latex --toc %t -t odt -o %O" TeX-run-command t t)
					("panlatex2rtf" "pandoc -s -R -f latex --toc %t -t rtf -o %R" TeX-run-command t t)
					("latex2rtf" "latex2rtf -f0 %t" TeX-run-command nil t)
					("oabiword" "abiword %O" TeX-run-command nil t)
					("rabiword" "abiword %R" TeX-run-command t t)
					("Print" "%p" TeX-run-command t t :help "Print the file")
					("Queue" "%q" TeX-run-background nil t :help "View the printer queue" :visible
					 TeX-queue-command)
					("File" "%(o?)dvips %d -o %f | ps2pdf %f" TeX-run-command t t :help
					 "Generate PostScript file")
					("Index" "makeindex %s" TeX-run-command nil t :help "Create index file")
					("makenomen" "makeindex %s.nlo -s nomencl.ist -o %s.nls" TeX-run-command t t)
					("Xindy" "texindy %s" TeX-run-command nil t :help "Run xindy to create index file")
					("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help
					 "Check LaTeX file for correctness")
					("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mode) :help
					 "Check LaTeX file for common mistakes")
					("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil t :help
					 "Spell-check the document")
					("Clean" "TeX-clean" TeX-run-function nil t :help "Delete generated intermediate files")
					("Clean All" "(TeX-clean t)" TeX-run-function nil t :help
					 "Delete generated intermediate and output files")
					("Other" "" TeX-run-command t t :help "Run an arbitrary command"))
 )


[11.88-bug (text/plain, inline)]
Debugger entered--Lisp error: (wrong-number-of-arguments LaTeX-label 1)
  LaTeX-label("rem")
  (and (LaTeX-label environment) (newline-and-indent))
  (if (y-or-n-p (format "Do you want a title ")) (let (...) (LaTeX-insert-environment "rem" ...) (and ... ...)) (LaTeX-insert-environment "rem") (and (LaTeX-label environment) (newline-and-indent)))
  LaTeX-rem-insert("rem")
  apply(LaTeX-rem-insert "rem" nil)
  LaTeX-environment-menu("rem")
  LaTeX-environment(nil)
  call-interactively(LaTeX-environment)

Reply sent to Mosè Giordano <mose <at> gnu.org>:
You have taken responsibility. (Tue, 25 Nov 2014 14:31:05 GMT) Full text and rfc822 format available.

Notification sent to Uwe Brauer <oub <at> mat.ucm.es>:
bug acknowledged by developer. (Tue, 25 Nov 2014 14:31:06 GMT) Full text and rfc822 format available.

Message #10 received at 19178-done <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: 19178-done <at> debbugs.gnu.org
Subject: Re: bug#19178: 11.88; 11.88 Xemacs 11.88 problem with env and labels
Date: Tue, 25 Nov 2014 15:29:59 +0100
Hi Uwe,

2014-11-25 15:11 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>
>
> Hello
>
> I used for years the following function
>
> (defun LaTeX-rem-insert (environment)   ;Version:1.20
>   (if (y-or-n-p
>            (format "Do you want a title "))
>           (let ((title (read-input " Title: ")))
>                 (LaTeX-insert-environment "rem" (concat "[" title "]"))
>                 (and (LaTeX-label environment)
>                          (newline-and-indent)))
>     (LaTeX-insert-environment "rem")
>     (and (LaTeX-label environment)
>        (newline-and-indent))))
>
> Which worked till version 11.87, however in 11.88 an error is triggered
> which I attach below.

This is not a bug: `LaTeX-label' now has two arguments, the label to
be inserted and the type, either environment or section, so you have
to replace your call to `LaTeX-label' with
    (LaTeX-label environment 'environment)

Bye,
Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Tue, 25 Nov 2014 14:43:01 GMT) Full text and rfc822 format available.

Message #13 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: 19178 <at> debbugs.gnu.org
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88;
 11.88 Xemacs 11.88 problem with env and labels)
Date: Tue, 25 Nov 2014 15:42:02 +0100
   > From: Mosè Giordano <mose <at> gnu.org>
   > Subject: Re: bug#19178: 11.88; 11.88 Xemacs 11.88 problem with env and labels
   > To: 19178-done <at> debbugs.gnu.org
   > Date: Tue, 25 Nov 2014 15:29:59 +0100 (7 minutes, 22 seconds ago)
   > Message-ID: <CAKtYQqTyPBYLd6RqU+tRMG78GoWzaoMpWg1cb5B-CratFcbGAg <at> mail.gmail.com>

   > Hi Uwe,

   > 2014-11-25 15:11 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:

   > This is not a bug: `LaTeX-label' now has two arguments, the label to
   > be inserted and the type, either environment or section, so you have
   > to replace your call to `LaTeX-label' with
   >     (LaTeX-label environment 'environment)

   > Bye,
   > Mosè



Grrr, this breaks backwards[1] compatibility. Couldn't that have been optional?
Not sure whether to wrap the old code in a cond call 

 (if AUCTeX-version blab bla)

Are there other syntax changes? The issue is if I find a real bug and
need  urgently to write something up, I would use 11.87 but now once I
change the syntax I couldn't...

Uwe 




Footnotes:
[1]  or forward compatibility, whatever term you find more appropriate.






Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Tue, 25 Nov 2014 14:53:02 GMT) Full text and rfc822 format available.

Message #16 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: 19178 <at> debbugs.gnu.org
Subject: [no label inserted] (was: bug#19178: 11.88;
 11.88 Xemacs 11.88 problem with env and labels)
Date: Tue, 25 Nov 2014 15:52:39 +0100
   > Hi Uwe,
   > 2014-11-25 15:11 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:

   > This is not a bug: `LaTeX-label' now has two arguments, the label to
   > be inserted and the type, either environment or section, so you have
   > to replace your call to `LaTeX-label' with
   >     (LaTeX-label environment 'environment)


This seems not to work. Here is my new setting:

(defun LaTeX-rem-insert (environment)	;Version:1.20
  (if (y-or-n-p
	   (format "Do you want a title "))
	  (let ((title (read-input " Title: ")))
		(LaTeX-insert-environment "rem" (concat "[" title "]"))
		(and (LaTeX-label environment 'environment)
			 (newline-and-indent)))
    (LaTeX-insert-environment "rem")
    (and (LaTeX-label environment 'environment)
       (newline-and-indent))))

However the following gets inserted:



\begin{rem}[Blabla]
  
\end{rem}


That is NO label.





Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Tue, 25 Nov 2014 17:12:02 GMT) Full text and rfc822 format available.

Message #19 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 19178 <at> debbugs.gnu.org
Subject: Re: bug#19178: [no label inserted] (was: bug#19178: 11.88; 11.88
 Xemacs 11.88 problem with env and labels)
Date: Tue, 25 Nov 2014 18:11:00 +0100
2014-11-25 15:52 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>
>    > Hi Uwe,
>    > 2014-11-25 15:11 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>
>    > This is not a bug: `LaTeX-label' now has two arguments, the label to
>    > be inserted and the type, either environment or section, so you have
>    > to replace your call to `LaTeX-label' with
>    >     (LaTeX-label environment 'environment)
>
>
> This seems not to work. Here is my new setting:
>
> (defun LaTeX-rem-insert (environment)   ;Version:1.20
>   (if (y-or-n-p
>            (format "Do you want a title "))
>           (let ((title (read-input " Title: ")))
>                 (LaTeX-insert-environment "rem" (concat "[" title "]"))
>                 (and (LaTeX-label environment 'environment)
>                          (newline-and-indent)))
>     (LaTeX-insert-environment "rem")
>     (and (LaTeX-label environment 'environment)
>        (newline-and-indent))))
>
> However the following gets inserted:
>
>
>
> \begin{rem}[Blabla]
>
> \end{rem}
>
>
> That is NO label.

See the documentation for `LaTeX-label-alist'
(https://www.gnu.org/software/auctex/manual/auctex.html#index-LaTeX_002dlabel_002dalist)

     If you want to automatically insert a label for a environment but
     with an empty prefix, use the empty string '""' as the cdr of the
     corresponding entry.

so you should add an appropriate entry to that variable, probably
'("rem" . "") or so.

Bye,
Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Tue, 25 Nov 2014 17:21:02 GMT) Full text and rfc822 format available.

Message #22 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88; 11.88 Xemacs 11.88
 problem with env and labels)
Date: Tue, 25 Nov 2014 18:20:03 +0100
2014-11-25 15:42 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
> Grrr, this breaks backwards[1] compatibility

This time I'd call it backward ;-)

> Couldn't that have been optional?

Well, perhaps yes and I'll think about making it optional, but you
took part into the discussion about this change and didn't object :-)

Bye,
Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Tue, 25 Nov 2014 17:49:01 GMT) Full text and rfc822 format available.

Message #25 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Mosè Giordano <mose <at> gnu.org>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88;
 11.88 Xemacs 11.88 problem with env and labels)
Date: Tue, 25 Nov 2014 18:48:00 +0100
[Message part 1 (text/plain, inline)]
>> "Mos" == Mos  <Mos> writes:

   > 2014-11-25 15:42 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
   >> Grrr, this breaks backwards[1] compatibility

   > This time I'd call it backward ;-)

   >> Couldn't that have been optional?

   > Well, perhaps yes and I'll think about making it optional, but you
   > took part into the discussion about this change and didn't object :-)


Oops starting Alzheimer? Usually I have the holy principle

Thou shalt not make code which is backward or forward incompatible.

It is even hang over my desk in my office :-D


Anyhow if you say that I did not object, I don't object that :-D
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Tue, 25 Nov 2014 18:08:02 GMT) Full text and rfc822 format available.

Message #28 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Mosè Giordano <mose <at> gnu.org>
Cc: 19178 <at> debbugs.gnu.org
Subject: Re: bug#19178: [no label inserted]
Date: Tue, 25 Nov 2014 19:06:49 +0100
[Message part 1 (text/plain, inline)]
   > 2014-11-25 15:52 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:

   > See the documentation for `LaTeX-label-alist'
   > (https://www.gnu.org/software/auctex/manual/auctex.html#index-LaTeX_002dlabel_002dalist)

   >      If you want to automatically insert a label for a environment but
   >      with an empty prefix, use the empty string '""' as the cdr of the
   >      corresponding entry.

   > so you should add an appropriate entry to that variable, probably
   > '("rem" . "") or so.

Well 

(defun LaTeX-rem-insert-old (environment)	;Version:1.20
  (if (y-or-n-p
	   (format "Do you want a title "))
	  (let ((title (read-input " Title: ")))
		(LaTeX-insert-environment "rem" (concat "[" title "]"))
		(and (LaTeX-label environment '("rem" . ""))
			 (newline-and-indent)))
    (LaTeX-insert-environment "rem")
    (and (LaTeX-label environment '("rem" . ""))
       (newline-and-indent))))


 does not do anything as before, that is no label inserted.


However 
(defun LaTeX-rem-insert (environment)	;Version:1.20
  (if (y-or-n-p
	   (format "Do you want a title "))
	  (let ((title (read-input " Title: ")))
		(LaTeX-insert-environment "rem" (concat "[" title "]"))
		(and (LaTeX-label environment 'section)
			 (newline-and-indent)))
    (LaTeX-insert-environment "rem")
    (and (LaTeX-label environment 'section)
       (newline-and-indent))))

Behaves as in earlier versions of auctex 

   > Bye,
   > Mosè
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Tue, 25 Nov 2014 22:31:02 GMT) Full text and rfc822 format available.

Message #31 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: [no label inserted]
Date: Tue, 25 Nov 2014 23:30:07 +0100
2014-11-25 19:06 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>
>    > 2014-11-25 15:52 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>
>    > See the documentation for `LaTeX-label-alist'
>    > (https://www.gnu.org/software/auctex/manual/auctex.html#index-LaTeX_002dlabel_002dalist)
>
>    >      If you want to automatically insert a label for a environment but
>    >      with an empty prefix, use the empty string '""' as the cdr of the
>    >      corresponding entry.
>
>    > so you should add an appropriate entry to that variable, probably
>    > '("rem" . "") or so.
>
> Well
>
> (defun LaTeX-rem-insert-old (environment)       ;Version:1.20
>   (if (y-or-n-p
>            (format "Do you want a title "))
>           (let ((title (read-input " Title: ")))
>                 (LaTeX-insert-environment "rem" (concat "[" title "]"))
>                 (and (LaTeX-label environment '("rem" . ""))
>                          (newline-and-indent)))
>     (LaTeX-insert-environment "rem")
>     (and (LaTeX-label environment '("rem" . ""))
>        (newline-and-indent))))
>
>
>  does not do anything as before, that is no label inserted.

I said to add '("rem" . "") to `LaTeX-label-alist' variable, not to
pass it as second argument of `LaTeX-label'.

Bye,
Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Wed, 26 Nov 2014 10:40:02 GMT) Full text and rfc822 format available.

Message #34 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88; 11.88 Xemacs 11.88
 problem with env and labels)
Date: Wed, 26 Nov 2014 11:39:09 +0100
Hi Uwe,

2014-11-25 18:48 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>>> "Mos" == Mos  <Mos> writes:
>
>    > 2014-11-25 15:42 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>    >> Grrr, this breaks backwards[1] compatibility
>
>    > This time I'd call it backward ;-)
>
>    >> Couldn't that have been optional?
>
>    > Well, perhaps yes and I'll think about making it optional, but you
>    > took part into the discussion about this change and didn't object :-)
>
>
> Oops starting Alzheimer? Usually I have the holy principle
>
> Thou shalt not make code which is backward or forward incompatible.
>
> It is even hang over my desk in my office :-D

I agree backward compatibility should be preserved as long as possible
(but not at any cost), but about what?  Most users only customize
variables, don't fiddle with functions, if they write some elisp we
hope they're also able to read the doc string of a function and see
which are its arguments, if they've been changed.  But please consider
the first version of a program (nor the second, the third, and so on)
is not perfect, when you develop it you arrive at a point in which you
must choose between keeping it bugged/broken, and fix it and break
compatibility (or fork it).

Regarding the change to `LaTeX-label', the whole point of it was to
let users choose to which environments label should be inserted.  The
addition of the second argument was needed to discriminate between
environments and sections as suggested by Vladimir.  Defaulting
`prefix' to an empty string when no type is provided (in order to make
this argument optional) would defeat the whole purpose of the change.
Only defaulting `prefix' to nil wouldn't break old codes using
`LateX-label' function, but keeping the second argument mandatory
helps users be aware of the change of the syntax of `LaTeX-label'.
Moral: I'm not going to change `LaTeX-label'.

Bye,
Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Wed, 26 Nov 2014 11:58:01 GMT) Full text and rfc822 format available.

Message #37 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Mosè Giordano <mose <at> gnu.org>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88;
 11.88 Xemacs 11.88 problem with env and labels)
Date: Wed, 26 Nov 2014 12:57:33 +0100
[Message part 1 (text/plain, inline)]
Hi Mosè 
   > Hi Uwe,
   > 2014-11-25 18:48 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:

   > I agree backward compatibility should be preserved as long as possible
   > (but not at any cost), but about what?  Most users only customize
   > variables, don't fiddle with functions, if they write some elisp we
   > hope they're also able to read the doc string of a function and see
   > which are its arguments, if they've been changed.  But please consider
   > the first version of a program (nor the second, the third, and so on)
   > is not perfect, when you develop it you arrive at a point in which you
   > must choose between keeping it bugged/broken, and fix it and break
   > compatibility (or fork it).

My point is the following: if you improve a function or variable by
adding more options it should be done, in my opinion, in way the user
has not to change his old settings.

   > Regarding the change to `LaTeX-label', the whole point of it was to
   > let users choose to which environments label should be inserted.  The
   > addition of the second argument was needed to discriminate between
   > environments and sections as suggested by Vladimir. 

I don't want to start this discussion again, since  I also use reftex,
my labels look typically 

  \label{rem:fixpoint-scheme:2}

Meaning that this  is the second remark in the file called fixpoint-scheme. For
me this is enough I wouldn't need to add more information like the one
concerning the section, but I understand there are users with other needs.


   > Defaulting `prefix' to an empty string when no type is provided (in
   > order to make this argument optional) would defeat the whole
   > purpose of the change. Only defaulting `prefix' to nil wouldn't
   > break old codes using `LateX-label' function, but keeping the
   > second argument mandatory helps users be aware of the change of the
   > syntax of `LaTeX-label'.

I had a look at the code and it is really a complete rewrite. From my
philosophical  point of view, the "appropriate" approach would have been
to leave the second argument optionally not mandatory, and a user
interested in this enhancement could consult the documentation and not
the other way around: that the long-term-user gets an error and presumes
a bug.

Something like this. 
(defun LaTeX-label (name &optional type)


   > Moral: I'm not going to change `LaTeX-label'.

Would you accept an (ugly) patch? (Also the changes that I do this any
time soon are  unlikely due to my workload and other priorities, such as
the xemacs pkg sync.)


regards

Uwe 
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Wed, 26 Nov 2014 18:46:02 GMT) Full text and rfc822 format available.

Message #40 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88; 11.88 Xemacs 11.88
 problem with env and labels)
Date: Wed, 26 Nov 2014 19:45:04 +0100
[Message part 1 (text/plain, inline)]
2014-11-26 12:57 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>
> Hi Mosè
>    > Hi Uwe,
>    > 2014-11-25 18:48 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>
>    > I agree backward compatibility should be preserved as long as possible
>    > (but not at any cost), but about what?  Most users only customize
>    > variables, don't fiddle with functions, if they write some elisp we
>    > hope they're also able to read the doc string of a function and see
>    > which are its arguments, if they've been changed.  But please consider
>    > the first version of a program (nor the second, the third, and so on)
>    > is not perfect, when you develop it you arrive at a point in which you
>    > must choose between keeping it bugged/broken, and fix it and break
>    > compatibility (or fork it).
>
> My point is the following: if you improve a function or variable by
> adding more options it should be done, in my opinion, in way the user
> has not to change his old settings.
>
>    > Regarding the change to `LaTeX-label', the whole point of it was to
>    > let users choose to which environments label should be inserted.  The
>    > addition of the second argument was needed to discriminate between
>    > environments and sections as suggested by Vladimir.
>
> I don't want to start this discussion again, since  I also use reftex,
> my labels look typically
>
>   \label{rem:fixpoint-scheme:2}
>
> Meaning that this  is the second remark in the file called fixpoint-scheme. For
> me this is enough I wouldn't need to add more information like the one
> concerning the section, but I understand there are users with other needs.
>
>
>    > Defaulting `prefix' to an empty string when no type is provided (in
>    > order to make this argument optional) would defeat the whole
>    > purpose of the change. Only defaulting `prefix' to nil wouldn't
>    > break old codes using `LateX-label' function, but keeping the
>    > second argument mandatory helps users be aware of the change of the
>    > syntax of `LaTeX-label'.
>
> I had a look at the code and it is really a complete rewrite. From my
> philosophical  point of view, the "appropriate" approach would have been
> to leave the second argument optionally not mandatory, and a user
> interested in this enhancement could consult the documentation and not
> the other way around: that the long-term-user gets an error and presumes
> a bug.
>
> Something like this.
> (defun LaTeX-label (name &optional type)
>
>
>    > Moral: I'm not going to change `LaTeX-label'.
>
> Would you accept an (ugly) patch? (Also the changes that I do this any
> time soon are  unlikely due to my workload and other priorities, such as
> the xemacs pkg sync.)

See the attached patch: this makes second argument optional but
doesn't change the spirit of LaTeX-label.

Bye,
Mosè
[latex-label.patch (text/x-diff, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Wed, 26 Nov 2014 18:51:01 GMT) Full text and rfc822 format available.

Message #43 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88; 11.88 Xemacs 11.88
 problem with env and labels)
Date: Wed, 26 Nov 2014 19:49:46 +0100
> -            ""))))
> +            ""))
> +         ((nullp type)
> +          "")))
                 ^^^^

Sorry, I meant nil instead of ""


2014-11-26 19:45 GMT+01:00 Mosè Giordano <mose <at> gnu.org>:
> 2014-11-26 12:57 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>>
>> Hi Mosè
>>    > Hi Uwe,
>>    > 2014-11-25 18:48 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>>
>>    > I agree backward compatibility should be preserved as long as possible
>>    > (but not at any cost), but about what?  Most users only customize
>>    > variables, don't fiddle with functions, if they write some elisp we
>>    > hope they're also able to read the doc string of a function and see
>>    > which are its arguments, if they've been changed.  But please consider
>>    > the first version of a program (nor the second, the third, and so on)
>>    > is not perfect, when you develop it you arrive at a point in which you
>>    > must choose between keeping it bugged/broken, and fix it and break
>>    > compatibility (or fork it).
>>
>> My point is the following: if you improve a function or variable by
>> adding more options it should be done, in my opinion, in way the user
>> has not to change his old settings.
>>
>>    > Regarding the change to `LaTeX-label', the whole point of it was to
>>    > let users choose to which environments label should be inserted.  The
>>    > addition of the second argument was needed to discriminate between
>>    > environments and sections as suggested by Vladimir.
>>
>> I don't want to start this discussion again, since  I also use reftex,
>> my labels look typically
>>
>>   \label{rem:fixpoint-scheme:2}
>>
>> Meaning that this  is the second remark in the file called fixpoint-scheme. For
>> me this is enough I wouldn't need to add more information like the one
>> concerning the section, but I understand there are users with other needs.
>>
>>
>>    > Defaulting `prefix' to an empty string when no type is provided (in
>>    > order to make this argument optional) would defeat the whole
>>    > purpose of the change. Only defaulting `prefix' to nil wouldn't
>>    > break old codes using `LateX-label' function, but keeping the
>>    > second argument mandatory helps users be aware of the change of the
>>    > syntax of `LaTeX-label'.
>>
>> I had a look at the code and it is really a complete rewrite. From my
>> philosophical  point of view, the "appropriate" approach would have been
>> to leave the second argument optionally not mandatory, and a user
>> interested in this enhancement could consult the documentation and not
>> the other way around: that the long-term-user gets an error and presumes
>> a bug.
>>
>> Something like this.
>> (defun LaTeX-label (name &optional type)
>>
>>
>>    > Moral: I'm not going to change `LaTeX-label'.
>>
>> Would you accept an (ugly) patch? (Also the changes that I do this any
>> time soon are  unlikely due to my workload and other priorities, such as
>> the xemacs pkg sync.)
>
> See the attached patch: this makes second argument optional but
> doesn't change the spirit of LaTeX-label.
>
> Bye,
> Mosè




Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Thu, 27 Nov 2014 09:25:02 GMT) Full text and rfc822 format available.

Message #46 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: David Kastrup <dak <at> gnu.org>
To: Mosè Giordano <mose <at> gnu.org>
Cc: Uwe Brauer <oub <at> mat.ucm.es>, 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88;
 11.88 Xemacs 11.88 problem with env and labels)
Date: Wed, 26 Nov 2014 21:21:51 +0100
Mosè Giordano <mose <at> gnu.org> writes:

>> -            ""))))
>> +            ""))
>> +         ((nullp type)
>> +          "")))
>                  ^^^^
>
> Sorry, I meant nil instead of ""

I'm not too versed with ASCII art, but that seems to be either some
cartoonish small rodent running to the left, or some beaver sitting and
looking to the right.

-- 
David Kastrup




Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Thu, 27 Nov 2014 10:26:02 GMT) Full text and rfc822 format available.

Message #49 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Mosè Giordano <mose <at> gnu.org>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88;
 11.88 Xemacs 11.88 problem with env and labels)
Date: Thu, 27 Nov 2014 11:25:05 +0100
   > 2014-11-26 12:57 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:

   > See the attached patch: this makes second argument optional but
   > doesn't change the spirit of LaTeX-label.

Great, thanks! Very kind of you.

Uwe 





Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Thu, 27 Nov 2014 10:40:01 GMT) Full text and rfc822 format available.

Message #52 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Mosè Giordano <mose <at> gnu.org>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88;
 11.88 Xemacs 11.88 problem with env and labels)
Date: Thu, 27 Nov 2014 11:39:25 +0100
[Message part 1 (text/plain, inline)]
>> "Mos" == Mos  <Mos> writes:

   >> -            ""))))
   >> +            ""))
   >> +         ((nullp type)
   >> +          "")))
   >                  ^^^^

   > Sorry, I meant nil instead of ""

Hi 

I modified (hopefully correctly) your patch, applied it 
then used my old definitions such as 
(defun LaTeX-rem-insert (environment)	;Version:1.20
	(if (y-or-n-p
		 (format "Do you want a title "))
		(let ((title (read-input " Title: ")))
		  (LaTeX-insert-environment "rem" (concat "[" title "]"))
		  (and (LaTeX-label environment)
			   (newline-and-indent)))
	  (LaTeX-insert-environment "rem")
	  (and (LaTeX-label environment)
		   (newline-and-indent))))

and got an error. I attach the modified patch, and the error

regards

Uwe 

[bug2.txt (text/plain, attachment)]
[latex-label.patch (text/x-diff, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Thu, 27 Nov 2014 12:27:01 GMT) Full text and rfc822 format available.

Message #55 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 19178 <19178 <at> debbugs.gnu.org>,
 Mosè Giordano <mose <at> gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88;
 11.88 Xemacs 11.88 problem with env and labels)
Date: Thu, 27 Nov 2014 13:26:35 +0100
Uwe Brauer <oub <at> mat.ucm.es> writes:

> and got an error. I attach the modified patch, and the error
>
> Debugger entered--Lisp error: (void-function nullp)

That function is actually called `null'.

Bye,
Tassilo




Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Thu, 27 Nov 2014 16:41:01 GMT) Full text and rfc822 format available.

Message #58 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88; 11.88 Xemacs 11.88
 problem with env and labels)
Date: Thu, 27 Nov 2014 17:40:02 +0100
[Message part 1 (text/plain, inline)]
Hi Uwe and all,

2014-11-27 11:39 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>>> "Mos" == Mos  <Mos> writes:
>
>    >> -            ""))))
>    >> +            ""))
>    >> +         ((nullp type)
>    >> +          "")))
>    >                  ^^^^
>
>    > Sorry, I meant nil instead of ""
>
> Hi
>
> I modified (hopefully correctly) your patch, applied it
> then used my old definitions such as
> (defun LaTeX-rem-insert (environment)   ;Version:1.20
>         (if (y-or-n-p
>                  (format "Do you want a title "))
>                 (let ((title (read-input " Title: ")))
>                   (LaTeX-insert-environment "rem" (concat "[" title "]"))
>                   (and (LaTeX-label environment)
>                            (newline-and-indent)))
>           (LaTeX-insert-environment "rem")
>           (and (LaTeX-label environment)
>                    (newline-and-indent))))
>
> and got an error. I attach the modified patch, and the error

I hope it's clear I wrote those messages in a hurry, just to give the idea.

I changed my mind. I propose the attached patch which restores (full)
compatibility with the old version of LaTeX-label: the optioanl `type'
argument select the look up table to be used for the default prefix of
the label, if it's nil (or absent) you are always prompted for a
label.  AUCTeX code always uses the appropriate value for the type
argument, but users will also be able to force the insertion of the
label (or continue to use the old syntax of the function).

Bye,
Mosè
[latex-label.patch (text/x-diff, attachment)]

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Nov 2014 16:51:01 GMT) Full text and rfc822 format available.

Merged 19178 19199. Request was from Mosè Giordano <mose <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 27 Nov 2014 17:10:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-auctex <at> gnu.org:
bug#19178; Package auctex. (Thu, 27 Nov 2014 17:59:02 GMT) Full text and rfc822 format available.

Message #65 received at 19178 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Mosè Giordano <mose <at> gnu.org>
Cc: 19178 <19178 <at> debbugs.gnu.org>
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88;
 11.88 Xemacs 11.88 problem with env and labels)
Date: Thu, 27 Nov 2014 18:58:18 +0100
[Message part 1 (text/plain, inline)]
Hi Mosè,


   > Hi Uwe and all,
   > 2014-11-27 11:39 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:

   > I hope it's clear I wrote those messages in a hurry, just to give the idea.

I was going to write you. I changed nullp to null applied your old patch and
it did not work as expected. *However* your *new* patch

   > I changed my mind. I propose the attached patch which restores (full)
   > compatibility with the old version of LaTeX-label: the optioanl `type'
   > argument select the look up table to be used for the default prefix of
   > the label, if it's nil (or absent) you are always prompted for a
   > label.  AUCTeX code always uses the appropriate value for the type
   > argument, but users will also be able to force the insertion of the
   > label (or continue to use the old syntax of the function).

Works beautifully! Thanks for all your efforts, I appreciate it a lot. 
(I still prefer some days more of testing before trying to release a
Xemacs pkg)

Uwe 
[smime.p7s (application/pkcs7-signature, attachment)]

Reply sent to Mosè Giordano <mose <at> gnu.org>:
You have taken responsibility. (Thu, 27 Nov 2014 18:21:01 GMT) Full text and rfc822 format available.

Notification sent to Uwe Brauer <oub <at> mat.ucm.es>:
bug acknowledged by developer. (Thu, 27 Nov 2014 18:21:02 GMT) Full text and rfc822 format available.

Message #70 received at 19178-done <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 19178-done <at> debbugs.gnu.org
Subject: Re: bug#19178: closed (Re: bug#19178: 11.88; 11.88 Xemacs 11.88
 problem with env and labels)
Date: Thu, 27 Nov 2014 19:19:20 +0100
2014-11-27 18:58 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
> Hi Mosè,
>
>
>    > Hi Uwe and all,
>    > 2014-11-27 11:39 GMT+01:00 Uwe Brauer <oub <at> mat.ucm.es>:
>
>    > I hope it's clear I wrote those messages in a hurry, just to give the idea.
>
> I was going to write you. I changed nullp to null applied your old patch and
> it did not work as expected. *However* your *new* patch
>
>    > I changed my mind. I propose the attached patch which restores (full)
>    > compatibility with the old version of LaTeX-label: the optioanl `type'
>    > argument select the look up table to be used for the default prefix of
>    > the label, if it's nil (or absent) you are always prompted for a
>    > label.  AUCTeX code always uses the appropriate value for the type
>    > argument, but users will also be able to force the insertion of the
>    > label (or continue to use the old syntax of the function).
>
> Works beautifully! Thanks for all your efforts, I appreciate it a lot.

Ok, patch applied then.

> (I still prefer some days more of testing before trying to release a
> Xemacs pkg)

Thank you!

Bye,
Mosè




Reply sent to Mosè Giordano <mose <at> gnu.org>:
You have taken responsibility. (Thu, 27 Nov 2014 18:21:02 GMT) Full text and rfc822 format available.

Notification sent to Uwe Brauer <oub <at> mat.ucm.es>:
bug acknowledged by developer. (Thu, 27 Nov 2014 18:21:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 26 Dec 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.