help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grab and yank


From: Richard Riley
Subject: Re: Grab and yank
Date: Sun, 24 Jan 2010 18:47:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

"Drew Adams" <address@hidden> writes:

>> >> thingatpt+ might be a good place for this?
>> >> http://www.emacswiki.org/emacs/thingatpt+.el
>> >
>> > Why?
>> 
>> It's an existing documented library of things that 
>> specialises in doing "things at point"...
>
> I think Andrea wanted something that:
>
>  (a) goes and gets a function definition
>      (from a tags file or the function's source code)
>  (b) returns to the original location, and
>  (c) yanks the definition at point.
>
> The thing-at-pt functions pick up stuff at or near point.
> They don't (and shouldn't) do excursion stuff or yanking.
>
> That said, these functions in `thingatpt+.el' might be of some use in this
> context: `region-or-word-nearest-point', `region-or-word-at-point'. They pick 
> up
> the active region or (if inactive) the word nearest/at point.
>

That was my thinking of it. And to be honest I'm not sure yank is out of
the realms of a "thing at pt" functionality. Anyway, I wanted to bring
attention to the library too since that might well help Andrea. I know
it did me when I first started scratching around trying to find simple
functions to get the word or region at pt without needing to learn about
the myriad of ways mark and point interact.

-- 
Google Talk : address@hidden  http://www.google.com/talk
ASCII ribbon campaign ( )
 - against HTML email  X
             & vCards / \





reply via email to

[Prev in Thread] Current Thread [Next in Thread]