all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Sarah Weissman <seweissman@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: complete-tag at the end of a buffer
Date: Sat, 09 Feb 2013 16:47:27 +0400	[thread overview]
Message-ID: <87d2w9ac2o.fsf@yandex.ru> (raw)
In-Reply-To: <CAK=EPVDjifSQPeVKigV5exE4xmkprFU=xWNx9d6APe47c5ufNw@mail.gmail.com> (Sarah Weissman's message of "Fri, 8 Feb 2013 21:51:21 -0500")

Sarah Weissman <seweissman@gmail.com> writes:

> I thought I could implement general tab completion using tags in a
> custom mode by following the advice found here:
> http://emacsblog.org/2007/03/12/tab-completion-everywhere/
> and simply replacing the call to dabbrev-expand with a call to
> complete-tag. This worked fine, except when trying to do completion at
> the end of the buffer, which generates an end-of-buffer error. This
> seems to be because tags-completion-at-point-function (called by
> complete-tags) is using forward-char without checking that it might go
> past the end. To get around this I wrote my own version of
> tags-completion-at-point-function, just to add in the extra check
> around each call to forward char, and my own version of complete-tag
> to call this function, but this seems kind of silly. Am I using the
> wrong entry point for completing tags in a normal buffer? Or is this a
> bug? Below I've included the original version and my version for
> tags-completion-at-point-function, for reference.

I'm pretty sure it's a bug.
It should be able to complete anywhere in the buffer.



      reply	other threads:[~2013-02-09 12:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-09  2:51 complete-tag at the end of a buffer Sarah Weissman
2013-02-09 12:47 ` Dmitry Gutov [this message]

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=87d2w9ac2o.fsf@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=help-gnu-emacs@gnu.org \
    --cc=seweissman@gmail.com \
    /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.