all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* natbib, emacs, & ispell
@ 2005-01-09  6:45 Leif Harcke
  2005-01-09 11:15 ` Peter Dyballa
  2005-01-09 11:41 ` Ralf Angeli
  0 siblings, 2 replies; 6+ messages in thread
From: Leif Harcke @ 2005-01-09  6:45 UTC (permalink / raw)


How does one get the ispell command in emacs to ignore the \citep and
\citet commands of the NatBib bibliography style package used in the
natural sciences?

thanks,
Leif

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: natbib, emacs, & ispell
  2005-01-09  6:45 natbib, emacs, & ispell Leif Harcke
@ 2005-01-09 11:15 ` Peter Dyballa
  2005-01-09 11:41 ` Ralf Angeli
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2005-01-09 11:15 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 09.01.2005 um 07:45 schrieb Leif Harcke:

> How does one get the ispell command in emacs to ignore the \citep and
> \citet commands of the NatBib bibliography style package used in the
> natural sciences?

Make it learn! Once ispell knows them as correct words it would read 
over them.

You too could create a new dictionary with all TeX related things and 
include it into the dictionary-alist.

--
Greetings

   Pete

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: natbib, emacs, & ispell
  2005-01-09  6:45 natbib, emacs, & ispell Leif Harcke
  2005-01-09 11:15 ` Peter Dyballa
@ 2005-01-09 11:41 ` Ralf Angeli
  2005-01-09 13:28   ` Lawrence Mitchell
  1 sibling, 1 reply; 6+ messages in thread
From: Ralf Angeli @ 2005-01-09 11:41 UTC (permalink / raw)


* Leif Harcke (2005-01-09) writes:

> How does one get the ispell command in emacs to ignore the \citep and
> \citet commands of the NatBib bibliography style package used in the
> natural sciences?

Hm, I thought this could be done like this:

(eval-after-load "ispell"
  (let ((list (car ispell-tex-skip-alists)))
    (add-to-list 'list '("\\\\cite[tp]" ispell-tex-arg-end))
    (setcar ispell-tex-skip-alists list)))

But in my case this actually results in an "invalid-function" error as
soon as one loads ispell.el e.g. with `M-x load-library RET ispell
RET'.

However, simply copying the value from the definition of
`ispell-tex-skip-alists', adapting it and using `setq' works, but is
not so nice of course.

Followup-To: gnu.emacs.help

-- 
Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: natbib, emacs, & ispell
  2005-01-09 11:41 ` Ralf Angeli
@ 2005-01-09 13:28   ` Lawrence Mitchell
  2005-01-09 13:35     ` Ralf Angeli
  2005-01-09 21:06     ` Leif Harcke
  0 siblings, 2 replies; 6+ messages in thread
From: Lawrence Mitchell @ 2005-01-09 13:28 UTC (permalink / raw)


Ralf Angeli wrote:

[...]

> (eval-after-load "ispell"
>   (let ((list (car ispell-tex-skip-alists)))
>     (add-to-list 'list '("\\\\cite[tp]" ispell-tex-arg-end))
>     (setcar ispell-tex-skip-alists list)))

> But in my case this actually results in an "invalid-function" error as
> soon as one loads ispell.el e.g. with `M-x load-library RET ispell
> RET'.

You need to quote the form in eval-after-load, as it's a function
not a macro, i.e.

(eval-after-load "ispell"
  '(let ((list (car ispell-tex-skip-alists)))
     (add-to-list 'list '("\\\\cite[tp]" ispell-tex-arg-end))
     (setcar ispell-tex-skip-alists list)))

-- 
Lawrence Mitchell <wence@gmx.li>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: natbib, emacs, & ispell
  2005-01-09 13:28   ` Lawrence Mitchell
@ 2005-01-09 13:35     ` Ralf Angeli
  2005-01-09 21:06     ` Leif Harcke
  1 sibling, 0 replies; 6+ messages in thread
From: Ralf Angeli @ 2005-01-09 13:35 UTC (permalink / raw)


* Lawrence Mitchell (2005-01-09) writes:

> You need to quote the form in eval-after-load, as it's a function
> not a macro, i.e.

Now I feel stupid. (c;  Thanks for the hint.

-- 
Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: natbib, emacs, & ispell
  2005-01-09 13:28   ` Lawrence Mitchell
  2005-01-09 13:35     ` Ralf Angeli
@ 2005-01-09 21:06     ` Leif Harcke
  1 sibling, 0 replies; 6+ messages in thread
From: Leif Harcke @ 2005-01-09 21:06 UTC (permalink / raw)


On Sun, 09 Jan 2005 13:28:23 +0000, Lawrence Mitchell wrote:
> (eval-after-load "ispell"
>   '(let ((list (car ispell-tex-skip-alists)))
>      (add-to-list 'list '("\\\\cite[tp]" ispell-tex-arg-end))
>      (setcar ispell-tex-skip-alists list)))

Works great!  Many thanks to Ralf and Lawrence.

-Leif

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-09 21:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-09  6:45 natbib, emacs, & ispell Leif Harcke
2005-01-09 11:15 ` Peter Dyballa
2005-01-09 11:41 ` Ralf Angeli
2005-01-09 13:28   ` Lawrence Mitchell
2005-01-09 13:35     ` Ralf Angeli
2005-01-09 21:06     ` Leif Harcke

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.