* make slim auto-complete work in Org-mode (delete some ac-source in Org-mode).
@ 2014-07-30 3:16 stardiviner
2014-07-30 3:22 ` Drew Adams
2014-08-05 12:54 ` Sebastien Vauban
0 siblings, 2 replies; 4+ messages in thread
From: stardiviner @ 2014-07-30 3:16 UTC (permalink / raw)
To: Org-mode, Emacs help
I setup default =ac-sources= for auto-complete like this:
#+BEGIN_SRC emacs-lisp
(setq-default ac-sources
'(ac-source-yasnippet
ac-source-abbrev
ac-source-filename
ac-source-files-in-current-dir
ac-source-dictionary
ac-source-words-in-same-mode-buffers
))
#+END_SRC
And I found =ac-source-dictionary= and =ac-source-words-in-same-mode-buffers= is
heavy for Org-mode, So I try to remove them only in Org-mode.
This is my try:
#+BEGIN_SRC emacs-lisp
(add-hook 'org-mode-hook
(lambda ()
;; use `delq' in a loop.
(mapc (lambda (x) (setq-local ac-sources (delq x ac-sources)))
'(ac-source-dictionary ac-source-words-in-same-mode-buffers))))
#+END_SRC
But this code will use =delq= to delete *global default* =ac-sources= too. But I only
want to delete in Org-mode.
So is there some other ways to do it?
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: make slim auto-complete work in Org-mode (delete some ac-source in Org-mode).
2014-07-30 3:16 make slim auto-complete work in Org-mode (delete some ac-source in Org-mode) stardiviner
@ 2014-07-30 3:22 ` Drew Adams
2014-08-05 12:54 ` Sebastien Vauban
1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2014-07-30 3:22 UTC (permalink / raw)
To: stardiviner, Org-mode, Emacs help
> But this code will use =delq= to delete *global default* =ac-sources= too.
> But I only want to delete in Org-mode.
> So is there some other ways to do it?
`remq' is like `delq' but non-destructive - it modifies a copy.
(And `remove' is like `delete' but non-destructive.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: make slim auto-complete work in Org-mode (delete some ac-source in Org-mode).
2014-07-30 3:16 make slim auto-complete work in Org-mode (delete some ac-source in Org-mode) stardiviner
2014-07-30 3:22 ` Drew Adams
@ 2014-08-05 12:54 ` Sebastien Vauban
2014-08-07 8:52 ` numbchild
1 sibling, 1 reply; 4+ messages in thread
From: Sebastien Vauban @ 2014-08-05 12:54 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
stardiviner wrote:
> I setup default =ac-sources= for auto-complete like this:
>
> #+BEGIN_SRC emacs-lisp
> (setq-default ac-sources
> '(ac-source-yasnippet
> ac-source-abbrev
> ac-source-filename
> ac-source-files-in-current-dir
> ac-source-dictionary
> ac-source-words-in-same-mode-buffers
> ))
> #+END_SRC
>
> And I found =ac-source-dictionary= and =ac-source-words-in-same-mode-buffers= is
> heavy for Org-mode, So I try to remove them only in Org-mode.
Do you have some evidence of this? Profiling with/without? It'd be
interesting.
Other point: I'm surprised you don't have the source
`ac-source-words-in-buffer' (maybe instead of
`ac-source-words-in-same-mode-buffers')...
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: make slim auto-complete work in Org-mode (delete some ac-source in Org-mode).
2014-08-05 12:54 ` Sebastien Vauban
@ 2014-08-07 8:52 ` numbchild
0 siblings, 0 replies; 4+ messages in thread
From: numbchild @ 2014-08-07 8:52 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: Org-mode
[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]
I test those ac-source one by one manually.
And also I have extension org-ac. Then they are more heavy.
And I open many big org files usually. So I found they are heavy.
[stardiviner] <Hack this world!> GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter: @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433
Blog: http://nagatopain-blog.logdown.com/
On Tue, Aug 5, 2014 at 8:54 PM, Sebastien Vauban <sva-news@mygooglest.com>
wrote:
> stardiviner wrote:
> > I setup default =ac-sources= for auto-complete like this:
> >
> > #+BEGIN_SRC emacs-lisp
> > (setq-default ac-sources
> > '(ac-source-yasnippet
> > ac-source-abbrev
> > ac-source-filename
> > ac-source-files-in-current-dir
> > ac-source-dictionary
> > ac-source-words-in-same-mode-buffers
> > ))
> > #+END_SRC
> >
> > And I found =ac-source-dictionary= and
> =ac-source-words-in-same-mode-buffers= is
> > heavy for Org-mode, So I try to remove them only in Org-mode.
>
> Do you have some evidence of this? Profiling with/without? It'd be
> interesting.
>
> Other point: I'm surprised you don't have the source
> `ac-source-words-in-buffer' (maybe instead of
> `ac-source-words-in-same-mode-buffers')...
>
> Best regards,
> Seb
>
> --
> Sebastien Vauban
>
>
>
[-- Attachment #2: Type: text/html, Size: 2271 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-07 8:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30 3:16 make slim auto-complete work in Org-mode (delete some ac-source in Org-mode) stardiviner
2014-07-30 3:22 ` Drew Adams
2014-08-05 12:54 ` Sebastien Vauban
2014-08-07 8:52 ` numbchild
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.