aki2o / emacs-plsense

Provide omni completion for Perl.
29 stars 4 forks source link

Great Tool, but need help using it #8

Open KevinVanWorkum opened 8 years ago

KevinVanWorkum commented 8 years ago

I know your English is not good. But my emacs is not good. I need more help getting started. I can use it but not automatically. I have to manually start 'plsense-server-start' and 'plsense-setup-current-buffer'. How to automatically use it when opening a perl file?

P.S.

Do you play Go (igo) on kgs, igs, or ogs? I'm looking for friends to play igo with.

aki2o commented 8 years ago

Hi, @KevinVanWorkum Do you have the following config?

(plsense-config-default)

If so, check the major-mode, which you use for Perl, exists in plsense-enable-modes.

Do you play Go (igo) on kgs, igs, or ogs?

I don't know them... What are igo and kgs, igs, ogs?

BTW: For checking whether to activate automatically when opening a perl file, check plsense-setup-current-buffer exists in the result of M-x describe-variable for the major-mode hook (ex. cperl-mode-hook). For starting server automatically, set t to plsense-server-start-automatically-p.

KevinVanWorkum commented 8 years ago

Thanks, but I'm still having trouble.

(require 'plsense) and (plsense-config-default) is in my .emacs file.

plsense-enable-modes is: (perl-mode cperl-mode), I'm using cperl-mode.

cperl-mode-hook is: (plsense-setup-current-buffer auto-complete-mode flymake-mode)

I start 'plsense svstart' mannually on the command line.

M-x plsense-server-status says: Main Server is Running. Work Server is Running. Resolve Server is Running.

M-x plsense-buffer-is-ready says: No M-x plsense-reopen-current-buffer doesn't help.

On Wed, Sep 30, 2015 at 11:52 PM, Hiroaki Otsu notifications@github.com wrote:

Hi, @KevinVanWorkum https://github.com/KevinVanWorkum Do you have the following config?

(plsense-config-default)

If so, check the major-mode, which you use for Perl, exists in plsense-enable-modes.

Do you play Go (igo) on kgs, igs, or ogs?

I don't know them... What are igo and kgs, igs, ogs?

BTW: For checking whether to activate automatically when opening a perl file, check plsense-setup-current-buffer exists in the result of M-x describe-variable for the major-mode hook (ex. cperl-mode-hook). For starting server automatically, set t to plsense-server-start-automatically-p.

— Reply to this email directly or view it on GitHub https://github.com/aki2o/emacs-plsense/issues/8#issuecomment-144613308.

Kevin Van Workum, PhD Sabalcore Computing Inc. "Where Data Becomes Discovery" http://www.sabalcore.com 877-492-8027 ext. 1011

aki2o commented 8 years ago

I might have found the cause. Try to remove auto-complete-mode from cperl-mode-hook. That might switch auto-complete-mode to off because plsense-setup-current-buffer invokes (auto-complete-mode t) before that.

KevinVanWorkum commented 8 years ago

Thanks, but I think I found the problem. Starting the server manually from the command line does not work. The server starts, but emacs doesn't communicate with it. If I set plsense-server-start-automatically-p to t, then everything works.

Another problem I had was plsense sometimes could not open a socket because of "Address already is use". I needed to wait for the ports to become available after stopping the server.

On Fri, Oct 2, 2015 at 9:31 AM, Hiroaki Otsu notifications@github.com wrote:

I might have found the cause. Try to remove auto-complete-mode from cperl-mode-hook. That might switch auto-complete-mode to off because plsense-setup-current-buffer invokes (auto-complete-mode t) before that.

— Reply to this email directly or view it on GitHub https://github.com/aki2o/emacs-plsense/issues/8#issuecomment-145020736.

Kevin Van Workum, PhD Sabalcore Computing Inc. "Where Data Becomes Discovery" http://www.sabalcore.com 877-492-8027 ext. 1011

aki2o commented 8 years ago

The server starts, but emacs doesn't communicate with it. If I set plsense-server-start-automatically-p to t, then everything works.

You need M-x plsense-server-start even if you already started the server in terminal. If plsense-server-start-automatically-p is t, it's done automatically.

Another problem I had was plsense sometimes could not open a socket because of "Address already is use". I needed to wait for the ports to become available after stopping the server.

I suppose it's unavoidable because maybe it's a network specification. Why do you need to stop the server?

KevinVanWorkum commented 8 years ago

On Fri, Oct 2, 2015 at 10:07 AM, Hiroaki Otsu notifications@github.com wrote:

The server starts, but emacs doesn't communicate with it. If I set plsense-server-start-automatically-p to t, then everything works.

You need M-x plsense-server-start even if you already started the server in terminal.

OK. That wasn't obvious to me.

If plsense-server-start-automatically-p is t, it's done automatically.

Another problem I had was plsense sometimes could not open a socket because of "Address already is use". I needed to wait for the ports to become available after stopping the server.

I suppose it's unavoidable because maybe it's a network specification. Why do you need to stop the server?

Normally I guess you wouldn't need to to stop. But I was trying to figure out why it wasn't working.

— Reply to this email directly or view it on GitHub https://github.com/aki2o/emacs-plsense/issues/8#issuecomment-145031375.

Kevin Van Workum, PhD Sabalcore Computing Inc. "Where Data Becomes Discovery" http://www.sabalcore.com 877-492-8027 ext. 1011