all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Completion in Auctex
@ 2008-09-21 20:21 Ross A. Laird
  0 siblings, 0 replies; 7+ messages in thread
From: Ross A. Laird @ 2008-09-21 20:21 UTC (permalink / raw)
  To: help-gnu-emacs

I don't know if this is what you are looking for, but in auctex you can
type M-/ (alt-forward slash) and it will complete words that are not
commands (e.g. words that exist previously in the document).

Ross
-- 
Ross A. Laird, PhD
www.rosslaird.info









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

* Re: Completion in Auctex
       [not found] <mailman.19657.1222028522.18990.help-gnu-emacs@gnu.org>
@ 2008-09-22  6:53 ` denebet
  2008-09-22 16:48   ` Phil Lord
  0 siblings, 1 reply; 7+ messages in thread
From: denebet @ 2008-09-22  6:53 UTC (permalink / raw)
  To: help-gnu-emacs

Ross A. Laird wrote:

> I don't know if this is what you are looking for, but in auctex you can
> type M-/ (alt-forward slash) and it will complete words that are not
> commands (e.g. words that exist previously in the document).

Thanks.

Yes, this is what I was looking for but didn't find it because a long time
ago I set completion in programming modes  to [TAB] and forgot to  set it
for text mode.
In case it could be useful for people reading this group and who think that 
M-/  is not a very user friendly shortcut :

from 
<http://www.emacsblog.org/2007/03/12/tab-completion-everywhere/>

-------------
(defun indent-or-expand (arg)
  "Either indent according to mode, or expand the word preceding
point."
  (interactive "*P")
  (if (and
       (or (bobp) (= ?w (char-syntax (char-before))))
       (or (eobp) (not (= ?w (char-syntax (char-after))))))
      (dabbrev-expand arg)
    (indent-according-to-mode)))

