1 Aug 10:42 2012

### Re: reftex-label-alist for ctable package

>> Patch did not work in my 23.0.92 emacs. Still no completion choices in
>> the *RefTeX Select* buffer.
>
>

indeed, but now at least I moved to 24.1.

>> My .emacs could also be the culprit so I went ahead and installed the
>> precompiled emacs 24.1 from GNU website. It did not work either...
>
> Did not work means it didn't work out of the box or after applying the
> patch.
>

Ah I did not mention it here. See previous post in steps to reproduce,
where I applied the patch.

>> Steps to reproduce:
>> 1. Install fresh emacs 24.1 for Windows
>
> I don't have a windows machine.  But if you wanted to, you could try
> compiling emacs from the current bzr sources.  That version does work
> fust fine for me with the recipe you gave.
>

Compiling Emacs on Windows is just putting me off from work too much
right now...

> But anyway, I don't really see why it wouldn't work after applying the


1 Aug 21:37 2012

### Re: reftex-label-alist for ctable package

Michael Bach <phaebz <at> gmail.com> writes:

>
> and this.

Another guess: you patched the el files but did not byte-compile them so
that emacs still uses the elc files of the original sources.

Bye,
Tassilo

1 Aug 22:28 2012

### Re: reftex-label-alist for ctable package

 >>> But anyway, I don't really see why it wouldn't work after applying
>>> the patch.  Did you restart emacs?  If not, you need at least to
>>> do
>>>    M-: (reftex-compile-variables) RET

This is good to know.  I did restart emacs.  E.g.
reftex-label-alist-builtin correctly shows me the ctable and minted bits.

>>

Nope, the only thing that is shadowed in my old emacs is the bundled
org-mode and babel.  On the fresh 24.1 there are no shadowings.

> Another guess: you patched the el files but did not byte-compile them so
> that emacs still uses the elc files of the original sources.
>

Nope, that's one thing that I learned the hard way and will always

Anyway, I tried it again today on my home box with the exact recipe from
my previous post - still no luck. Maybe someone is willing to help and
could also test this patch?

Best Regards,
Michael

2 Aug 08:16 2012

### Re: reftex-label-alist for ctable package

Michael Bach <phaebz <at> gmail.com> writes:

Hi Michael,

> Anyway, I tried it again today on my home box with the exact recipe
> from my previous post - still no luck. Maybe someone is willing to
> help and could also test this patch?

If not, you could also try a windows snapshot build from

http://alpha.gnu.org/gnu/emacs/windows/

Right now, the most recent version there doesn't yet contain my patches.
Maybe there's a new build in a few days.  The revision number must be
r109239 or higher, then it contains my patches and should work out of
the box.

And to absolutely sure that nothing interferes, here's a minimal working
recipe starting with emacs -Q which works just fine for me.

$emacs -Q foo.tex # contains ctables, lstlisting with label={x} M-x reftex-mode ;; enable reftex-mode C-c = ;; shows TOC buffer l ;; enables the display of labels Now I see something like --8<---------------cut here---------------start------------->8--- TABLE-OF-CONTENTS on ~/tmp/foo.tex SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help  (Continue reading) 2 Aug 14:38 2012 ### Re: reftex-label-alist for ctable package Hi Tassilo, >> Anyway, I tried it again today on my home box with the exact recipe >> from my previous post - still no luck. Maybe someone is willing to >> help and could also test this patch? > > If not, you could also try a windows snapshot build from > > http://alpha.gnu.org/gnu/emacs/windows/ > > Right now, the most recent version there doesn't yet contain my patches. > Maybe there's a new build in a few days. The revision number must be > r109239 or higher, then it contains my patches and should work out of > the box. > > And to absolutely sure that nothing interferes, here's a minimal working > recipe starting with emacs -Q which works just fine for me. > >$ emacs -Q foo.tex # contains ctables, lstlisting with label={x}
>    M-x reftex-mode    ;; enable reftex-mode
>    C-c =              ;; shows TOC buffer
>    l                  ;; enables the display of labels
>

This got me curious and I tried the TOC buffer via C-c = and after
pressing "l", I got the labels! It also works with label = ...', no
need to label={x}'. Do you mean that only for lstlistings one needs
label={x}'?

> Now I see something like


2 Aug 15:20 2012

### Re: reftex-label-alist for ctable package

Michael Bach <phaebz <at> gmail.com> writes:

