all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: RE: find-tag-default
Date: Mon, 24 May 2004 09:49:57 -0700	[thread overview]
Message-ID: <FDELKNEBLPKKDCEBEJCBKEOPCEAA.drew.adams@oracle.com> (raw)
In-Reply-To: <E1BReHt-0007Zd-9y@fencepost.gnu.org>

Belated, and possibly irrelevant, but FYI -

Library thingatpt+.el provides additions and enhancements to thingatpt.el:

1) An optional syntax-table argument is used to determine the bounds.

2) New functions (e.g. symbol-nearest-point) don't require point to be on
the name you want. Here's how "nearest" is defined:

    The nearest symbol on the same line is returned, if there is any.
        Between two symbols equidistant from point on the same line, the
        leftmost is considered nearer.
    Otherwise, neighboring lines are tried in sequence:
        previous, next, 2nd previous, 2nd next, 3rd previous, 3rd next, etc.
        This means that between two symbols equidistant from point in
        lines above and below it, the symbol in the line above point
        (previous Nth) is considered nearer to it.

The code is here: http://www.emacswiki.org/elisp/thingatpt-plus.el.

You might consider using a similar "nearest" functionality in Emacs. In my
own code, I use it in commands like describe-variable. I prefer to have a
default value in the minibuffer for such commands (I use backward-kill-sexp,
bound to C-M-backspace, to remove it if it's inappropriate). I find that
"nearest" usually DTRT.

 - Drew

-----Original Message-----
From: Richard Stallman

    Currently there are different methods for obtaining an identifier
    at point:
    - `find-tag-default' and `find-tag-default-function' from etags.el
    - `symbol-at-point' from thingatpt.el
    - info-look.el which has the most advanced implementation since
      it defines regular expressions and parsing rules for guessing
      the default identifier for 20 major modes (and one special
      function `info-lookup-guess-c-symbol' for C mode).

    So to create right contents of `identifier-at-point' these packages
    could be generalized.

Is it clear that using the info-look code would be best for everything
that uses the other two functions?

If so, let's do that.

  reply	other threads:[~2004-05-24 16:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-13  6:37 find-tag-default Juri Linkov
2004-05-16 13:21 ` find-tag-default Richard Stallman
2004-05-19  8:45   ` find-tag-default Juri Linkov
2004-05-19 18:35     ` find-tag-default Kevin Rodgers
2004-05-19 19:01     ` find-tag-default Richard Stallman
2004-05-20  8:09       ` find-tag-default Juri Linkov
2004-05-20  9:14         ` find-tag-default Juri Linkov
2004-05-21  1:27         ` find-tag-default Richard Stallman
2004-05-21  8:05           ` find-tag-default Juri Linkov
2004-05-22 21:44             ` find-tag-default Richard Stallman
2004-05-24 16:49               ` Drew Adams [this message]
2004-05-29  1:44                 ` find-tag-default Richard Stallman
2004-05-29 17:43                   ` find-tag-default Drew Adams
2004-05-30 19:41                     ` find-tag-default Richard Stallman

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=FDELKNEBLPKKDCEBEJCBKEOPCEAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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.