all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Flyspell error
@ 2009-08-01  0:06 sam jesse
  2009-08-01  7:29 ` Eli Zaretskii
  0 siblings, 1 reply; 35+ messages in thread
From: sam jesse @ 2009-08-01  0:06 UTC (permalink / raw
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

Hi
when I try to enable it, I get
Enabling Flyspell mode gave an error

GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-07 on SOFT-MJASON under
Windows XP.

how do I go about fixing this?

Thank you

[-- Attachment #2: Type: text/html, Size: 231 bytes --]

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

* Re: Flyspell error
  2009-08-01  0:06 Flyspell error sam jesse
@ 2009-08-01  7:29 ` Eli Zaretskii
  2009-08-01  8:53   ` sam jesse
       [not found]   ` <mailman.3635.1249129213.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 35+ messages in thread
From: Eli Zaretskii @ 2009-08-01  7:29 UTC (permalink / raw
  To: help-gnu-emacs

> Date: Sat, 1 Aug 2009 10:06:33 +1000
> From: sam jesse <revrvr@gmail.com>
> 
> when I try to enable it, I get
> Enabling Flyspell mode gave an error
> 
> GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-07 on SOFT-MJASON under
> Windows XP.
> 
> how do I go about fixing this?

Do you have ispell.exe or aspell.exe installed?  If not, install them
first.

If you already have them installed and they work from outside Emacs,
then set the variables debug-on-error and debug-on-signal to t and try
again.  You should get a backtrace with more details about where the
error happened.  If you cannot figure that out, post the backtrace
here.




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

* Re: Flyspell error
  2009-08-01  7:29 ` Eli Zaretskii
@ 2009-08-01  8:53   ` sam jesse
  2009-08-01 10:01     ` Eli Zaretskii
       [not found]     ` <mailman.3634.1249120899.2239.help-gnu-emacs@gnu.org>
       [not found]   ` <mailman.3635.1249129213.2239.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 35+ messages in thread
From: sam jesse @ 2009-08-01  8:53 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1476 bytes --]

do I need to install both? I already installed aspell and the trace I am
getting is:

Debugger entered--Lisp error: (file-error "Searching for program" "no such
file or directory" "ispell")
  call-process("ispell" nil t nil "-vv")
  apply(call-process ("ispell" nil t nil "-vv"))
  ispell-call-process("ispell" nil t nil "-vv")
  ispell-check-version()
  byte-code("숁\a" [nil (ispell-check-version) ((error))] 3)
  (defvar ispell-library-directory (byte-code "숁\a" [nil ... ...] 3)
("c:/Documents and Settings/emp1/My
Documents/emacs-22.3/lisp/textmodes/ispell.elc" . 25279))


also I have in my .emacs
(setq flyspell-mode t)
(setq debug-on-error t)
(setq debug-on-signal t)

On Sat, Aug 1, 2009 at 5:29 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sat, 1 Aug 2009 10:06:33 +1000
> > From: sam jesse <revrvr@gmail.com>
> >
> > when I try to enable it, I get
> > Enabling Flyspell mode gave an error
> >
> > GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-07 on SOFT-MJASON
> under
> > Windows XP.
> >
> > how do I go about fixing this?
>
> Do you have ispell.exe or aspell.exe installed?  If not, install them
> first.
>
> If you already have them installed and they work from outside Emacs,
> then set the variables debug-on-error and debug-on-signal to t and try
> again.  You should get a backtrace with more details about where the
> error happened.  If you cannot figure that out, post the backtrace
> here.
>
>
>

[-- Attachment #2: Type: text/html, Size: 2042 bytes --]

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

* Re: Flyspell error
  2009-08-01  8:53   ` sam jesse
@ 2009-08-01 10:01     ` Eli Zaretskii
       [not found]     ` <mailman.3634.1249120899.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 35+ messages in thread
From: Eli Zaretskii @ 2009-08-01 10:01 UTC (permalink / raw
  To: help-gnu-emacs

> Date: Sat, 1 Aug 2009 18:53:01 +1000
> From: sam jesse <revrvr@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> do I need to install both?

No.  aspell comes with a shell script called `ispell' to emulate Ispell.

> I already installed aspell and the trace I am getting is:
> 
> Debugger entered--Lisp error: (file-error "Searching for program" "no such
> file or directory" "ispell")
>   call-process("ispell" nil t nil "-vv")

Maybe the shell script is not compatible with Windows.  Do you have an
ispell.bat or ispell.cmd batch file as well?  If not, perhaps create a
batch file that does what the `ispell' shell script does, and you
should be set.

(I don't use aspell, so I cannot help you if the above doesn't resolve
the problem.)




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

* Re: Flyspell error
       [not found]     ` <mailman.3634.1249120899.2239.help-gnu-emacs@gnu.org>
@ 2009-08-01 10:13       ` Richard Riley
  0 siblings, 0 replies; 35+ messages in thread
From: Richard Riley @ 2009-08-01 10:13 UTC (permalink / raw
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Sat, 1 Aug 2009 18:53:01 +1000
>> From: sam jesse <revrvr@gmail.com>
>> Cc: help-gnu-emacs@gnu.org
>> 
>> do I need to install both?
>
> No.  aspell comes with a shell script called `ispell' to emulate Ispell.
>
>> I already installed aspell and the trace I am getting is:
>> 
>> Debugger entered--Lisp error: (file-error "Searching for program" "no such
>> file or directory" "ispell")
>>   call-process("ispell" nil t nil "-vv")
>
> Maybe the shell script is not compatible with Windows.  Do you have an
> ispell.bat or ispell.cmd batch file as well?  If not, perhaps create a
> batch file that does what the `ispell' shell script does, and you
> should be set.
>
> (I don't use aspell, so I cannot help you if the above doesn't resolve
> the problem.)
>
>

I didnt see the whole thread, but does he have:

(setq-default ispell-program-name "aspell")


` 


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

* Re: Flyspell error
       [not found]   ` <mailman.3635.1249129213.2239.help-gnu-emacs@gnu.org>
@ 2009-08-01 21:58     ` Xah Lee
  2009-08-02  7:10       ` sam jesse
       [not found]       ` <mailman.3687.1249222316.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 35+ messages in thread
From: Xah Lee @ 2009-08-01 21:58 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 1, 1:53 am, sam jesse <rev...@gmail.com> wrote:
> do I need to install both? I already installed aspell and the trace I am
> getting is:
>
> Debugger entered--Lisp error: (file-error "Searching for program" "no such
> file or directory" "ispell")
>   call-process("ispell" nil t nil "-vv")
>   apply(call-process ("ispell" nil t nil "-vv"))
>   ispell-call-process("ispell" nil t nil "-vv")
>   ispell-check-version()
>   byte-code("숁 " [nil (ispell-check-version) ((error))] 3)
>   (defvar ispell-library-directory (byte-code "숁 " [nil ... ...] 3)
> ("c:/Documents and Settings/emp1/My
> Documents/emacs-22.3/lisp/textmodes/ispell.elc" . 25279))
>
> also I have in my .emacs
> (setq flyspell-mode t)
> (setq debug-on-error t)
> (setq debug-on-signal t)

make sure ispell is in your windows path.

e.g. here's what i have in my init file:

(when (string-equal system-type "windows-nt")
  (progn
    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/
cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/
System32/Wbem")
(setq exec-path
'(
"C:/Program Files (x86)/Emacs/emacs/bin/"
"C:/Windows/system32/"
"C:/Windows/"
"C:/Windows/System32/Wbem/"
"C:/Windows/system32/WindowsPowerShell/v1.0/"
"C:/cygwin/bin/"
)
 )
    )
  )

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Flyspell error
  2009-08-01 21:58     ` Xah Lee
@ 2009-08-02  7:10       ` sam jesse
       [not found]       ` <mailman.3687.1249222316.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 35+ messages in thread
From: sam jesse @ 2009-08-02  7:10 UTC (permalink / raw
  To: Xah Lee; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1928 bytes --]

I installed Aspell and not Ispell.
I now have Start > Programs > Aspell ...
can I start this application on its own to see if it is working fine? it
does not seam to provide a short cut for running the application.
I seam to missing the bigger picture; why the error trace says ispell when I
have aspell installed, I have ispell.el and ispell.elc in
C:\Documents and Settings\emp1\My Documents\emacs-22.3\lisp\textmodes

On Sun, Aug 2, 2009 at 7:58 AM, Xah Lee <xahlee@gmail.com> wrote:

> On Aug 1, 1:53 am, sam jesse <rev...@gmail.com> wrote:
> > do I need to install both? I already installed aspell and the trace I am
> > getting is:
> >
> > Debugger entered--Lisp error: (file-error "Searching for program" "no
> such
> > file or directory" "ispell")
> >   call-process("ispell" nil t nil "-vv")
> >   apply(call-process ("ispell" nil t nil "-vv"))
> >   ispell-call-process("ispell" nil t nil "-vv")
> >   ispell-check-version()
> >   byte-code("숁 " [nil (ispell-check-version) ((error))] 3)
> >   (defvar ispell-library-directory (byte-code "숁 " [nil ... ...] 3)
> > ("c:/Documents and Settings/emp1/My
> > Documents/emacs-22.3/lisp/textmodes/ispell.elc" . 25279))
> >
> > also I have in my .emacs
> > (setq flyspell-mode t)
> > (setq debug-on-error t)
> > (setq debug-on-signal t)
>
> make sure ispell is in your windows path.
>
> e.g. here's what i have in my init file:
>
> (when (string-equal system-type "windows-nt")
>  (progn
>    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/
> cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/
> System32/Wbem")
> (setq exec-path
> '(
> "C:/Program Files (x86)/Emacs/emacs/bin/"
> "C:/Windows/system32/"
> "C:/Windows/"
> "C:/Windows/System32/Wbem/"
> "C:/Windows/system32/WindowsPowerShell/v1.0/"
> "C:/cygwin/bin/"
> )
>  )
>    )
>  )
>
>  Xah
> ∑ http://xahlee.org/
>
> ☄
>

[-- Attachment #2: Type: text/html, Size: 2738 bytes --]

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

* Re: Flyspell error
       [not found]       ` <mailman.3687.1249222316.2239.help-gnu-emacs@gnu.org>
@ 2009-08-02 20:02         ` Xah Lee
  2009-08-02 20:28           ` Richard Riley
  2009-08-02 21:21           ` Lennart Borgman
  0 siblings, 2 replies; 35+ messages in thread
From: Xah Lee @ 2009-08-02 20:02 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 2, 12:10 am, sam jesse <rev...@gmail.com> wrote:
> I installed Aspell and not Ispell.
> I now have Start > Programs > Aspell ...
> can I start this application on its own to see if it is working fine?

type Win+r, then launch cmd.exe.
cd to your aspell dir, then type aspell. It should run like that.

> it
> does not seam to provide a short cut for running the application.
> I seam to missing the bigger picture; why the error trace says ispell when I
> have aspell installed, I have ispell.el and ispell.elc in
> C:\Documents and Settings\emp1\My Documents\emacs-22.3\lisp\textmodes

you need to tell emacs that your spelling program is aspell not
ispell.

Richard Riley gave you this:

> I didnt see the whole thread, but does he have:
> (setq-default ispell-program-name "aspell")

however, i cant' find the var ispell-program-name in my emacs. Don't
want to spend time on this but there a var somewhere you need to set
about that. Best to read the emacs's doc on the spelling section for
good detail ... you know how to use emacs's info doc?

seems to me you are new to emacs?

if so, i'd suggest you download emacsW32 to begin with because that
distribution made things much easier for window users.

  Xah
∑ http://xahlee.org/> On Sun, Aug 2, 2009 at 7:58 AM, Xah Lee <xah...@gmail.com> wrote:
> > On Aug 1, 1:53 am, sam jesse <rev...@gmail.com> wrote:
> > > do I need to install both? I already installed aspell and the trace I am
> > > getting is:
>
> > > Debugger entered--Lisp error: (file-error "Searching for program" "no
> > such
> > > file or directory" "ispell")
> > >   call-process("ispell" nil t nil "-vv")
> > >   apply(call-process ("ispell" nil t nil "-vv"))
> > >   ispell-call-process("ispell" nil t nil "-vv")
> > >   ispell-check-version()
> > >   byte-code("숁 " [nil (ispell-check-version) ((error))] 3)
> > >   (defvar ispell-library-directory (byte-code "숁 " [nil ... ...] 3)
> > > ("c:/Documents and Settings/emp1/My
> > > Documents/emacs-22.3/lisp/textmodes/ispell.elc" . 25279))
>
> > > also I have in my .emacs
> > > (setq flyspell-mode t)
> > > (setq debug-on-error t)
> > > (setq debug-on-signal t)
>
> > make sure ispell is in your windows path.
>
> > e.g. here's what i have in my init file:
>
> > (when (string-equal system-type "windows-nt")
> >  (progn
> >    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/
> > cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/
> > System32/Wbem")
> > (setq exec-path
> > '(
> > "C:/Program Files (x86)/Emacs/emacs/bin/"
> > "C:/Windows/system32/"
> > "C:/Windows/"
> > "C:/Windows/System32/Wbem/"
> > "C:/Windows/system32/WindowsPowerShell/v1.0/"
> > "C:/cygwin/bin/"
> > )
> >  )
> >    )
> >  )


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

* Re: Flyspell error
  2009-08-02 20:02         ` Xah Lee
@ 2009-08-02 20:28           ` Richard Riley
  2009-08-03  0:08             ` Xah Lee
  2009-08-02 21:21           ` Lennart Borgman
  1 sibling, 1 reply; 35+ messages in thread
From: Richard Riley @ 2009-08-02 20:28 UTC (permalink / raw
  To: help-gnu-emacs

Xah Lee <xahlee@gmail.com> writes:

> On Aug 2, 12:10 am, sam jesse <rev...@gmail.com> wrote:
>> I installed Aspell and not Ispell.
>> I now have Start > Programs > Aspell ...
>> can I start this application on its own to see if it is working fine?
>
> type Win+r, then launch cmd.exe.
> cd to your aspell dir, then type aspell. It should run like that.
>
>> it
>> does not seam to provide a short cut for running the application.
>> I seam to missing the bigger picture; why the error trace says ispell when I
>> have aspell installed, I have ispell.el and ispell.elc in
>> C:\Documents and Settings\emp1\My Documents\emacs-22.3\lisp\textmodes
>
> you need to tell emacs that your spelling program is aspell not
> ispell.
>
> Richard Riley gave you this:
>
>> I didnt see the whole thread, but does he have:
>> (setq-default ispell-program-name "aspell")
>
> however, i cant' find the var ispell-program-name in my emacs. Don't

I'm not sure what you mean by "can't find".

http://www.emacswiki.org/emacs/InteractiveSpell

http://www.emacswiki.org/emacs/InteractiveSpell#toc5

,----
| You might be interested in using a different spell checker. In
| particular, Aspell is a fairly new replacement for much of Ispell’s
| functionality. Fortunately, using Aspell with Emacs is very easy:
| 
|     (setq ispell-program-name "aspell")
| 
| (Aspell has an Ispell-emulation mode, so it behaves like ispell.el
| expects.)
| 
| For lots more information on Aspell, see the Aspell website:
| 
|     * http://aspell.net/
| 
| Compared with Ispell, Aspell is much better at coming up with suggested
| spellings, and at putting them in likely order. This is particularly
| useful when used with flyspell-auto-correct-previous-word, where you can
| iterate through suggested spellings – it’s much more useful when the
| correct spelling is near the head of the list.
| 
| The problem with using aspell with flyspell is that in its default mode,
| it it a lot slower than ispell. Fortunately, you can tell it to speed
| up, though this reduces somewhat the quality of its suggestions. So try
| this:
| 
|     (setq ispell-program-name "aspell") (setq ispell-extra-args
|     '("--sug-mode=ultra"))
| 
| According to the aspell documentation, “ultra” is the fastest mode,
| which is still twice as slow as ispell; but I don’t notice the
| difference from ispell on my machine. If your machine is fast enough, a
| better option might be to try “fast” mode, which is twice as slow as
| “ultra”, but more accurate. The “normal” mode, which is the aspell
| default, is even more accurate, but is reportedly 10 times slower than
| “fast” mode, and on my machine it makes editing and motion around the
| buffer noticeably sluggish when in flyspell-mode. YMMV, depending on how
| fast your machine is, and how big your word-lists are.
`----


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

* Re: Flyspell error
  2009-08-02 20:02         ` Xah Lee
  2009-08-02 20:28           ` Richard Riley
@ 2009-08-02 21:21           ` Lennart Borgman
  1 sibling, 0 replies; 35+ messages in thread
From: Lennart Borgman @ 2009-08-02 21:21 UTC (permalink / raw
  To: Xah Lee; +Cc: help-gnu-emacs

On Sun, Aug 2, 2009 at 10:02 PM, Xah Lee<xahlee@gmail.com> wrote:
> Richard Riley gave you this:
>
>> I didnt see the whole thread, but does he have:
>> (setq-default ispell-program-name "aspell")
>
> however, i cant' find the var ispell-program-name in my emacs. Don't


It is in ispell.el, if you do (require 'ispell) first you can see it.

Perhaps it should be autoloaded.




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

* Re: Flyspell error
  2009-08-02 20:28           ` Richard Riley
@ 2009-08-03  0:08             ` Xah Lee
  2009-08-03  0:10               ` Xah Lee
  0 siblings, 1 reply; 35+ messages in thread
From: Xah Lee @ 2009-08-03  0:08 UTC (permalink / raw
  To: help-gnu-emacs

Lennart Borgman answered the question. Thanks.

for me, i use speck.el, which i find better than ispell based flyspell-
* etc.

 Xah

On Aug 2, 1:28 pm, Richard Riley <rileyrg...@gmail.com> wrote:
> Xah Lee <xah...@gmail.com> writes:
> > On Aug 2, 12:10 am, sam jesse <rev...@gmail.com> wrote:
> >> I installed Aspell and not Ispell.
> >> I now have Start > Programs > Aspell ...
> >> can I start this application on its own to see if it is working fine?
>
> > type Win+r, then launch cmd.exe.
> > cd to your aspell dir, then type aspell. It should run like that.
>
> >> it
> >> does not seam to provide a short cut for running the application.
> >> I seam to missing the bigger picture; why the error trace says ispell when I
> >> have aspell installed, I have ispell.el and ispell.elc in
> >> C:\Documents and Settings\emp1\My Documents\emacs-22.3\lisp\textmodes
>
> > you need to tell emacs that your spelling program is aspell not
> > ispell.
>
> > Richard Riley gave you this:
>
> >> I didnt see the whole thread, but does he have:
> >> (setq-default ispell-program-name "aspell")
>
> > however, i cant' find the var ispell-program-name in my emacs. Don't
>
> I'm not sure what you mean by "can't find".
>
> http://www.emacswiki.org/emacs/InteractiveSpell
>
> http://www.emacswiki.org/emacs/InteractiveSpell#toc5
>
> ,----
> | You might be interested in using a different spell checker. In
> | particular, Aspell is a fairly new replacement for much of Ispell’s
> | functionality. Fortunately, using Aspell with Emacs is very easy:
> |
> |     (setq ispell-program-name "aspell")
> |
> | (Aspell has an Ispell-emulation mode, so it behaves like ispell.el
> | expects.)
> |
> | For lots more information on Aspell, see the Aspell website:
> |
> |     *http://aspell.net/
> |
> | Compared with Ispell, Aspell is much better at coming up with suggested
> | spellings, and at putting them in likely order. This is particularly
> | useful when used with flyspell-auto-correct-previous-word, where you can
> | iterate through suggested spellings – it’s much more useful when the
> | correct spelling is near the head of the list.
> |
> | The problem with using aspell with flyspell is that in its default mode,
> | it it a lot slower than ispell. Fortunately, you can tell it to speed
> | up, though this reduces somewhat the quality of its suggestions. So try
> | this:
> |
> |     (setq ispell-program-name "aspell") (setq ispell-extra-args
> |     '("--sug-mode=ultra"))
> |
> | According to the aspell documentation, “ultra” is the fastest mode,
> | which is still twice as slow as ispell; but I don’t notice the
> | difference from ispell on my machine. If your machine is fast enough, a
> | better option might be to try “fast” mode, which is twice as slow as
> | “ultra”, but more accurate. The “normal” mode, which is the aspell
> | default, is even more accurate, but is reportedly 10 times slower than
> | “fast” mode, and on my machine it makes editing and motion around the
> | buffer noticeably sluggish when in flyspell-mode. YMMV, depending on how
> | fast your machine is, and how big your word-lists are.
> `----


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

* Re: Flyspell error
  2009-08-03  0:08             ` Xah Lee
@ 2009-08-03  0:10               ` Xah Lee
  2009-08-03 20:51                 ` sam jesse
  0 siblings, 1 reply; 35+ messages in thread
From: Xah Lee @ 2009-08-03  0:10 UTC (permalink / raw
  To: help-gnu-emacs

btw, recently someone posted a question about how to use hunspell.

I'd very much interested in that... i did some 1 hour research on
wikipedia about this in the past month... hunspell seems to be the
best one and used in opera, firefox etc.

anyone has tried to make it work with emacs?

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Flyspell error
  2009-08-03  0:10               ` Xah Lee
@ 2009-08-03 20:51                 ` sam jesse
  2009-08-03 20:54                   ` sam jesse
                                     ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: sam jesse @ 2009-08-03 20:51 UTC (permalink / raw
  To: Xah Lee; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

I am still trying to fix my spelling feature in emacs running on my windows
XP.
when I hit M-$ I get

Starting new Ispell process [default] ...
apply: Searching for program: no such file or directory, aspell

in the trace.

I can run aspell from
C:\Program Files\Aspell\bin>

I have
"C:/Program Files/Aspell" "C:/Program Files/Aspell/bin"
in my load-path

and also I have aspell as the value of the variable ispell-program-name

what am I missing?


On Mon, Aug 3, 2009 at 10:10 AM, Xah Lee <xahlee@gmail.com> wrote:

> btw, recently someone posted a question about how to use hunspell.
>
> I'd very much interested in that... i did some 1 hour research on
> wikipedia about this in the past month... hunspell seems to be the
> best one and used in opera, firefox etc.
>
> anyone has tried to make it work with emacs?
>
>  Xah
> ∑ http://xahlee.org/
>
> ☄
>

[-- Attachment #2: Type: text/html, Size: 1293 bytes --]

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

* Re: Flyspell error
  2009-08-03 20:51                 ` sam jesse
@ 2009-08-03 20:54                   ` sam jesse
  2009-08-03 22:21                   ` Xah Lee
       [not found]                   ` <mailman.3801.1249343719.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 35+ messages in thread
From: sam jesse @ 2009-08-03 20:54 UTC (permalink / raw
  To: Xah Lee; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]

here is what I get in the trace

Debugger entered--Lisp error: (file-error "Searching for program" "no such
file or directory" "aspell")
  call-process("aspell" nil t nil "-v")
  apply(call-process ("aspell" nil t nil "-v"))
  ispell-call-process("aspell" nil t nil "-v")
  ispell-check-version()


On Tue, Aug 4, 2009 at 6:51 AM, sam jesse <revrvr@gmail.com> wrote:

> I am still trying to fix my spelling feature in emacs running on my windows
> XP.
> when I hit M-$ I get
>
> Starting new Ispell process [default] ...
> apply: Searching for program: no such file or directory, aspell
>
> in the trace.
>
> I can run aspell from
> C:\Program Files\Aspell\bin>
>
> I have
> "C:/Program Files/Aspell" "C:/Program Files/Aspell/bin"
> in my load-path
>
> and also I have aspell as the value of the variable ispell-program-name
>
> what am I missing?
>
>
>
> On Mon, Aug 3, 2009 at 10:10 AM, Xah Lee <xahlee@gmail.com> wrote:
>
>> btw, recently someone posted a question about how to use hunspell.
>>
>> I'd very much interested in that... i did some 1 hour research on
>> wikipedia about this in the past month... hunspell seems to be the
>> best one and used in opera, firefox etc.
>>
>> anyone has tried to make it work with emacs?
>>
>>  Xah
>> ∑ http://xahlee.org/
>>
>> ☄
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2100 bytes --]

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

* Re: Flyspell error
  2009-08-03 20:51                 ` sam jesse
  2009-08-03 20:54                   ` sam jesse
@ 2009-08-03 22:21                   ` Xah Lee
  2009-08-03 23:12                     ` sam jesse
       [not found]                   ` <mailman.3801.1249343719.2239.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 35+ messages in thread
From: Xah Lee @ 2009-08-03 22:21 UTC (permalink / raw
  To: sam jesse; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 2959 bytes --]

Sam,

load-path is not relevant. The relevant vars discussed is exec-path and the
PATH env var.

exec-path in emacs is the var that tells emacs which paths to search to
locate external programs.

The PATH env var serves similar function in the OS's shell. It must be set
correctly.

But also, emacs also needs to use the OS's PATH env var, and must inherited
it correctly, as emacs does not always inherit it correctly due to various
complications such as where or how you launched emacs, OS differences, etc.

Emacs's load-path is a set of paths for emacs to locate elisp files. It is
irrevalent here.

i gave code in previous message on how you set exec-path and PATH.

you gotta pay attention to details here if you want to use emacs.

PS but note to emacs developers, it'd be really good to god damn include the
essential unix utils as used by emacs. Their executable are tiny by today's
standards, and saves huge amount of headache. In particular, spell checking
is essential to emacs. On linuxes, all's peach n cream. But unfortunately,
linux is used by minority however you count it. On OS X, it's also a pain
with spell checking, as there are lots questions about getting it to work or
how to use OS X's bundled spell checker that's far superior, yet nigh
impossible to get emacs to use. On Windows, getting spell checking to work
is a pain in the ass. Not possible unless you have fair degree of sys admin
expertise and some emacs know how about all the path vars and mechanisms,
AND, have the time to tech geek for fucking hours to get it to work
(installing cygwin, dig into cygwin's interactions with OS, sundries minor
compatibility issues, researching MinWGW and alternative unix binaries for
Windows, dig into online forums ... ). Spell checking works out of the box
on any commercial editor today.

  Xah
∑ http://xahlee.org/

☄


On Mon, Aug 3, 2009 at 1:51 PM, sam jesse <revrvr@gmail.com> wrote:

> I am still trying to fix my spelling feature in emacs running on my windows
> XP.
> when I hit M-$ I get
>
> Starting new Ispell process [default] ...
> apply: Searching for program: no such file or directory, aspell
>
> in the trace.
>
> I can run aspell from
> C:\Program Files\Aspell\bin>
>
> I have
> "C:/Program Files/Aspell" "C:/Program Files/Aspell/bin"
> in my load-path
>
> and also I have aspell as the value of the variable ispell-program-name
>
> what am I missing?
>
>
> On Mon, Aug 3, 2009 at 10:10 AM, Xah Lee <xahlee@gmail.com> wrote:
>
>> btw, recently someone posted a question about how to use hunspell.
>>
>> I'd very much interested in that... i did some 1 hour research on
>> wikipedia about this in the past month... hunspell seems to be the
>> best one and used in opera, firefox etc.
>>
>> anyone has tried to make it work with emacs?
>>
>>  Xah
>> ∑ http://xahlee.org/
>>
>> ☄
>>
>
>


-- 
 Xah
∑ http://xahlee.org/

[-- Attachment #2: Type: text/html, Size: 3985 bytes --]

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

* Re: Flyspell error
  2009-08-03 22:21                   ` Xah Lee
@ 2009-08-03 23:12                     ` sam jesse
  0 siblings, 0 replies; 35+ messages in thread
From: sam jesse @ 2009-08-03 23:12 UTC (permalink / raw
  To: xahlee; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 3695 bytes --]

Thanks for giving a wider picture for what is going on.
let me first fix the PATH.

I noticed when I fired up cmd.exe and type aspell that it says
"aspell is not recognized as internal or external command",

so I went to the OS env var and added the location of aspell to the path
like this ";C:\Program Files\Aspell\bin\" with out the (""), since this is
the location I have to go to to fire up aspell. but when I go back to my
C:\Documents and Settings\unsername> and typ aspell, it still gives me the
same error as above.


On Tue, Aug 4, 2009 at 8:21 AM, Xah Lee <xahlee@gmail.com> wrote:

> Sam,
>
> load-path is not relevant. The relevant vars discussed is exec-path and the
> PATH env var.
>
> exec-path in emacs is the var that tells emacs which paths to search to
> locate external programs.
>
> The PATH env var serves similar function in the OS's shell. It must be set
> correctly.
>
> But also, emacs also needs to use the OS's PATH env var, and must inherited
> it correctly, as emacs does not always inherit it correctly due to various
> complications such as where or how you launched emacs, OS differences, etc.
>
> Emacs's load-path is a set of paths for emacs to locate elisp files. It is
> irrevalent here.
>
> i gave code in previous message on how you set exec-path and PATH.
>
> you gotta pay attention to details here if you want to use emacs.
>
> PS but note to emacs developers, it'd be really good to god damn include
> the essential unix utils as used by emacs. Their executable are tiny by
> today's standards, and saves huge amount of headache. In particular, spell
> checking is essential to emacs. On linuxes, all's peach n cream. But
> unfortunately, linux is used by minority however you count it. On OS X, it's
> also a pain with spell checking, as there are lots questions about getting
> it to work or how to use OS X's bundled spell checker that's far superior,
> yet nigh impossible to get emacs to use. On Windows, getting spell checking
> to work is a pain in the ass. Not possible unless you have fair degree of
> sys admin expertise and some emacs know how about all the path vars and
> mechanisms, AND, have the time to tech geek for fucking hours to get it to
> work (installing cygwin, dig into cygwin's interactions with OS, sundries
> minor compatibility issues, researching MinWGW and alternative unix binaries
> for Windows, dig into online forums ... ). Spell checking works out of the
> box on any commercial editor today.
>
>   Xah
> ∑ http://xahlee.org/
>
> ☄
>
>
> On Mon, Aug 3, 2009 at 1:51 PM, sam jesse <revrvr@gmail.com> wrote:
>
>> I am still trying to fix my spelling feature in emacs running on my
>> windows XP.
>> when I hit M-$ I get
>>
>> Starting new Ispell process [default] ...
>> apply: Searching for program: no such file or directory, aspell
>>
>> in the trace.
>>
>> I can run aspell from
>> C:\Program Files\Aspell\bin>
>>
>> I have
>> "C:/Program Files/Aspell" "C:/Program Files/Aspell/bin"
>> in my load-path
>>
>> and also I have aspell as the value of the variable ispell-program-name
>>
>> what am I missing?
>>
>>
>> On Mon, Aug 3, 2009 at 10:10 AM, Xah Lee <xahlee@gmail.com> wrote:
>>
>>> btw, recently someone posted a question about how to use hunspell.
>>>
>>> I'd very much interested in that... i did some 1 hour research on
>>> wikipedia about this in the past month... hunspell seems to be the
>>> best one and used in opera, firefox etc.
>>>
>>> anyone has tried to make it work with emacs?
>>>
>>>  Xah
>>> ∑ http://xahlee.org/
>>>
>>> ☄
>>>
>>
>>
>
>
> --
>  Xah
> ∑ http://xahlee.org/
>

[-- Attachment #2: Type: text/html, Size: 5005 bytes --]

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

* Re: Flyspell error
       [not found]                   ` <mailman.3801.1249343719.2239.help-gnu-emacs@gnu.org>
@ 2009-08-04  2:17                     ` Xah Lee
  2009-08-04  4:44                       ` sam jesse
  0 siblings, 1 reply; 35+ messages in thread
From: Xah Lee @ 2009-08-04  2:17 UTC (permalink / raw
  To: help-gnu-emacs

ok, first make sure the PATH env var in your Windows is setup
correctly.

some tips here

• Using PowerShell to Manage Environment Variables
  http://xahlee.org/powershell/environment_variables.html

then, restart your cmd.exe (by just closing it).
After restart, type

echo %PATH%

e.g. on my machine shows:

C:\Users\xah>echo %PATH%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\hp\bin
\Python;c:\Prog
ram Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files
(x86)\Quic
kTime\QTSystem\;C:\Windows\system32\WindowsPowerShell\v1.0\

Once you got this, then type aspell from any dir and see it works.
You need to get this step fixed.

Once good, launch emacs, then in emacs, type Alt+x shell or Alt+x cmd-
shell (the latter is in emacsW32, not sure if it is in other emacs on
Windows)

then type
echo %PATH%

the output should match the same as in your cmd.exe. If not, try the
set paths elisp code:

(when (string-equal system-type "windows-nt")
  (progn
    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/
cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/
System32/Wbem")
    (setq exec-path
          '(
            "C:/Program Files (x86)/Emacs/emacs/bin/"
            "C:/Windows/system32/"
            "C:/Windows/"
            "C:/Windows/System32/Wbem/"
            "C:/Windows/system32/WindowsPowerShell/v1.0/"
            "C:/cygwin/bin/"
            )
          )
    )
  )

mod the path for your machine and put it in your emacs init file.
Select the code, then type Alt+x eval-region.

Now, close your shell buffer. Start it again. Try
echo %PATH%

again.
If good, type aspell while in emacs's cmd shell. It should run. If so,
hten you should be have spell checking in emacs now.

--------

on my machine, i have the above in my init file, but often the env var
PATH shown in emacs is still different from OS's PATH value. This
causes running SOME of the unix commands to fail. I haven't
investigated why yet, but i workaround by eval that code again in
emacs whenever that happens ....

nor do i know what exactly is the diff between exec-path and setenv
with PATH...

... spent way too much time writing this. Good luck.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Flyspell error
  2009-08-04  2:17                     ` Xah Lee
@ 2009-08-04  4:44                       ` sam jesse
  2009-08-04 17:34                         ` suvayu ali
                                           ` (3 more replies)
  0 siblings, 4 replies; 35+ messages in thread
From: sam jesse @ 2009-08-04  4:44 UTC (permalink / raw
  To: Xah Lee; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 3828 bytes --]

Thanks a lot for write this.
I followed through, the problem I am having is that the echo %PATH% output
is not the same in the cmd.exe vs. the emacs shell.

here is the modified code in my .emacs.

***********************************************************

(when (string-equal system-type "windows-nt")
 (progn
   (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin")
(setq exec-path
'(
"C:/Windows/system32/"
"C:/Windows/"
"C:/Windows/System32/Wbem/"
"C:/Windows/system32/WindowsPowerShell/v1.0/"
"C:/Program Files/Aspell/bin/"
)
 )
   )
 )

***********************************************************
I have a feeling there is something not write with my modification above.
Aspell is installed under "C:/Program Files/

cmd.exe > echo %PATH% puts out

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\QuickTime\QTSystem\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program
Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL
Server\100\DTS\Binn\;c:\Program Files\Microsoft SQL
Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Aspell\bin\

emacs shell echo %PATH% puts out

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/


should I copy the output from the cmd and put it in the code inside my
.emacs?



On Tue, Aug 4, 2009 at 12:17 PM, Xah Lee <xahlee@gmail.com> wrote:

> ok, first make sure the PATH env var in your Windows is setup
> correctly.
>
> some tips here
>
> • Using PowerShell to Manage Environment Variables
>  http://xahlee.org/powershell/environment_variables.html
>
> then, restart your cmd.exe (by just closing it).
> After restart, type
>
> echo %PATH%
>
> e.g. on my machine shows:
>
> C:\Users\xah>echo %PATH%
> C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\hp\bin
> \Python;c:\Prog
> ram Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files
> (x86)\Quic
> kTime\QTSystem\;C:\Windows\system32\WindowsPowerShell\v1.0\
>
> Once you got this, then type aspell from any dir and see it works.
> You need to get this step fixed.
>
> Once good, launch emacs, then in emacs, type Alt+x shell or Alt+x cmd-
> shell (the latter is in emacsW32, not sure if it is in other emacs on
> Windows)
>
> then type
> echo %PATH%
>
> the output should match the same as in your cmd.exe. If not, try the
> set paths elisp code:
>
> (when (string-equal system-type "windows-nt")
>  (progn
>    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/
> cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/
> System32/Wbem")
>    (setq exec-path
>          '(
>            "C:/Program Files (x86)/Emacs/emacs/bin/"
>            "C:/Windows/system32/"
>            "C:/Windows/"
>            "C:/Windows/System32/Wbem/"
>            "C:/Windows/system32/WindowsPowerShell/v1.0/"
>            "C:/cygwin/bin/"
>            )
>          )
>    )
>  )
>
> mod the path for your machine and put it in your emacs init file.
> Select the code, then type Alt+x eval-region.
>
> Now, close your shell buffer. Start it again. Try
> echo %PATH%
>
> again.
> If good, type aspell while in emacs's cmd shell. It should run. If so,
> hten you should be have spell checking in emacs now.
>
> --------
>
> on my machine, i have the above in my init file, but often the env var
> PATH shown in emacs is still different from OS's PATH value. This
> causes running SOME of the unix commands to fail. I haven't
> investigated why yet, but i workaround by eval that code again in
> emacs whenever that happens ....
>
> nor do i know what exactly is the diff between exec-path and setenv
> with PATH...
>
> ... spent way too much time writing this. Good luck.
>
>  Xah
> ∑ http://xahlee.org/
>
> ☄
>

[-- Attachment #2: Type: text/html, Size: 4777 bytes --]

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

* Re: Flyspell error
  2009-08-04  4:44                       ` sam jesse
@ 2009-08-04 17:34                         ` suvayu ali
  2009-08-04 18:10                         ` Eli Zaretskii
                                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 35+ messages in thread
From: suvayu ali @ 2009-08-04 17:34 UTC (permalink / raw
  To: help-gnu-emacs

2009/8/3 sam jesse <revrvr@gmail.com>:
> Thanks a lot for write this.
> I followed through, the problem I am having is that the echo %PATH% output
> is not the same in the cmd.exe vs. the emacs shell.
>
> here is the modified code in my .emacs.
>
> ***********************************************************
>
> (when (string-equal system-type "windows-nt")
>  (progn
>    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin")

I am an emacs newbie, so take everything I write with a grain of salt.
The path value quoted above looks valid for a *nix system not XP.

> should I copy the output from the cmd and put it in the code inside my
> .emacs?
>

Since you are on XP that would be a reasonable thing to try.

-- 
Suvayu

Open source is the future. It sets us free.




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

* Re: Flyspell error
  2009-08-04  4:44                       ` sam jesse
  2009-08-04 17:34                         ` suvayu ali
@ 2009-08-04 18:10                         ` Eli Zaretskii
       [not found]                         ` <mailman.3862.1249407393.2239.help-gnu-emacs@gnu.org>
       [not found]                         ` <mailman.3868.1249409494.2239.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 35+ messages in thread
From: Eli Zaretskii @ 2009-08-04 18:10 UTC (permalink / raw
  To: help-gnu-emacs

> Date: Tue, 4 Aug 2009 14:44:33 +1000
> From: sam jesse <revrvr@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> (when (string-equal system-type "windows-nt")
>  (progn
>    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin")

Huh? why do you set PATH to a Unixy value when you are on a Windows
machine?

You should instead set PATH to the same value you set exec-path (only
not as a Lisp list):

> (setq exec-path
> '(
> "C:/Windows/system32/"
> "C:/Windows/"
> "C:/Windows/System32/Wbem/"
> "C:/Windows/system32/WindowsPowerShell/v1.0/"
> "C:/Program Files/Aspell/bin/"

> emacs shell echo %PATH% puts out
> 
> /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/

Of course! because that's what you set it to, above.




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

* Re: Flyspell error
       [not found]                         ` <mailman.3862.1249407393.2239.help-gnu-emacs@gnu.org>
@ 2009-08-04 18:57                           ` Xah Lee
  0 siblings, 0 replies; 35+ messages in thread
From: Xah Lee @ 2009-08-04 18:57 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 4, 10:34 am, suvayu ali <fatkasuvayu+li...@gmail.com> wrote:
> 2009/8/3 sam jesse <rev...@gmail.com>:
>
> > Thanks a lot for write this.
> > I followed through, the problem I am having is that the echo %PATH% output
> > is not the same in the cmd.exe vs. the emacs shell.
>
> > here is the modified code in my .emacs.
>
> > ***********************************************************
>
> > (when (string-equal system-type "windows-nt")
> >  (progn
> >    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin")
>
> I am an emacs newbie, so take everything I write with a grain of salt.
> The path value quoted above looks valid for a *nix system not XP.
>
> > should I copy the output from the cmd and put it in the code inside my
> > .emacs?
>
> Since you are on XP that would be a reasonable thing to try.

Thanks for catching that.

i set my PATH in my Windows emacs to unix paths because i'm mostly
using cygwin shell inside emacs...

i still need to do some study on the various paths to have a some sort
of more universal setup, so that i should be able to invoke cygwin or
Windows commands in all of emacs interactive shells: shell, cmd-shell,
powershell... as of now, am not sure that's even desirable... i guess
i needs to understand more about how these shells relates to each
other technically outside of emacs first... the path separator issue
of / vs \ and their automatic conversion in different shells has also
been a pain... in all shells (cygwin bash, cmd.exe, PowerShell) they
all have automatic conversion as you use the shell, but when you write
scripts or set paths, you can't arbitrarily use / or \ (even if
properly quoted in string), the rule for the omission of drive letter
is also a complex issue, and cygwin has some rather esoteric
mechanisms to map drives (e.g. in cygwin bash, “/cygdrive/c” maps to
“C:\”) ...

 Xah


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

* Re: Flyspell error
       [not found]                         ` <mailman.3868.1249409494.2239.help-gnu-emacs@gnu.org>
@ 2009-08-04 19:02                           ` Xah Lee
  2009-08-04 21:29                             ` sam jesse
                                               ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: Xah Lee @ 2009-08-04 19:02 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 4, 11:10 am, Eli Zaretskii <e...@gnu.org> wrote:
> > Date: Tue, 4 Aug 2009 14:44:33 +1000
> > From: sam jesse <rev...@gmail.com>
> > Cc: help-gnu-em...@gnu.org
>
> > (when (string-equal system-type "windows-nt")
> >  (progn
> >    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin")
>
> Huh? why do you set PATH to a Unixy value when you are on a Windows
> machine?

my bad... am using cygwin.

> You should instead set PATH to the same value you set exec-path (only
> not as a Lisp list):

so the setenv PATH is equivalent to just setq exec-path? this is great
to know.

 Xah

> > (setq exec-path
> > '(
> > "C:/Windows/system32/"
> > "C:/Windows/"
> > "C:/Windows/System32/Wbem/"
> > "C:/Windows/system32/WindowsPowerShell/v1.0/"
> > "C:/Program Files/Aspell/bin/"
> > emacs shell echo %PATH% puts out
>
> > /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/
>
> Of course! because that's what you set it to, above.



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

* Re: Flyspell error
  2009-08-04 19:02                           ` Xah Lee
@ 2009-08-04 21:29                             ` sam jesse
  2009-08-04 22:06                             ` setevn PATH vs exec-path [was Re: Flyspell error] Xah Lee
       [not found]                             ` <mailman.3916.1249445924.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 35+ messages in thread
From: sam jesse @ 2009-08-04 21:29 UTC (permalink / raw
  To: Xah Lee; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]

I tried to put
(when (string-equal system-type "windows-nt")
  (progn
     (setenv "PATH"
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\QuickTime\QTSystem\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program
Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL
Server\100\DTS\Binn\;c:\Program Files\Microsoft SQL
Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Aspell\bin\
.
.
.

do I need to replace \ with /?
do I need to replace ; with :? and if so, what about the : after the C?
this setenv, does it modify the PATH in my OS? if so, do I need to be logged
in with admin account? and if I do modify it, does it effect my other
programs in my windows XP?
I read the setenv and getenv but could not figure out the above.
why setenv PATH when there is setq exec-path?



On Wed, Aug 5, 2009 at 5:02 AM, Xah Lee <xahlee@gmail.com> wrote:

> On Aug 4, 11:10 am, Eli Zaretskii <e...@gnu.org> wrote:
> > > Date: Tue, 4 Aug 2009 14:44:33 +1000
> > > From: sam jesse <rev...@gmail.com>
> > > Cc: help-gnu-em...@gnu.org
> >
> > > (when (string-equal system-type "windows-nt")
> > >  (progn
> > >    (setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin")
> >
> > Huh? why do you set PATH to a Unixy value when you are on a Windows
> > machine?
>
> my bad... am using cygwin.
>
> > You should instead set PATH to the same value you set exec-path (only
> > not as a Lisp list):
>
> so the setenv PATH is equivalent to just setq exec-path? this is great
> to know.
>
>  Xah
>
> > > (setq exec-path
> > > '(
> > > "C:/Windows/system32/"
> > > "C:/Windows/"
> > > "C:/Windows/System32/Wbem/"
> > > "C:/Windows/system32/WindowsPowerShell/v1.0/"
> > > "C:/Program Files/Aspell/bin/"
> > > emacs shell echo %PATH% puts out
> >
> > > /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/
> >
> > Of course! because that's what you set it to, above.
>
>

[-- Attachment #2: Type: text/html, Size: 2905 bytes --]

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

* setevn PATH vs exec-path [was Re: Flyspell error]
  2009-08-04 19:02                           ` Xah Lee
  2009-08-04 21:29                             ` sam jesse
@ 2009-08-04 22:06                             ` Xah Lee
  2009-08-05  5:52                               ` Lennart Borgman
                                                 ` (3 more replies)
       [not found]                             ` <mailman.3916.1249445924.2239.help-gnu-emacs@gnu.org>
  2 siblings, 4 replies; 35+ messages in thread
From: Xah Lee @ 2009-08-04 22:06 UTC (permalink / raw
  To: help-gnu-emacs

spent some time to study the diff between (setenv "PATH" ...) vs (setq
exec-path ...).

Their docs are here:

• System Environment - GNU Emacs Lisp Reference Manual
  http://xahlee.org/elisp/System-Environment.html
  (info "(elisp) System Environment")

• Subprocess Creation - GNU Emacs Lisp Reference Manual
  http://xahlee.org/elisp/Subprocess-Creation.html
  (info "(elisp) Subprocess Creation")


in summary:

“setenv” is for setting OS env vars within emacs. Unixes and Windows
both have env vars. Env vars are global info available to processes
(apps). A process is free to use the info in env var. Some env var are
important as they contain system info such as Windows WINDIR that
contains OS path, and PATH in both Windows and unixes that specify
program paths. Many are config items such as HOME dir in unix and
Windows, and “locale” in unixes. When a process launchs, it inherits
(have access) to all the env vars where the process is launched.

emacs uses the system's env var just like other apps, but more
importantly, emacs shells are interfaces to OS's shells, so as a sys
admin or programer who uses emacs, you want to be able to config
system's env vars as seen in shell within emacs when emacs startup a
shell. (this is done with emacs commands “setenv” and “getenv”, which
are wrappers that manipulate emacs's process-environment var.)

Emacs's “exec-path” var is actually the var emacs uses to locate
external programs. Here's a quote: «Emacs initializes exec-path when
it starts up, based on the value of the environment variable PATH.»

So, the system's PATH env var and emacs exec-path needs not to be the
same, and ideally their values probably shouldn't be identical if one
is a control freak, since they serve different purposes.

The value for exec-path is important to emacs in locating programs,
while the PATH system env var is more important in using emacs as a
shell.

so, judging from all i know, getting aspell to work in emacs means
exec-path should contain the path to aspell. Since emacs set exec-path
to system's PATH env var when it starts, thus setting aspell path in
OS's PATH env var should work too.

Ok. Great to have studied this at least a bit now.

btw, on Windows emacsW23, it has cmd-shell. Is this particular to
emacsW23 or is it in GNU Emacs's Windows branch?

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: setevn PATH vs exec-path [was Re: Flyspell error]
  2009-08-04 22:06                             ` setevn PATH vs exec-path [was Re: Flyspell error] Xah Lee
@ 2009-08-05  5:52                               ` Lennart Borgman
       [not found]                               ` <mailman.3919.1249451575.2239.help-gnu-emacs@gnu.org>
                                                 ` (2 subsequent siblings)
  3 siblings, 0 replies; 35+ messages in thread
From: Lennart Borgman @ 2009-08-05  5:52 UTC (permalink / raw
  To: Xah Lee; +Cc: help-gnu-emacs

On Wed, Aug 5, 2009 at 12:06 AM, Xah Lee<xahlee@gmail.com> wrote:

> btw, on Windows emacsW23, it has cmd-shell. Is this particular to
> emacsW23 or is it in GNU Emacs's Windows branch?

w32shell.el (where cmd-shell lives) contains wrappers for the "shell"
function that comes with Emacs itself.

The purpose of it is to make it more easy to switch between uing cmd,
Cygwin, MSYS etc as the shell program in command shell. (The name is a
bit unfortunate. I did not know it was so hard to get additions like
this into Emacs so I choose something that could fit Emacs.)




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

* Re: Flyspell error
       [not found]                             ` <mailman.3916.1249445924.2239.help-gnu-emacs@gnu.org>
@ 2009-08-05  7:03                               ` Xah Lee
  2009-08-05  7:07                               ` Anselm Helbig
  1 sibling, 0 replies; 35+ messages in thread
From: Xah Lee @ 2009-08-05  7:03 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 4, 2:29 pm, sam jesse <rev...@gmail.com> wrote:
> I tried to put
> (when (string-equal system-type "windows-nt")
>   (progn
>      (setenv "PATH"
> C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
> Files\QuickTime\QTSystem\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Pro gram
> Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL
> Server\100\DTS\Binn\;c:\Program Files\Microsoft SQL
> Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Aspell\bin\
> .
> .
> .
>
> do I need to replace \ with /?
> do I need to replace ; with :? and if so, what about the : after the C?
> this setenv, does it modify the PATH in my OS? if so, do I need to be logged
> in with admin account? and if I do modify it, does it effect my other
> programs in my windows XP?
> I read the setenv and getenv but could not figure out the above.
> why setenv PATH when there is setq exec-path?


I wrote a summary of my findings. Please see here:

• Difference between Emacs's “(setenv PATH ...)” and “(setq exec-
path ...)”
  http://xahlee.org/emacs/emacs_env_var_paths.html

most your q are answered there.

here's your other ones:

> do I need to replace \ with /?
> do I need to replace ; with :?
> and if so, what about the : after the C?

Since my shell in emacs invokes the unix shell by cygwin bash, thus i
need to use unix conventions. In your case, stick with the Windows
convention.

> this setenv, does it modify the PATH in my OS?

No. It only effect how emacs sees the system's env var within emacs's
shells.

> why setenv PATH when there is setq exec-path?

see the link above. I gave a fair bit of explanation on why there are
two.

Oh, you need to escape the back quote in your string, because
backslash in emacs is a escaping mechanism in string. So, do like
this:

 (setenv "PATH"
"C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem"
)

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Flyspell error
       [not found]                             ` <mailman.3916.1249445924.2239.help-gnu-emacs@gnu.org>
  2009-08-05  7:03                               ` Flyspell error Xah Lee
@ 2009-08-05  7:07                               ` Anselm Helbig
  2009-08-05 17:46                                 ` sam jesse
  1 sibling, 1 reply; 35+ messages in thread
From: Anselm Helbig @ 2009-08-05  7:07 UTC (permalink / raw
  To: help-gnu-emacs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2060 bytes --]

Hi!

I don't have that much windows experience, but I'll do my best. 8-)

> I tried to put
> (when (string-equal system-type "windows-nt")
>   (progn
>      (setenv "PATH"  C:\WINDOWS\system32;C:\
> WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\
> QuickTime\QTSystem\;C:\WINDOWS\system32\
> WindowsPowerShell\v1.0;c:\Program Files\Microsoft
> SQL Server\100\Tools\Binn\;c:\Program Files\
> Microsoft SQL Server\100\DTS\Binn\;c:\Program Files
> \Microsoft SQL Server\100\Tools\Binn\VSShell\
> Common7\IDE\;C:\Program Files\Aspell\bin\
> .
> .
> .
> 
> do I need to replace \ with /?

Yes, either with / or you need to double the backslash like this: \\,
because the Backslash is the quoting character in emacs lisp strings.

> do I need to replace ; with :? and if so, what
> about the : after the C?

No, I think that would be wrong. 

> this setenv, does it modify the PATH in my OS? if
> so, do I need to be logged in with admin account?
> and if I do modify it, does it effect my other
> programs in my windows XP?

You don't need admin rights to change environment variables. It only
has an effect on programs you start from within emacs. 

> I read the setenv and getenv but could not figure
> out the above.
> why setenv PATH when there is setq exec-path?

`setenv' sets the environment variable. Whenever emacs uses the OS'
shell to start a program, the shell will see the value of PATH you set
in Emacs. However, Emacs can also start a program without using the
shell, and to this end it has exec-path. 

`exec-path' gets set to the list of paths in your PATH environment
variable when emacs starts. Setting PATH in your .emacs is too late,
unfortunately. So to have everything in one place, I'd rather not
touch PATH or exec-path in .emacs, but rather set the system's PATH
correctly in the first place. This fixes the issue not only for Emacs
but for all other programs as well. You shouldn't need admin rights to
do this as this doesn't affect other users.

HTH, 

Anselm


-- 
Anselm Helbig 
mailto:anselm.helbig+news2009@googlemail.com


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

* Re: setevn PATH vs exec-path [was Re: Flyspell error]
       [not found]                               ` <mailman.3919.1249451575.2239.help-gnu-emacs@gnu.org>
@ 2009-08-05 12:40                                 ` Xah Lee
  0 siblings, 0 replies; 35+ messages in thread
From: Xah Lee @ 2009-08-05 12:40 UTC (permalink / raw
  To: help-gnu-emacs

Hi Len,

thanks for the w32shell.el tip.

we chatted this before... but i'll have to spend some time down the
road to study this.

it'd be nice to integrate PowerShell into it too. Hopefully i can look
at it soon and maybe send you a patch.

On Aug 4, 10:52 pm, Lennart Borgman <lennart.borg...@gmail.com> wrote:
> On Wed, Aug 5, 2009 at 12:06 AM,XahLee<xah...@gmail.com> wrote:
> > btw, on Windows emacsW23, it has cmd-shell. Is this particular to
> > emacsW23 or is it in GNU Emacs's Windows branch?
>
> w32shell.el (where cmd-shell lives) contains wrappers for the "shell"
> function that comes with Emacs itself.

i believe you are saying that w32shell.el is NOT in GNU Emacs code
base right?

so, when people compile emacs 23 on Windows, they don't have cmd-
shell, but just shell, which invokes Windows's cmd.exe right?

what are the reasons not to have w32shell.el in GNU emacs? It seems to
me that it is good to have separate shells. Cause for me, i use all
cmd.exe, cygwin bash, and PowerShell on my Windows machine, and i'd
prefer to be able to run them indivdually while in emacs, instead of
one shell that has all these shell's paths togeter... at least the
unix cygwin bash shell wouldn't mesh well with Windows's.

> The purpose of it is to make it more easy to switch between uing cmd,
> Cygwin, MSYS etc as the shell program in command shell. (The name is a
> bit unfortunate. I did not know it was so hard to get additions like
> this into Emacs so I choose something that could fit Emacs.)

Thanks for the info.

Today i just compiled emacs 23 on my old PPC Mac, and it went very
smooth! I was fantastically happy. Especially so because my mac is a
late 2005 machine running OSX 10.4, and all the other Mac ports of
emacs all have abandoned it for about a year now. I haven't compiled a
program for years... last time i did compile emacs is sometimes in
2002, lol. This week or so i'll install cygwin gcc or whatever
Microsoft's compiler offerings (if free) and try to compile it on
Windows.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: setevn PATH vs exec-path [was Re: Flyspell error]
  2009-08-04 22:06                             ` setevn PATH vs exec-path [was Re: Flyspell error] Xah Lee
  2009-08-05  5:52                               ` Lennart Borgman
       [not found]                               ` <mailman.3919.1249451575.2239.help-gnu-emacs@gnu.org>
@ 2009-08-05 17:14                               ` Eli Zaretskii
  2009-08-05 17:25                                 ` Drew Adams
       [not found]                               ` <mailman.3953.1249492495.2239.help-gnu-emacs@gnu.org>
  3 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2009-08-05 17:14 UTC (permalink / raw
  To: help-gnu-emacs

> From: Xah Lee <xahlee@gmail.com>
> Date: Tue, 4 Aug 2009 15:06:35 -0700 (PDT)
> 
> So, the system's PATH env var and emacs exec-path needs not to be the
> same, and ideally their values probably shouldn't be identical if one
> is a control freak, since they serve different purposes.

Actually, my advice is to have them both identical (well, actually,
equivalent, not identical, because one is a list while the other is a
string).  That's because exec-path is used when Emacs invokes programs
directly (e.g., via `call-process') while PATH is used indirectly when
Emacs invokes programs via the shell, like in "M-x compile" or "M-x grep".
In the latter case, the shell will look for programs along PATH.
If your values are not equivalent, some Emacs commands that invoke
subsidiary programs will mysteriously fail, and unless you know very
well which Emacs command uses the shell and which does not, you will
have hard time figuring out how to set them correctly.

Of course, if PATH is modified before Emacs is started, then exec-path
will be automatically equivalent to PATH, because it's computed from
PATH's value.




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

* RE: setevn PATH vs exec-path [was Re: Flyspell error]
  2009-08-05 17:14                               ` Eli Zaretskii
@ 2009-08-05 17:25                                 ` Drew Adams
  0 siblings, 0 replies; 35+ messages in thread
From: Drew Adams @ 2009-08-05 17:25 UTC (permalink / raw
  To: 'Eli Zaretskii', help-gnu-emacs

> Actually, my advice is to have them both identical (well, actually,
> equivalent, not identical, because one is a list while the other is a
> string).  That's because exec-path is used when Emacs invokes programs
> directly (e.g., via `call-process') while PATH is used indirectly when
> Emacs invokes programs via the shell, like in "M-x compile" 
> or "M-x grep".
> In the latter case, the shell will look for programs along PATH.
> If your values are not equivalent, some Emacs commands that invoke
> subsidiary programs will mysteriously fail, and unless you know very
> well which Emacs command uses the shell and which does not, you will
> have hard time figuring out how to set them correctly.
> 
> Of course, if PATH is modified before Emacs is started, then exec-path
> will be automatically equivalent to PATH, because it's computed from
> PATH's value.

It might be good to add that advice to the Emacs manual. The last sentence,
about the default value of `exec-path', is there (in nodes `Single Shell' and
`Interactive Shell'), but not the rest.

There is also env var EMACSPATH, which is used to initialize `exec-path' (see
node `General Variables'). Note that the same thing is said, in the same node,
about env var `PATH'. Nothing is said about which of them takes precedence, if
both env vars are defined. And while PATH is mentioned in nodes `Single Shell'
and `Interactive Shell' as the start-time source of `exec-path', EMACSPATH is
not mentioned beyond the one-liner in node `General Variables'.





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

* Re: Flyspell error
  2009-08-05  7:07                               ` Anselm Helbig
@ 2009-08-05 17:46                                 ` sam jesse
  2009-08-06  7:48                                   ` sam jesse
  0 siblings, 1 reply; 35+ messages in thread
From: sam jesse @ 2009-08-05 17:46 UTC (permalink / raw
  To: anselm.helbig+news2009; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 3078 bytes --]

OK

I made the code simple to cover my need:
*********************************************8
(when (string-equal system-type "windows-nt")
 (progn
   (setenv "PATH" "C:/Program Files/Aspell/bin/")
   (setq exec-path '("C:/Program Files/Aspell/bin") )
 )
)
***************************************************

but on M-$ I get

Debugger entered--Lisp error: (error "Error: No word lists can be found for
the language \"en_US\".")
  signal(error ("Error: No word lists can be found for the language
\"en_US\"."))
  error("%s" "Error: No word lists can be found for the language
\"en_US\".")
  ispell-init-process()
  ispell-buffer-local-words()
  ispell-accept-buffer-local-defs()
  ispell-word(nil nil nil)
  call-interactively(ispell-word)



On Wed, Aug 5, 2009 at 5:07 PM, Anselm Helbig <
anselm.helbig+news2009@googlemail.com<anselm.helbig%2Bnews2009@googlemail.com>
> wrote:

> Hi!
>
> I don't have that much windows experience, but I'll do my best. 8-)
>
> > I tried to put
> > (when (string-equal system-type "windows-nt")
> >   (progn
> >      (setenv "PATH"  C:\WINDOWS\system32;C:\
> > WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\
> > QuickTime\QTSystem\;C:\WINDOWS\system32\
> > WindowsPowerShell\v1.0;c:\Program Files\Microsoft
> > SQL Server\100\Tools\Binn\;c:\Program Files\
> > Microsoft SQL Server\100\DTS\Binn\;c:\Program Files
> > \Microsoft SQL Server\100\Tools\Binn\VSShell\
> > Common7\IDE\;C:\Program Files\Aspell\bin\
> > .
> > .
> > .
> >
> > do I need to replace \ with /?
>
> Yes, either with / or you need to double the backslash like this: \\,
> because the Backslash is the quoting character in emacs lisp strings.
>
> > do I need to replace ; with :? and if so, what
> > about the : after the C?
>
> No, I think that would be wrong.
>
> > this setenv, does it modify the PATH in my OS? if
> > so, do I need to be logged in with admin account?
> > and if I do modify it, does it effect my other
> > programs in my windows XP?
>
> You don't need admin rights to change environment variables. It only
> has an effect on programs you start from within emacs.
>
> > I read the setenv and getenv but could not figure
> > out the above.
> > why setenv PATH when there is setq exec-path?
>
> `setenv' sets the environment variable. Whenever emacs uses the OS'
> shell to start a program, the shell will see the value of PATH you set
> in Emacs. However, Emacs can also start a program without using the
> shell, and to this end it has exec-path.
>
> `exec-path' gets set to the list of paths in your PATH environment
> variable when emacs starts. Setting PATH in your .emacs is too late,
> unfortunately. So to have everything in one place, I'd rather not
> touch PATH or exec-path in .emacs, but rather set the system's PATH
> correctly in the first place. This fixes the issue not only for Emacs
> but for all other programs as well. You shouldn't need admin rights to
> do this as this doesn't affect other users.
>
> HTH,
>
> Anselm
>
>
> --
> Anselm Helbig
> mailto:anselm.helbig+news2009@googlemail.com<anselm.helbig%2Bnews2009@googlemail.com>
>

[-- Attachment #2: Type: text/html, Size: 4017 bytes --]

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

* Re: setevn PATH vs exec-path [was Re: Flyspell error]
       [not found]                               ` <mailman.3953.1249492495.2239.help-gnu-emacs@gnu.org>
@ 2009-08-05 23:51                                 ` Xah Lee
  2009-08-07  9:30                                   ` Eli Zaretskii
       [not found]                                   ` <mailman.4107.1249637430.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 35+ messages in thread
From: Xah Lee @ 2009-08-05 23:51 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 5, 10:14 am, Eli Zaretskii <e...@gnu.org> wrote:
> > From: Xah Lee <xah...@gmail.com>
> > Date: Tue, 4 Aug 2009 15:06:35 -0700 (PDT)
>
> > So, the system's PATH env var and emacs exec-path needs not to be the
> > same, and ideally their values probably shouldn't be identical if one
> > is a control freak, since they serve different purposes.
>
> Actually, my advice is to have them both identical (well, actually,
> equivalent, not identical, because one is a list while the other is a
> string).  That's because exec-path is used when Emacs invokes programs
> directly (e.g., via `call-process') while PATH is used indirectly when
> Emacs invokes programs via the shell, like in "M-x compile" or "M-x grep".
> In the latter case, the shell will look for programs along PATH.
> If your values are not equivalent, some Emacs commands that invoke
> subsidiary programs will mysteriously fail, and unless you know very
> well which Emacs command uses the shell and which does not, you will
> have hard time figuring out how to set them correctly.
>
> Of course, if PATH is modified before Emacs is started, then exec-path
> will be automatically equivalent to PATH, because it's computed from
> PATH's value.

interesting and very informative.

For Windows emacs users who uses unix shell, won't there be
exceptions?

For example, i use emacs on windows, but right now predominately uses
unix shell cygwin

when i run “M-x shell” in emacs, i don't want my shell to touch any of
the Windows's executables if possible. e.g. i set PATH in emacs in a
way assuming i'm working in cygwin bash:

typical paths for unix shell:
"/usr/local/bin"
"/usr/bin"
"/bin"
"/usr/X11R6/bin"
"/cygdrive/c/Windows/Program Files (x86)/PHP/"

some Windows paths that are i think necessary in order for cygwin to
run.
"/cygdrive/c/Windows/system32"
"/cygdrive/c/Windows"
"/cygdrive/c/Windows/System32/Wbem"

but when i'm not in shell in emacs, i do want Windows emacs to be able
to access any normal Windows's executables, so my exec-path is like
this:

 "C:/cygwin/bin/"
 "C:/Program Files (x86)/Emacs/emacs/bin/"
 "C:/Program Files (x86)/PHP/"
 "C:/Windows/system32/"
 "C:/Windows/"
 "C:/Windows/System32/Wbem/"

if i just setenv PATH and just let emacs set exec-path, i think i ran
into some problems in emacs... that could be i messed something up in
my setenv PATH...

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Flyspell error
  2009-08-05 17:46                                 ` sam jesse
@ 2009-08-06  7:48                                   ` sam jesse
  0 siblings, 0 replies; 35+ messages in thread
From: sam jesse @ 2009-08-06  7:48 UTC (permalink / raw
  To: anselm.helbig+news2009; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 3350 bytes --]

any idea how to install an en word list to window xp for my aspell to work?

On Thu, Aug 6, 2009 at 3:46 AM, sam jesse <revrvr@gmail.com> wrote:

> OK
>
> I made the code simple to cover my need:
> *********************************************8
> (when (string-equal system-type "windows-nt")
>  (progn
>    (setenv "PATH" "C:/Program Files/Aspell/bin/")
>    (setq exec-path '("C:/Program Files/Aspell/bin") )
>  )
> )
> ***************************************************
>
> but on M-$ I get
>
> Debugger entered--Lisp error: (error "Error: No word lists can be found for
> the language \"en_US\".")
>   signal(error ("Error: No word lists can be found for the language
> \"en_US\"."))
>   error("%s" "Error: No word lists can be found for the language
> \"en_US\".")
>   ispell-init-process()
>   ispell-buffer-local-words()
>   ispell-accept-buffer-local-defs()
>   ispell-word(nil nil nil)
>   call-interactively(ispell-word)
>
>
>
>
> On Wed, Aug 5, 2009 at 5:07 PM, Anselm Helbig <
> anselm.helbig+news2009@googlemail.com<anselm.helbig%2Bnews2009@googlemail.com>
> > wrote:
>
>> Hi!
>>
>> I don't have that much windows experience, but I'll do my best. 8-)
>>
>> > I tried to put
>> > (when (string-equal system-type "windows-nt")
>> >   (progn
>> >      (setenv "PATH"  C:\WINDOWS\system32;C:\
>> > WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\
>> > QuickTime\QTSystem\;C:\WINDOWS\system32\
>> > WindowsPowerShell\v1.0;c:\Program Files\Microsoft
>> > SQL Server\100\Tools\Binn\;c:\Program Files\
>> > Microsoft SQL Server\100\DTS\Binn\;c:\Program Files
>> > \Microsoft SQL Server\100\Tools\Binn\VSShell\
>> > Common7\IDE\;C:\Program Files\Aspell\bin\
>> > .
>> > .
>> > .
>> >
>> > do I need to replace \ with /?
>>
>> Yes, either with / or you need to double the backslash like this: \\,
>> because the Backslash is the quoting character in emacs lisp strings.
>>
>> > do I need to replace ; with :? and if so, what
>> > about the : after the C?
>>
>> No, I think that would be wrong.
>>
>> > this setenv, does it modify the PATH in my OS? if
>> > so, do I need to be logged in with admin account?
>> > and if I do modify it, does it effect my other
>> > programs in my windows XP?
>>
>> You don't need admin rights to change environment variables. It only
>> has an effect on programs you start from within emacs.
>>
>> > I read the setenv and getenv but could not figure
>> > out the above.
>> > why setenv PATH when there is setq exec-path?
>>
>> `setenv' sets the environment variable. Whenever emacs uses the OS'
>> shell to start a program, the shell will see the value of PATH you set
>> in Emacs. However, Emacs can also start a program without using the
>> shell, and to this end it has exec-path.
>>
>> `exec-path' gets set to the list of paths in your PATH environment
>> variable when emacs starts. Setting PATH in your .emacs is too late,
>> unfortunately. So to have everything in one place, I'd rather not
>> touch PATH or exec-path in .emacs, but rather set the system's PATH
>> correctly in the first place. This fixes the issue not only for Emacs
>> but for all other programs as well. You shouldn't need admin rights to
>> do this as this doesn't affect other users.
>>
>> HTH,
>>
>> Anselm
>>
>>
>> --
>> Anselm Helbig
>> mailto:anselm.helbig+news2009@googlemail.com<anselm.helbig%2Bnews2009@googlemail.com>
>>
>
>

[-- Attachment #2: Type: text/html, Size: 4459 bytes --]

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

* Re: setevn PATH vs exec-path [was Re: Flyspell error]
  2009-08-05 23:51                                 ` Xah Lee
@ 2009-08-07  9:30                                   ` Eli Zaretskii
       [not found]                                   ` <mailman.4107.1249637430.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 35+ messages in thread
From: Eli Zaretskii @ 2009-08-07  9:30 UTC (permalink / raw
  To: help-gnu-emacs

> From: Xah Lee <xahlee@gmail.com>
> Date: Wed, 5 Aug 2009 16:51:03 -0700 (PDT)
> 
> For Windows emacs users who uses unix shell, won't there be
> exceptions?
> 
> For example, i use emacs on windows, but right now predominately uses
> unix shell cygwin
> 
> when i run “M-x shell” in emacs, i don't want my shell to touch any of
> the Windows's executables if possible. e.g. i set PATH in emacs in a
> way assuming i'm working in cygwin bash:
> 
> typical paths for unix shell:
> "/usr/local/bin"
> "/usr/bin"
> "/bin"
> "/usr/X11R6/bin"
> "/cygdrive/c/Windows/Program Files (x86)/PHP/"
> 
> some Windows paths that are i think necessary in order for cygwin to
> run.
> "/cygdrive/c/Windows/system32"
> "/cygdrive/c/Windows"
> "/cygdrive/c/Windows/System32/Wbem"
> 
> but when i'm not in shell in emacs, i do want Windows emacs to be able
> to access any normal Windows's executables, so my exec-path is like
> this:
> 
>  "C:/cygwin/bin/"
>  "C:/Program Files (x86)/Emacs/emacs/bin/"
>  "C:/Program Files (x86)/PHP/"
>  "C:/Windows/system32/"
>  "C:/Windows/"
>  "C:/Windows/System32/Wbem/"
> 
> if i just setenv PATH and just let emacs set exec-path, i think i ran
> into some problems in emacs... that could be i messed something up in
> my setenv PATH...

IMO, mixing a native Windows build of Emacs and Cygwin executables
that Emacs features need is asking for trouble.  You can, of course,
make this work, but then you'd need to tinker quite a lot with Emacs
features, read their code, and change many defaults to make them work
as intended.  PATH and exec-path are indeed two settings you will need
to put under tight control, to make things work.  But I'm sure there
are others.

I don't recommend such a mix to anyone who needs Emacs on Windows to
"just work".  If you like Cygwin, simply install the Cygwin build of
Emacs and be done.  Emacs 23.1 _does_ supported the Cygwin build, and
after many years there's again an active maintainer of the Cygwin
Emacs.  So any problems you find there will probably be fixed without
delays.

OTOH, if you need to be able to invoke native Windows programs from
Emacs, and Cygwin somehow doesn't let you to do that, use native
Windows ports exclusively.  That is what I do, and I have yet to see a
significant problem that wouldn't be resolved by installing a native
Windows port of some utility, or by fixing some bug in Emacs.  (For
example, yesterday I fixed Calc to allow graphing commands to work
with the native Windows port of Gnuplot.)

Keeping your work environment uniform and coherent will save you many
hours of grief and hair-pulling.  Unless, of course, you like to
tinker, in which case the mix you have now is the way to go.  I'm sure
you will learn a lot down the road, both about Emacs and about the
programs it invokes.





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

* Re: setevn PATH vs exec-path [was Re: Flyspell error]
       [not found]                                   ` <mailman.4107.1249637430.2239.help-gnu-emacs@gnu.org>
@ 2009-08-07 11:43                                     ` Xah Lee
  0 siblings, 0 replies; 35+ messages in thread
From: Xah Lee @ 2009-08-07 11:43 UTC (permalink / raw
  To: help-gnu-emacs

On Aug 7, 2:30 am, Eli Zaretskii <e...@gnu.org> wrote:
> IMO, mixing a native Windows build of Emacs and Cygwin executables
> that Emacs features need is asking for trouble.  You can, of course,
> make this work, but then you'd need to tinker quite a lot with Emacs
> features, read their code, and change many defaults to make them work
> as intended.  PATH and exec-path are indeed two settings you will need
> to put under tight control, to make things work.  But I'm sure there
> are others.
>
> I don't recommend such a mix to anyone who needs Emacs on Windows to
> "just work".  If you like Cygwin, simply install the Cygwin build of
> Emacs and be done.  Emacs 23.1 _does_ supported the Cygwin build, and
> after many years there's again an active maintainer of the Cygwin
> Emacs.  So any problems you find there will probably be fixed without
> delays.
>
> OTOH, if you need to be able to invoke native Windows programs from
> Emacs, and Cygwin somehow doesn't let you to do that, use native
> Windows ports exclusively.  That is what I do, and I have yet to see a
> significant problem that wouldn't be resolved by installing a native
> Windows port of some utility, or by fixing some bug in Emacs.  (For
> example, yesterday I fixed Calc to allow graphing commands to work
> with the native Windows port of Gnuplot.)
>
> Keeping your work environment uniform and coherent will save you many
> hours of grief and hair-pulling.  Unless, of course, you like to
> tinker, in which case the mix you have now is the way to go.  I'm sure
> you will learn a lot down the road, both about Emacs and about the
> programs it invokes.

umm... good idea. Sounds like a good advice. Thanks.

> I'm sure
> you will learn a lot down the road, both about Emacs and about the
> programs it invokes.

O wait, this bit i don't think i agree. LOL.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2009-08-07 11:43 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-01  0:06 Flyspell error sam jesse
2009-08-01  7:29 ` Eli Zaretskii
2009-08-01  8:53   ` sam jesse
2009-08-01 10:01     ` Eli Zaretskii
     [not found]     ` <mailman.3634.1249120899.2239.help-gnu-emacs@gnu.org>
2009-08-01 10:13       ` Richard Riley
     [not found]   ` <mailman.3635.1249129213.2239.help-gnu-emacs@gnu.org>
2009-08-01 21:58     ` Xah Lee
2009-08-02  7:10       ` sam jesse
     [not found]       ` <mailman.3687.1249222316.2239.help-gnu-emacs@gnu.org>
2009-08-02 20:02         ` Xah Lee
2009-08-02 20:28           ` Richard Riley
2009-08-03  0:08             ` Xah Lee
2009-08-03  0:10               ` Xah Lee
2009-08-03 20:51                 ` sam jesse
2009-08-03 20:54                   ` sam jesse
2009-08-03 22:21                   ` Xah Lee
2009-08-03 23:12                     ` sam jesse
     [not found]                   ` <mailman.3801.1249343719.2239.help-gnu-emacs@gnu.org>
2009-08-04  2:17                     ` Xah Lee
2009-08-04  4:44                       ` sam jesse
2009-08-04 17:34                         ` suvayu ali
2009-08-04 18:10                         ` Eli Zaretskii
     [not found]                         ` <mailman.3862.1249407393.2239.help-gnu-emacs@gnu.org>
2009-08-04 18:57                           ` Xah Lee
     [not found]                         ` <mailman.3868.1249409494.2239.help-gnu-emacs@gnu.org>
2009-08-04 19:02                           ` Xah Lee
2009-08-04 21:29                             ` sam jesse
2009-08-04 22:06                             ` setevn PATH vs exec-path [was Re: Flyspell error] Xah Lee
2009-08-05  5:52                               ` Lennart Borgman
     [not found]                               ` <mailman.3919.1249451575.2239.help-gnu-emacs@gnu.org>
2009-08-05 12:40                                 ` Xah Lee
2009-08-05 17:14                               ` Eli Zaretskii
2009-08-05 17:25                                 ` Drew Adams
     [not found]                               ` <mailman.3953.1249492495.2239.help-gnu-emacs@gnu.org>
2009-08-05 23:51                                 ` Xah Lee
2009-08-07  9:30                                   ` Eli Zaretskii
     [not found]                                   ` <mailman.4107.1249637430.2239.help-gnu-emacs@gnu.org>
2009-08-07 11:43                                     ` Xah Lee
     [not found]                             ` <mailman.3916.1249445924.2239.help-gnu-emacs@gnu.org>
2009-08-05  7:03                               ` Flyspell error Xah Lee
2009-08-05  7:07                               ` Anselm Helbig
2009-08-05 17:46                                 ` sam jesse
2009-08-06  7:48                                   ` sam jesse
2009-08-02 21:21           ` Lennart Borgman

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.