(defun my-tab-fix ()
  (local-set-key [tab] 'indent-or-expand))
 
(add-hook 'text-mode-hook       'my-tab-fix) ;; for auctex
(add-hook 'c++-mode-hook       'my-tab-fix) ;; for c++ 
;; and so on
---------------

Have a nice day



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

* Re: Completion in Auctex
  2008-09-22  6:53 ` Completion in Auctex denebet
@ 2008-09-22 16:48   ` Phil Lord
  2008-09-23 11:26     ` Rupert Swarbrick
  2008-09-23 13:01     ` Andreas Politz
  0 siblings, 2 replies; 7+ messages in thread
From: Phil Lord @ 2008-09-22 16:48 UTC (permalink / raw)
  To: help-gnu-emacs

On Sep 22, 7:53 am, denebet <dene...@lechebet.bzh> wrote:
> Ross A. Laird wrote:
> > I don't know if this is what you are looking for, but in auctex you can
> > type M-/ (alt-forward slash) and it will complete words that are not
> > commands (e.g. words that exist previously in the document).
>
> Thanks.
>
> Yes, this is what I was looking for but didn't find it because a long time
> ago I set completion in programming modes  to [TAB] and forgot to  set it
> for text mode.
> In case it could be useful for people reading this group and who think that
> M-/  is not a very user friendly shortcut :


You might also want to try pabbrev.el; it's tab completion with
continual, as-you-type feedback. While some people find this a little
disturbing, I think it's great and very quick. In general, pabbrev.el
is so wonderful that I think the author should be given a Nobel
prize.

I leave M-/ bound to hippie expand, for when I want to complete
"deliberately", as it were.

Phil


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

* Re: Completion in Auctex
  2008-09-22 16:48   ` Phil Lord
@ 2008-09-23 11:26     ` Rupert Swarbrick
  2008-09-23 12:11       ` Sébastien Vauban
  2008-09-23 13:01     ` Andreas Politz
  1 sibling, 1 reply; 7+ messages in thread
From: Rupert Swarbrick @ 2008-09-23 11:26 UTC (permalink / raw)
  To: help-gnu-emacs

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

Phil Lord <phil.lord.bio@googlemail.com> writes:

> You might also want to try pabbrev.el; it's tab completion with
> continual, as-you-type feedback. While some people find this a little
> disturbing, I think it's great and very quick. In general, pabbrev.el
> is so wonderful that I think the author should be given a Nobel
> prize.
>

Hmm that's interesting. Have you used pabbrev with auctex? I used to use
it for all modes, but ended up switching it off for latex documents
since it wasn't good at working out partitions between bits of maths and
thus suggested all sorts of crazy "half-completions" when you wrote
e.g. $x_.

If there's a way to customize it to work out word boundaries(?) more
accurately, I'd be really interested to hear. As it is, I tend to use
DIY "C-x a l" and \newcommand...

Rupert

[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]

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

* Re: Completion in Auctex
  2008-09-23 11:26     ` Rupert Swarbrick
@ 2008-09-23 12:11       ` Sébastien Vauban
  0 siblings, 0 replies; 7+ messages in thread
From: Sébastien Vauban @ 2008-09-23 12:11 UTC (permalink / raw)
  To: help-gnu-emacs-mXXj517/zsQ

Hello,

I tried to use `pabbrev' since a couple of hours, but I have
problems with it. Though, it seems to be exactly what I was
looking for for years... So, I'd love to have it working...

Sometimes, when "tabbing" for completion, it opens a new window
with some possible completions. The problem is I can't go out of
it, by no means (typing the number of the preferred completion,
typing <RET>, typing <DEL>, etc. -- nothing works!).

Under Windows, I could get this backtrace, which is exactly the
message I had as well in Ubuntu:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "Attempt to delete the sole visible or iconified frame")
  delete-frame()
  (if (one-window-p t) (delete-frame) (old-delete-window (selected-window)))
  delete-window(#<window 3 on *Backtrace*>)
  (if (or pabbrev-mode (eq ... " *pabbrev suggestions*")) nil (delete-window (get-buffer-window " *pabbrev suggestions*")) (set-window-configuration pabbrev-window-configuration))
  (unless (or pabbrev-mode (eq ... " *pabbrev suggestions*")) (delete-window (get-buffer-window " *pabbrev suggestions*")) (set-window-configuration pabbrev-window-configuration))
  pabbrev-suggestions-delete-window()
  (let ((point)) (save-excursion (set-buffer pabbrev-suggestions-from-buffer) (let ... ...)) (pabbrev-suggestions-delete-window) (if point (goto-char point)))
  pabbrev-suggestions-insert("want")
  (if (< insert-index (length pabbrev-suggestions-done-suggestions)) (pabbrev-suggestions-insert (car ...)))
  (let ((insert-index ...)) (if (< insert-index ...) (pabbrev-suggestions-insert ...)))
  pabbrev-suggestions-select()
  call-interactively(pabbrev-suggestions-select nil nil)
--8<---------------cut here---------------end--------------->8---

Though, I don't understand why some window is popping up at some
point in time?

Can somebody help?

Thank you in advance,
  Seb

PS- Tabbing on hel[p] just above made the following window
    appear:

        ,----
        | Best Match: help
        | 0) help 1) help-gnu-emacs 
        `----

    But it's impossible to get out of it. And the result on the "to
    be completed word" is a complete mess... ;-((

-- 
Sébastien Vauban


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

* Re: Completion in Auctex
  2008-09-22 16:48   ` Phil Lord
  2008-09-23 11:26     ` Rupert Swarbrick
@ 2008-09-23 13:01     ` Andreas Politz
  2008-09-24  8:12       ` Sébastien Vauban
  1 sibling, 1 reply; 7+ messages in thread
From: Andreas Politz @ 2008-09-23 13:01 UTC (permalink / raw)
  To: help-gnu-emacs

Phil Lord wrote:

> You might also want to try pabbrev.el; it's tab completion with
> continual, as-you-type feedback. While some people find this a little
> disturbing, I think it's great and very quick. In general, pabbrev.el
> is so wonderful that I think the author should be given a Nobel
> prize.
> 
> I leave M-/ bound to hippie expand, for when I want to complete
> "deliberately", as it were.
> 
> Phil

I tried pabbrev. There seems to be a difference in documentation and behaviour.
The comments say that 1 x TAB completes the current suggestion and 2 x TAB opens
the suggestion buffer. But it actually seems to be the other way around.

I think the behaviour, as explained in the commentary, is far more desirable.
But I wonder what is wrong here.

-ap


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

* Re: Completion in Auctex
  2008-09-23 13:01     ` Andreas Politz
@ 2008-09-24  8:12       ` Sébastien Vauban
  0 siblings, 0 replies; 7+ messages in thread
From: Sébastien Vauban @ 2008-09-24  8:12 UTC (permalink / raw)
  To: help-gnu-emacs-mXXj517/zsQ

Hello,

>> You might also want to try pabbrev.el; it's tab completion
>> with continual, as-you-type feedback.
>
> I tried pabbrev. There seems to be a difference in
> documentation and behaviour. The comments say that 1 x TAB
> completes the current suggestion and 2 x TAB opens the
> suggestion buffer. But it actually seems to be the other way
> around.
>
> I think the behaviour, as explained in the commentary, is far
> more desirable. But I wonder what is wrong here.

As I said yesterday, I also have problems with it. Now, I've
narrowed down to when problem occurs:

    o   pressing 1 x TAB on a proposition works great, if there
        is only one possible completion;

    o   pressing 2 x TAB on a proposition leads to problems when
        multiple completions are possible.

I don't understand why (yet), but I see the problem occurring
when `pabbrev' opens a completely new buffer taking the full
frame space.

When it opens a smaller buffer above or below the current one
(in which we edit), the behavior is totally correct, and the
really desired one!

Hope we will understand, so that the problems will go away -- as
this is really a fantastic mode, as far as I've already seen.

Best regards,
  Seb

-- 
Sébastien Vauban


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

end of thread, other threads:[~2008-09-24  8:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.19657.1222028522.18990.help-gnu-emacs@gnu.org>
2008-09-22  6:53 ` Completion in Auctex denebet
2008-09-22 16:48   ` Phil Lord
2008-09-23 11:26     ` Rupert Swarbrick
2008-09-23 12:11       ` Sébastien Vauban
2008-09-23 13:01     ` Andreas Politz
2008-09-24  8:12       ` Sébastien Vauban
2008-09-21 20:21 Ross A. Laird

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.