auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Remove Biber from TeX-command-list


From: Delia Fara
Subject: Re: [AUCTeX] Remove Biber from TeX-command-list
Date: Sun, 20 Apr 2014 19:24:54 -0400

Thank you all!

I used Tassilo's code.  Worked like a charm.

Cheers,
Delia


On Thu, Apr 17, 2014 at 12:00 PM, address@hidden <address@hidden> wrote:
Send auctex mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.gnu.org/mailman/listinfo/auctex
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of auctex digest..."


Today's Topics:

   1. Remove Biber from TeX-command-list (Delia Fara)
   2. Re: Remove Biber from TeX-command-list (Tassilo Horn)
   3. Re: Remove Biber from TeX-command-list (Nicolas Richard)
   4. Re: Remove Biber from TeX-command-list (Tassilo Horn)
   5. Re: Remove Biber from TeX-command-list (Joost Kremers)
   6. Re: Remove Biber from TeX-command-list (Nicolas Richard)
   7. Re: Remove Biber from TeX-command-list (Nicolas Richard)
   8. Re: Remove Biber from TeX-command-list (Tassilo Horn)


----------------------------------------------------------------------

Message: 1
Date: Wed, 16 Apr 2014 21:41:51 -0400
From: Delia Fara <address@hidden>
To: address@hidden
Cc: Delia Graff Fara <address@hidden>
Subject: [AUCTeX] Remove Biber from TeX-command-list
Message-ID:
        <address@hidden>
Content-Type: text/plain; charset="utf-8"

Since I upgraded to Emacs 24 with Auctex 11.87, I can no longer do just
"bi[spacebar]" (using spacebar for completion) to run bibtex.  I now have
to do "bibt[spacebar]", which is frustrating.  So, assuming that I don't
decide to use biber, how do I get it off my auctex command list?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnu.org/archive/html/auctex/attachments/20140416/f252915d/attachment.html>

------------------------------

Message: 2
Date: Thu, 17 Apr 2014 08:02:26 +0200
From: Tassilo Horn <address@hidden>
To: address@hidden
Subject: Re: [AUCTeX] Remove Biber from TeX-command-list
Message-ID: <address@hidden>
Content-Type: text/plain

Delia Fara <address@hidden> writes:

Hi Delia,

> Since I upgraded to Emacs 24 with Auctex 11.87, I can no longer do just
> "bi[spacebar]" (using spacebar for completion) to run bibtex.  I now have
> to do "bibt[spacebar]", which is frustrating.  So, assuming that I don't
> decide to use biber,

You should really give it a try.

> how do I get it off my auctex command list?

(setq TeX-command-list
      (remove '("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
              TeX-command-list))

Bye,
Tassilo




------------------------------

Message: 3
Date: Thu, 17 Apr 2014 12:50:48 +0200
From: Nicolas Richard <address@hidden>
To: Tassilo Horn <address@hidden>
Cc: address@hidden
Subject: Re: [AUCTeX] Remove Biber from TeX-command-list
Message-ID: <address@hidden>
Content-Type: text/plain

Tassilo Horn <address@hidden> writes:
> (setq TeX-command-list
>       (remove '("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
>               TeX-command-list))

alternatively:

(assq-delete-all
 (car (assoc "Biber" TeX-command-list))
 TeX-command-list)

which can be easily changed for deleting other unwanted entries.

--
Nico.



------------------------------

Message: 4
Date: Thu, 17 Apr 2014 13:23:30 +0200
From: Tassilo Horn <address@hidden>
To: Nicolas Richard <address@hidden>
Cc: address@hidden
Subject: Re: [AUCTeX] Remove Biber from TeX-command-list
Message-ID: <address@hidden>
Content-Type: text/plain

Nicolas Richard <address@hidden> writes:

Hi Nico,

> Tassilo Horn <address@hidden> writes:
>> (setq TeX-command-list
>>       (remove '("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
>>               TeX-command-list))
>
> alternatively:
>
> (assq-delete-all
>  (car (assoc "Biber" TeX-command-list))
>  TeX-command-list)
>
> which can be easily changed for deleting other unwanted entries.

Oh, nice.  I didn't know `assq-delete-all'.  Hm, but the

  (car (assoc "Biber" TeX-command-list))

part is a bit confusing.  I understand that you have to do that because
`assq-delete-all' uses `eq' for comparison.

