all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: Svend Sorensen <svend@ciffer.net>
Cc: 17284@debbugs.gnu.org
Subject: bug#17284: Host name completion in shell mode take 45 seconds
Date: Fri, 03 Apr 2015 12:36:20 +0200	[thread overview]
Message-ID: <551E6D24.4020408@yahoo.fr> (raw)
In-Reply-To: <CA+N+ML9Ee+b2Yxsx4Kwovm8XhT0sXCgCuDjkf-C+3TZpskA=XA@mail.gmail.com>

Le 03/04/2015 11:09, Svend Sorensen a écrit :
> On Thu, Apr 2, 2015 at 10:39 PM, Nicolas Richard
> <theonewiththeevillook@yahoo.fr> wrote:
>>
>> Does it help to replace (looking-back ",") by (eq ?, (char-before)) ?
> 
> The function runs quickly with that change.

Thanks.

I'm still not confident enough to push my commits without approval from
actual devs so here's what I suggest:

Commit fd89dbb0e9658874f71a75f0b84ce2f1a3021252
References: yf/bug-17284
Author:     Nicolas Richard <theonewiththeevillook@yahoo.fr>
AuthorDate: Fri Apr 3 12:28:40 2015 +0200
Commit:     Nicolas Richard <theonewiththeevillook@yahoo.fr>
CommitDate: Fri Apr 3 12:33:42 2015 +0200

    pcmpl-ssh-known-hosts: Use `char-before' instead of `looking-back'.
    
    Fixes: debbugs:17284
    
    * lisp/pcmpl-unix.el (pcmpl-ssh-known-hosts): Use `char-before' instead
    of `looking-back'.

1 parent commit, 2 merged branches, 1 containing branch
 Parent     | 0b914ba ; Tweak the previous change
 Merged     | emacs-24 yf/bug-17284
 Containing | yf/bug-17284
 Follows    | emacs-24.5-rc1 (4152)

2 files changed, 6 insertions(+), 1 deletion(-)
 lisp/ChangeLog     | 5 +++++
 lisp/pcmpl-unix.el | 2 +-

modified   lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-03  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
+
+	* pcmpl-unix.el (pcmpl-ssh-known-hosts): Use `char-before' instead
+	of `looking-back' (bug#17284).
+
 2015-04-03  Dmitry Gutov  <dgutov@yandex.ru>
 
 	* progmodes/js.el (js-indent-line): Do nothing when bol is inside
modified   lisp/pcmpl-unix.el
@@ -157,7 +157,7 @@ (defun pcmpl-ssh-known-hosts ()
         (while (re-search-forward (concat "^ *" host-re) nil t)
           (add-to-list 'ssh-hosts-list (concat (match-string 1)
                                                (match-string 2)))
-          (while (and (looking-back ",")
+          (while (and (eq (char-before) ?,)
                       (re-search-forward host-re (line-end-position) t))
             (add-to-list 'ssh-hosts-list (concat (match-string 1)
                                                  (match-string 2)))))

-- 
Nico.






  reply	other threads:[~2015-04-03 10:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17 17:47 bug#17284: 24.3.90; Host name completion in shell mode take 45 seconds Svend Sorensen
2015-04-02 17:36 ` bug#17284: " Svend Sorensen
2015-04-03  5:39   ` Nicolas Richard
2015-04-03  9:09     ` Svend Sorensen
2015-04-03 10:36       ` Nicolas Richard [this message]
2015-04-03 11:12         ` martin rudalics
2015-04-03 13:28           ` Stefan Monnier
2015-04-04  8:29             ` martin rudalics
2015-04-04 13:54               ` Stefan Monnier
2015-04-04 15:59                 ` martin rudalics
2015-04-03 11:42         ` Dmitry Gutov
2015-04-03 11:58           ` Nicolas Richard
2015-04-03 16:25       ` Drew Adams
2015-04-04  8:29         ` martin rudalics
2015-04-04 14:46           ` Drew Adams
2015-04-04 16:00             ` martin rudalics
2015-04-04 21:38               ` Drew Adams
     [not found]                 ` <cf794d98-4671-4a57-92cf-27a8c59c9211@default>
2016-01-02  3:59                   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551E6D24.4020408@yahoo.fr \
    --to=theonewiththeevillook@yahoo.fr \
    --cc=17284@debbugs.gnu.org \
    --cc=svend@ciffer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.