1 Mar 16:04 2009

Re: RefTeX: Create BibTeX file misses citations

* Wolfgang Mayer (2009-02-25) writes:

> reftex-all-used-citation-keys extracts only the cite keys that appear
> in the last \cite{} command in a line, but skips other \cite{}'s on
> the same line.
>
> Enclosed are:
> * a test case to demonstrate the problem (.tex and .bib file) (tested
>   using Emacs 22.3.1, today's CVS checkout, reftex-cite.el revision
>   1.52)
> * a patch to fix it.

Thanks!  I've applied the patch.

> -            (while (re-search-forward
"^[^%\n\r]*\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^\\]]*\\]\\)?{\\([^}]+\\)}"
nil t)
> +            (while (re-search-forward
"\\(?:^\\|\\=\\)[^%\n\r]*?\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^\\]]*\\]\\)?{\\([^}]+\\)}"
nil t)

Just as a random thought: Using \= here is a smart way to prevent the
regexp from matching in %-based comments.  Should we ever want to use
RefTeX for modes with other comment starters, we might have to think
about doing things like this with `reftex-in-comment'.

--

--
Ralf
1 Mar 17:49 2009

Re: multicolumn

> The multicolumn requires three arguments, but AuCTeX inserts only one
> pair of brackets when using alt-backspace. I couldn't figure out where
> the functionality is located.

`M-backspace' runs `backward-kill-word' unless you fiddled with the
is called by `M-backspace' in your case, it is impossible to tell why
you only get two pairs of braces.  Because if you use the insertion
command provided by AUCTeX, namely `C-c <RET> multicolumn <RET>', then
three pairs are inserted and AUCTeX even prompts you for the arguments.

--

--
Ralf
1 Mar 17:59 2009

New PSTricks files

Hi Holger,

please provide ChangeLog entries for the new files you checked in,
including the changes made to pstricks.el.  You might also want to add
entries for the new files to the STYLESRC variable in Makefile.in.
Otherwise they won't be copied to the installation target directory.

--

--
Ralf
1 Mar 18:37 2009

Re: multicolumn

Ralf Angeli wrote:
> * Mads Jensen (2009-02-26) writes:
>
>> The multicolumn requires three arguments, but AuCTeX inserts only one
>> pair of brackets when using alt-backspace. I couldn't figure out where
>> the functionality is located.
>
> `M-backspace' runs `backward-kill-word' unless you fiddled with the
> is called by `M-backspace' in your case, it is impossible to tell why
> you only get two pairs of braces.  Because if you use the insertion
> command provided by AUCTeX, namely `C-c <RET> multicolumn <RET>', then
> three pairs are inserted and AUCTeX even prompts you for the arguments.

Sorry, I made a "typo", and of course meant M-tab. Sorry for the confusion.

Kind regards,

_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-devel
1 Mar 19:16 2009

Re: multicolumn

> Ralf Angeli wrote:
>> * Mads Jensen (2009-02-26) writes:
>>
>>> The multicolumn requires three arguments, but AuCTeX inserts only one
>>> pair of brackets when using alt-backspace. I couldn't figure out where
>>> the functionality is located.
>>
>> `M-backspace' runs `backward-kill-word' unless you fiddled with the
>> is called by `M-backspace' in your case, it is impossible to tell why
>> you only get two pairs of braces.  Because if you use the insertion
>> command provided by AUCTeX, namely `C-c <RET> multicolumn <RET>', then
>> three pairs are inserted and AUCTeX even prompts you for the arguments.
>
> Sorry, I made a "typo", and of course meant M-tab. Sorry for the confusion.

,----[ (info "(auctex)Completion") <-- Type `C-x C-e' here ]
|    A more direct way to insert a macro is with `TeX-insert-macro',
| bound to `C-c C-m' which is equivalent to `C-c <RET>'.  It has the
| advantage over completion that it knows about the argument of most
| standard LaTeX macros, and will prompt for them.  It also knows about
| the type of the arguments, so it will for example give completion for
| the argument to `\include'.  Some examples are listed below.
`----

--

--
Ralf

13 Mar 11:27 2009

Re: RefTeX: Create BibTeX file misses citations

Ralf Angeli <angeli <at> caeruleus.net> writes:

>> -            (while (re-search-forward
"^[^%\n\r]*\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^\\]]*\\]\\)?{\\([^}]+\\)}"
nil t)
>> +            (while (re-search-forward
"\\(?:^\\|\\=\\)[^%\n\r]*?\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^\\]]*\\]\\)?{\\([^}]+\\)}"
nil t)
>
> Just as a random thought: Using \= here is a smart way to prevent the
> regexp from matching in %-based comments.  Should we ever want to use
> RefTeX for modes with other comment starters, we might have to think
> about doing things like this with `reftex-in-comment'.

AFAIR, RefTeX does not even work in .dtx files.  Quite a shortcoming:

Would likely require quite a bit of revision.

--

--
David Kastrup
15 Mar 16:38 2009

Re: Preview-latex temporaty files

* David Kastrup (2009-03-12) writes:

> Ralf Angeli <angeli <at> caeruleus.net> writes:
>
>> Perhaps we should be more agressive when cleaning (and removing) the
>> directory when exiting Emacs.  Does anybody know why the file
>> <master>.prv/.../preview.ps is kept on exit?
>
> If it is, this is likely a bug.  The idea is complete cleanup unless
> errors occured.

Then this might be intentional, I'm not sure.  It happens only for
circ.tex in my case which contains two intentional errors.

When the buffer is closed, all overlays are processed and the associated
files are deleted by `preview-delete-file'.  A file is only deleted if
the caar of the `filename' overlay property is not a cons or if the
number in the cdr of the cons is 1.  (This is probably a reference
counter.)

Now if you examine the overlays in the circ.tex buffer and only look at
the ones with a cons as caar, then you get something like this (paths
truncated):

(((("/.../circ.prv/tmp19577gKh/preview.ps" . 3)
"/.../circ.prv/tmp19577gKh" "/.../circ.prv" 3)
("/.../circ.prv/tmp19577gKh/pr2-1.png" "/.../circ.prv/tmp19577gKh"
"/.../circ.prv" 3))
((("/.../circ.prv/tmp19577gKh/preview.ps" . 3)
"/.../circ.prv/tmp19577gKh" "/.../circ.prv" 3)

17 Mar 14:06 2009

Abbrev integration needs improvement

Hi there,

Abbrev mode has been seamlessly integrated into Emacs. In fact, any mode
defined with define-derived-mode will automatically have its own
abbrev-table in effect. The tex-mode.el which is bundled with Emacs
takes advantage of this. AUCTeX, on the other hand, does not (maybe
because the original tex-mode file that AUCTeX based on didn't have
that). In this respect AUCTeX is inferior to tex-mode.el.

At the moment most modes (which shadow modes from tex-mode.el) defined
in AUCTeX share abbrev tables with for example text mode and this is far
from optimal. It's a great loss of productivity. Although a user level
solution isn't difficult to find, I think it might be worthwhile letting
level.

Best wishes,
--

--
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.
29 Mar 22:10 2009

Completion for key=value pairs

Hi,

with `multi-prompt-key-value' we now have a function which can be used
to prompt the user for key=value pairs with completion when inserting
LaTeX macros.  listings.el uses it already, so you should be able to

Listings is more or less just a showcase.  The reason I implemented
`multi-prompt-key-value' is to use it in pstricks.el instead of the
current way pstricks.el tries to prompt for macro options.  I write
"tries to" because the prompting mechanism is broken and does not work
most of the time.  Anyway, I think a completion mechanism as provided by
`multi-prompt-key-value' would be more natural and fit better into
AUCTeX than prompting for every option separately.

Please check it out with the listings example and let me know what you
think.  If there are no objections, I'll go ahead and adapt pstricks.el
to use this mechanism as well.

--

--
Ralf
30 Mar 23:07 2009

Re: Completion for key=value pairs

Ralf Angeli wrote:

> with `multi-prompt-key-value' we now have a function which can be used
> to prompt the user for key=value pairs with completion when inserting
> LaTeX macros.  listings.el uses it already, so you should be able to

Looks good to me.

> Listings is more or less just a showcase.  The reason I implemented
> `multi-prompt-key-value' is to use it in pstricks.el instead of the
> current way pstricks.el tries to prompt for macro options.  I write
> "tries to" because the prompting mechanism is broken and does not work
> most of the time.

I have not used myself pstricks.el for while. Just recently I noticed
that in emacs-23 a:

(require 'cmr)

was necessary to insert to make it work again.

I thought when looking at the source again, it was way to complicated.

> Anyway, I think a completion mechanism as provided by
> `multi-prompt-key-value' would be more natural and fit better into
> AUCTeX than prompting for every option separately.

Of course.