A function `assoc-delete-all' would be nice.

Bye,
Tassilo



------------------------------

Message: 5
Date: Thu, 17 Apr 2014 14:42:52 +0300
From: Joost Kremers <address@hidden>
To: address@hidden
Subject: Re: [AUCTeX] Remove Biber from TeX-command-list
Message-ID: <address@hidden>
Content-Type: text/plain


On Thu, Apr 17 2014, Nicolas Richard <address@hidden> wrote:
> Tassilo Horn <address@hidden> writes:
>> (setq TeX-command-list
>>       (remove '("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
>>               TeX-command-list))
>
> alternatively:
>
> (assq-delete-all
>  (car (assoc "Biber" TeX-command-list))
>  TeX-command-list)
>
> which can be easily changed for deleting other unwanted entries.

And it has the additional advantage that if the entry fro Biber in
TeX-command-list should change in a newer version of AUCTeX, it still
works.

Both methods have the disadvantage that AUCTeX needs to be loaded before
they can be applied. One way around this is to use the Customize
interface, but that also has the disadvantage that future changes to
TeX-command-list are not activated in your setup. (I ran into this issue
when I wanted to use Biber. Turned out I had a very old customisation of
TeX-command-list...)

So I guess eval-after-load is the best method:


(eval-after-load 'tex
  '(progn
     (assq-delete-all
      (car (assoc "Biber" TeX-command-list))
      TeX-command-list)))


--
Joost Kremers
Life has its moments




------------------------------

Message: 6
Date: Thu, 17 Apr 2014 13:48:37 +0200
From: Nicolas Richard <address@hidden>
To: Tassilo Horn <address@hidden>
Cc: address@hidden
Subject: Re: [AUCTeX] Remove Biber from TeX-command-list
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1

Hello Tassilo,

>> (assq-delete-all
>>  (car (assoc "Biber" TeX-command-list))
>>  TeX-command-list)
>>
>> which can be easily changed for deleting other unwanted entries.

I forgot to 'setq TeX-command-list' the result (truth is I thought it
was never necessary, but it is in some cases.)

> A function `assoc-delete-all' would be nice.

I think this is it :

(defun assoc-delete-all (key alist)
  (cl-remove-if
   (lambda (x)
     (equal key
            (car x)))
   alist))

dash.el has the "anaphoric" form
(require 'dash)
(--remove (equal (car it) key) alist)



--
Nico.



------------------------------

Message: 7
Date: Thu, 17 Apr 2014 13:58:42 +0200
From: Nicolas Richard <address@hidden>
To: Joost Kremers <address@hidden>
Cc: address@hidden
Subject: Re: [AUCTeX] Remove Biber from TeX-command-list
Message-ID: <address@hidden>
Content-Type: text/plain

Joost Kremers <address@hidden> writes:
> So I guess eval-after-load is the best method:
> (eval-after-load 'tex
>   '(progn
>      (assq-delete-all
>       (car (assoc "Biber" TeX-command-list))
>       TeX-command-list)))

FWIW I find John Wiegley's use-package very nice for these kind of
things.

Here's part of my setup:
(use-package tex
  :defer t
  :config
  (push '("Latexmk" "latexmk -f -interaction=nonstopmode %(latexmkmode) %t" TeX-run-TeX nil t
          :help "Run Latexmk on file")
        TeX-command-list)
  (dolist (i '("AmSTeX" "ConTeXt" "ConTeXt Full" "BibTeX" "Print" "Queue" "Index" "ChkTeX"))
    (setq TeX-command-list (assq-delete-all
                            (car (assoc i TeX-command-list))
                            TeX-command-list))))


--
Nico.



------------------------------

Message: 8
Date: Thu, 17 Apr 2014 14:35:51 +0200
From: Tassilo Horn <address@hidden>
To: Nicolas Richard <address@hidden>
Cc: address@hidden
Subject: Re: [AUCTeX] Remove Biber from TeX-command-list
Message-ID: <address@hidden>
Content-Type: text/plain

Nicolas Richard <address@hidden> writes:

>> A function `assoc-delete-all' would be nice.
>
> I think this is it :
>
> (defun assoc-delete-all (key alist)
>   (cl-remove-if
>    (lambda (x)
>      (equal key
>             (car x)))
>    alist))

To be equivalent with `assq-delete-all' which ignores non-cons elements,
you need something like

  (lambda (x)
    (and (consp x)
         (equal key (car x))))

as predicate.

Bye,
Tassilo



------------------------------

_______________________________________________
auctex mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/auctex


End of auctex Digest, Vol 110, Issue 4
**************************************


reply via email to

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