unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master b21015c: Clarify project-find-file doc string
       [not found] ` <20201112123627.D3F1B20A27@vcs0.savannah.gnu.org>
@ 2020-11-12 18:31   ` Dmitry Gutov
  2020-11-14 15:34     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Gutov @ 2020-11-12 18:31 UTC (permalink / raw)
  To: emacs-devel, Lars Ingebrigtsen

On 12.11.2020 14:36, Lars Ingebrigtsen wrote:

> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index a648618..09e60c0 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -745,8 +745,7 @@ pattern to search for."
>   ;;;###autoload
>   (defun project-find-file ()
>     "Visit a file (with completion) in the current project.
> -The completion default is the filename at point, if one is
> -recognized."
> +The completion default is the string at point."

That seems a little vague, doesn't it?

What is a "string a point"?



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

* Re: master b21015c: Clarify project-find-file doc string
  2020-11-12 18:31   ` master b21015c: Clarify project-find-file doc string Dmitry Gutov
@ 2020-11-14 15:34     ` Lars Ingebrigtsen
  2020-11-14 17:15       ` Dmitry Gutov
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-14 15:34 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

Dmitry Gutov <dgutov@yandex.ru> writes:

>> -The completion default is the filename at point, if one is
>> -recognized."
>> +The completion default is the string at point."
>
> That seems a little vague, doesn't it?
>
> What is a "string a point"?

Would "string under point" be clearer?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: master b21015c: Clarify project-find-file doc string
  2020-11-14 15:34     ` Lars Ingebrigtsen
@ 2020-11-14 17:15       ` Dmitry Gutov
  2020-11-16 21:27         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Gutov @ 2020-11-14 17:15 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

On 14.11.2020 17:34, Lars Ingebrigtsen wrote:
> Dmitry Gutov <dgutov@yandex.ru> writes:
> 
>>> -The completion default is the filename at point, if one is
>>> -recognized."
>>> +The completion default is the string at point."
>>
>> That seems a little vague, doesn't it?
>>
>> What is a "string a point"?
> 
> Would "string under point" be clearer?

No, it's the same. Where does a string start or end? You can put the 
whole buffer into a string.

The original text tried to point out that it picks up a string that 
resembles a file name, in particular by calling (thing-at-point 'filename).

I don't have a specific wording to suggest, but it would be nice if your 
change (aiming to tell the user that the file name may not exist, 
right?) didn't remove that existing information.



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

* Re: master b21015c: Clarify project-find-file doc string
  2020-11-14 17:15       ` Dmitry Gutov
@ 2020-11-16 21:27         ` Lars Ingebrigtsen
  2020-11-16 21:36           ` Dmitry Gutov
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-16 21:27 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

Dmitry Gutov <dgutov@yandex.ru> writes:

> I don't have a specific wording to suggest, but it would be nice if
> your change (aiming to tell the user that the file name may not exist,
> right?) didn't remove that existing information.

I think the previous doc string was misleading, and the current is just
vague, but hard to misinterpret (unless you're really trying).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: master b21015c: Clarify project-find-file doc string
  2020-11-16 21:27         ` Lars Ingebrigtsen
@ 2020-11-16 21:36           ` Dmitry Gutov
  2020-11-16 21:51             ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Gutov @ 2020-11-16 21:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

On 16.11.2020 23:27, Lars Ingebrigtsen wrote:
> I think the previous doc string was misleading, and the current is just
> vague, but hard to misinterpret (unless you're really trying).

I think it's illogical. There's no such thing as "string at point" in 
Emacs. Or under point, or around point, etc.

Not without specifying what kind of string it must be.



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

* RE: master b21015c: Clarify project-find-file doc string
  2020-11-16 21:36           ` Dmitry Gutov
@ 2020-11-16 21:51             ` Drew Adams
  2020-11-16 22:00               ` Dmitry Gutov
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2020-11-16 21:51 UTC (permalink / raw)
  To: Dmitry Gutov, Lars Ingebrigtsen; +Cc: emacs-devel

> There's no such thing as "string at point" in
> Emacs. Or under point, or around point, etc.
> Not without specifying what kind of string it must be.

Why do you think so?

`ffap-string-at-point':
Return a string of characters from around point.

`comint-extract-string':
Return string around point, or nil.
___

My library thingatpt+.el defines these, based
loosely on `comint-extract-string':

`string-at-point'
`string-nearest-point'
`string-contents-at-point'
`string-contents-nearest-point'

The last two are the same as the first two,
except they don't include the string delimiters.

https://www.emacswiki.org/emacs/download/thingatpt%2b.el



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

* Re: master b21015c: Clarify project-find-file doc string
  2020-11-16 21:51             ` Drew Adams
@ 2020-11-16 22:00               ` Dmitry Gutov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Gutov @ 2020-11-16 22:00 UTC (permalink / raw)
  To: Drew Adams, Lars Ingebrigtsen; +Cc: emacs-devel

On 16.11.2020 23:51, Drew Adams wrote:
>> There's no such thing as "string at point" in
>> Emacs. Or under point, or around point, etc.
>> Not without specifying what kind of string it must be.
> 
> Why do you think so?

Because it's ill-defined, without extra details specified.

> `ffap-string-at-point':
> Return a string of characters from around point.
> 
> `comint-extract-string':
> Return string around point, or nil.

Have you noticed that these two functions implement two entirely 
different notions of "string at point"?

> ___
> 
> My library thingatpt+.el defines these, based
> loosely on `comint-extract-string':
> 
> `string-at-point'
> `string-nearest-point'
> `string-contents-at-point'
> `string-contents-nearest-point'
> 
> The last two are the same as the first two,
> except they don't include the string delimiters.
> 
> https://www.emacswiki.org/emacs/download/thingatpt%2b.el

And these obviously deal with the other kind of "string at point", not 
the one Lars referred to in the new docstring.



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

end of thread, other threads:[~2020-11-16 22:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20201112123626.18589.13771@vcs0.savannah.gnu.org>
     [not found] ` <20201112123627.D3F1B20A27@vcs0.savannah.gnu.org>
2020-11-12 18:31   ` master b21015c: Clarify project-find-file doc string Dmitry Gutov
2020-11-14 15:34     ` Lars Ingebrigtsen
2020-11-14 17:15       ` Dmitry Gutov
2020-11-16 21:27         ` Lars Ingebrigtsen
2020-11-16 21:36           ` Dmitry Gutov
2020-11-16 21:51             ` Drew Adams
2020-11-16 22:00               ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).