>> And to absolutely sure that nothing interferes, here's a minimal
>> working recipe starting with emacs -Q which works just fine for me.
>>
>>    \$ emacs -Q foo.tex # contains ctables, lstlisting with label={x}
>>    M-x reftex-mode    ;; enable reftex-mode
>>    C-c =              ;; shows TOC buffer
>>    l                  ;; enables the display of labels
>>
>
> This got me curious and I tried the TOC buffer via C-c = and after pressing
> "l", I got the labels! It also works with label = ...', no need to
> label={x}'. Do you mean that only for lstlistings one needs label={x}'?

No, both forms are allowed everywhere.  Just wanted to test both of
them.

> I do see this too now.

Good!

>> If I do C-c )' in the foo.tex file and select SPC to show all
>> labels, I get a similar *RefTeX Select* buffer.
>
> Again, doing the SPC in the *RefTeX Select* buffer also gives me the
> labels.

Very good.



2 Aug 20:59 2012

### Re: reftex-label-alist for ctable package

Tassilo Horn <tsdh <at> gnu.org> writes:

>> So there seems to be something awry with the way the ?t gets used
>> inside the alist for ctable in reftex-label-alist-builtin, doesn't it?
>
> Indeed, and ?l doesn't even occur as possible selection, although
> there's a listing in the file...
>
> I'll look into that, but don't hold your breath.  I'm in holidays from
> Friday on.

Ok, here's another patch.  With that, at least C-c ) followed by l will
show listing and minted environments.  However, it only works for
environments but not for macros like \ctable or \endnote.  Not sure
why...

Bye,
Tassilo


Attachment (reftex.patch): text/x-patch, 2337 bytes
_______________________________________________
auctex mailing list
auctex <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex

3 Aug 08:56 2012

### Re: reftex-label-alist for ctable package

Tassilo Horn <tsdh <at> gnu.org> writes:

Hi again,

>> I'll look into that, but don't hold your breath.  I'm in holidays
>> from Friday on.
>
> Ok, here's another patch.  With that, at least C-c ) followed by l will
> show listing and minted environments.  However, it only works for
> environments but not for macros like \ctable or \endnote.  Not sure
> why...

I've fixed it!  It took me half an hour to edebug several reftex parsing
functions to eventually see that the label regex has to be written in a
way so that a forward search stops directly after the label.

Ok, if you want you can apply this mini-patch on top of the others and
then it'll also work for ctables.

--8<---------------cut here---------------start------------->8---
=== modified file 'lisp/textmodes/reftex.el'
--- lisp/textmodes/reftex.el	2012-07-27 17:58:58 +0000
+++ lisp/textmodes/reftex.el	2012-08-03 06:47:32 +0000
<at>  <at>  -1291,7 +1291,7  <at>  <at>
;; keyvals [..., label = {foo}, ...]
;; forms used by ctable, listings,
;; minted, ...
-			     "\$[^]]*label[[:space:]]*=[[:space:]]*{?\$$?1:[^],}]+\$$}?[^[]*\$"
+			     "\\[[^]]*label[[:space:]]*=[[:space:]]*{?\$$?1:[^],}]+\$$}?"
"\\)"))


6 Aug 00:07 2012

### Re: reftex-label-alist for ctable package

Hi Tassilo,

On 8/3/2012 8:56 AM, Tassilo Horn wrote:
> I've fixed it!  It took me half an hour to edebug several reftex parsing
> functions to eventually see that the label regex has to be written in a
> way so that a forward search stops directly after the label.
>

Glad to hear that, good job!

> Ok, if you want you can apply this mini-patch on top of the others and
> then it'll also work for ctables.
>

I applied the patch(es) and everything works as expected for ctables.

Thanks Tassilo for your prompt responses and solution of this issue!

Michael

9 Aug 04:44 2012

### preview-document error only when run on included file

I have a master file which \includes other files. These other files set the TeX-master variable through a local variables comment at the end of the file. From within these files, I can run C-c C-p C-b and the previews work. From the master file, I can run C-c C-p C-d and previews in all included files work. However, running C-c C-p C-d from one of the included files does not work: I get the error symbol for every preview, with the error "/typecheck in --setfileposition--"

I cannot get a MWE working. So I presume this is due to something complex I am doing. My included files are very simple, just sections and subsections. My master file, however, uses the pdfpages package and includes a PDF file (as the title page, should it matter). Otherwise, I am not doing anything fancy. I am using the report class.

Any ideas what could be causing this?
Dan
_______________________________________________
auctex mailing list
auctex <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex


Gmane