unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* eldoc-mode can't enabled in sql-mode
@ 2020-03-07 13:41 stardiviner
  2020-03-07 16:10 ` Štěpán Němec
  0 siblings, 1 reply; 7+ messages in thread
From: stardiviner @ 2020-03-07 13:41 UTC (permalink / raw)
  To: Emacs Help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


I found I can't enable "eldoc-mode" in "sql-mode". No matter how I enable it
with [M-x eldoc-mode] or [M-: (eldoc-mode)] or (turn-on-eldoc-mode).

I only got this message output:

There is no ElDoc support in this buffer

What's the problem?

- -- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5jpIEUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsPosQf/TUDjSCdliCRotq96JMe9GhdM4ddI
/g5EaEOfxyIazlzzcjysL88kcF97CINlTC2es1sx9sQfsMCD8v65DF5cMmxqtxsD
hUXbfawsTyk7kX4Ya6kNnzacugv1fMuubSf7cgTZ2d0e25UD5jyH2bRBWpglMxfT
t1iXsG9tOUAqVetgN/p77z6EQcxuk5EsJlC7Ge5ACmXu+m7M7jn097+co5sIhDVF
rOKAImVkN8GiWsTnWD4VyOfhMXJrDXogwpxlreBtMlAhRI8YeP/i7bh5tHuMdgMb
hCGGlVp0bJloqRsigYLa++s9pPBXgvB56omQnr1Z4uFk/iWKD6u9d9YOuA==
=PnNq
-----END PGP SIGNATURE-----



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

* Re: eldoc-mode can't enabled in sql-mode
  2020-03-07 13:41 eldoc-mode can't enabled in sql-mode stardiviner
@ 2020-03-07 16:10 ` Štěpán Němec
  2020-03-08  2:32   ` stardiviner
  2020-03-08  2:35   ` stardiviner
  0 siblings, 2 replies; 7+ messages in thread
From: Štěpán Němec @ 2020-03-07 16:10 UTC (permalink / raw)
  To: stardiviner; +Cc: Emacs Help

On Sat, 07 Mar 2020 21:41:21 +0800
stardiviner wrote:

> I found I can't enable "eldoc-mode" in "sql-mode". No matter how I enable it
> with [M-x eldoc-mode] or [M-: (eldoc-mode)] or (turn-on-eldoc-mode).
>
> I only got this message output:
>
> There is no ElDoc support in this buffer
>
> What's the problem?

As the message says: ElDoc needs some support to function, and sql-mode
does not provide it. The support involves modifying the value of
'eldoc-documentation-function', or, since Emacs 28,
'eldoc-documentation-functions'.

Adding such support is typically very easy if it makes sense for a mode.
You might try your hand at it yourself, I'm sure a patch would be
welcome.

-- 
Štěpán



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

* Re: eldoc-mode can't enabled in sql-mode
  2020-03-07 16:10 ` Štěpán Němec
@ 2020-03-08  2:32   ` stardiviner
  2020-03-08  2:35   ` stardiviner
  1 sibling, 0 replies; 7+ messages in thread
From: stardiviner @ 2020-03-08  2:32 UTC (permalink / raw)
  To: Štěpán Němec; +Cc: Emacs Help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Štěpán Němec <stepnem@gmail.com> writes:

> On Sat, 07 Mar 2020 21:41:21 +0800
> stardiviner wrote:
>
>> I found I can't enable "eldoc-mode" in "sql-mode". No matter how I enable it
>> with [M-x eldoc-mode] or [M-: (eldoc-mode)] or (turn-on-eldoc-mode).
>>
>> I only got this message output:
>>
>> There is no ElDoc support in this buffer
>>
>> What's the problem?
>
> As the message says: ElDoc needs some support to function, and sql-mode
> does not provide it. The support involves modifying the value of
> 'eldoc-documentation-function', or, since Emacs 28,
> 'eldoc-documentation-functions'.

I use ejc-sql's eldoc support.

Here is the doc: https://github.com/kostafey/ejc-sql#eldoc

Here is the source code:

https://github.com/kostafey/ejc-sql/blob/master/ejc-eldoc.el

I use the entry function `ejc-eldoc-setup' as doc said. But eldoc-mode report
upper warning "no support". This is weird.

>
> Adding such support is typically very easy if it makes sense for a mode.
> You might try your hand at it yourself, I'm sure a patch would be
> welcome.


- -- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5kWUgUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsPsQwgAmSLA0ajUEz95bxSjW96HcY11Dfnk
bwK3HLgFJ8M8c1i0tP8UNuE2cjzWcPjIaE2fFB7RFGEsAdDCqmqbWfU073ycmWZQ
Uo/lW5y+kosMCY+gho1a3yu5p5SGgwWdsAOZzqbpRHvAK/0XxMTDAY3Dppo0qmx5
theNMbr30zD8faf3Dmaj9iFjU/a/Z+eyWnrSzP/tSPvqRpX3jlDqDPsRWDjbvEdQ
KmmI78vaeS63znImDxHf+IGJhYLMd+qHtUl7LJpgF2hxfg08Rsg24KKNAH0ywIEb
7Uxx+5qLDTgNqsgNG3EKDXRamGTOg0wuTNHoLQqecohm9ooMhnDtFckafw==
=ks4+
-----END PGP SIGNATURE-----



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

* Re: eldoc-mode can't enabled in sql-mode
  2020-03-07 16:10 ` Štěpán Němec
  2020-03-08  2:32   ` stardiviner
@ 2020-03-08  2:35   ` stardiviner
  2020-03-08  2:47     ` Štěpán Němec
  1 sibling, 1 reply; 7+ messages in thread
From: stardiviner @ 2020-03-08  2:35 UTC (permalink / raw)
  To: Štěpán Němec; +Cc: Emacs Help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Štěpán Němec <stepnem@gmail.com> writes:

> On Sat, 07 Mar 2020 21:41:21 +0800
> stardiviner wrote:
>
>> I found I can't enable "eldoc-mode" in "sql-mode". No matter how I enable it
>> with [M-x eldoc-mode] or [M-: (eldoc-mode)] or (turn-on-eldoc-mode).
>>
>> I only got this message output:
>>
>> There is no ElDoc support in this buffer
>>
>> What's the problem?
>
> As the message says: ElDoc needs some support to function, and sql-mode
> does not provide it. The support involves modifying the value of
> 'eldoc-documentation-function', or, since Emacs 28,
> 'eldoc-documentation-functions'.

I guess this problem is related to my two days ago, I re-compiled Emacs from
master branch which version should be 28.

So I did this:

(add-to-list 'eldoc-documentation-functions 'ejc-eldoc-function)

Then eldoc-mode can be enabled. Even though the problem is solved. But this
still has issue, why setting ~eldoc-documentation-function~ does not work?

>
> Adding such support is typically very easy if it makes sense for a mode.
> You might try your hand at it yourself, I'm sure a patch would be
> welcome.


- -- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5kWfAUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsPNjwf+ISo4dgWxZI8bOlrPUcKkj3+rRYrx
lmMsHnCR9NvF7Y0UBhvza8FCBlumjPkobL2TTy7tKt4wc6RECLezrSuqGKnaOBGF
M45jN0OuDg6B2cebomQY5hwFUYwPnKeJn6x5PNNYAy8G4wm6bLXEomdS1T7cHM5a
n6A1TcVxQtVS3fNqPTIBbLtKNaezdrMAKOYL6KXj+774V2UQ/YGnsK8j8c5VydRE
bVq4gUhciZPDYN9JwpldtaIKaS5KjQjLmgCb5lUa3FKBIuax1AGoHmjBKfFTq6im
4850h9cP/FH9oJ0jq+cxrU/kYKz3wYCZnfdNaNUHOY5bnVTnYaLu/vsViQ==
=o4Jb
-----END PGP SIGNATURE-----



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

* Re: eldoc-mode can't enabled in sql-mode
  2020-03-08  2:35   ` stardiviner
@ 2020-03-08  2:47     ` Štěpán Němec
  2020-03-08 10:37       ` [SOLVED] " stardiviner
  2020-03-08 10:39       ` Dmitry Gutov
  0 siblings, 2 replies; 7+ messages in thread
From: Štěpán Němec @ 2020-03-08  2:47 UTC (permalink / raw)
  To: stardiviner; +Cc: Emacs Help

On Sun, 08 Mar 2020 10:35:28 +0800
stardiviner wrote:

>  Even though the problem is solved. But this still has issue, why
> setting ~eldoc-documentation-function~ does not work?

As I wrote in the previous message, the API has changed recently:

https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c0fcbd2c11

-- 
Štěpán



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

* [SOLVED] Re: eldoc-mode can't enabled in sql-mode
  2020-03-08  2:47     ` Štěpán Němec
@ 2020-03-08 10:37       ` stardiviner
  2020-03-08 10:39       ` Dmitry Gutov
  1 sibling, 0 replies; 7+ messages in thread
From: stardiviner @ 2020-03-08 10:37 UTC (permalink / raw)
  To: Štěpán Němec; +Cc: Emacs Help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Štěpán Němec <stepnem@gmail.com> writes:

> On Sun, 08 Mar 2020 10:35:28 +0800
> stardiviner wrote:
>
>>  Even though the problem is solved. But this still has issue, why
>> setting ~eldoc-documentation-function~ does not work?
>
> As I wrote in the previous message, the API has changed recently:
>
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c0fcbd2c11

Thanks Štěpán, I have propose an PR to ejc-sql now. https://github.com/kostafey/ejc-sql/pull/128

- -- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5kys8UHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsNz5Af9Ggeafu1oSXERFr/YNQDo9Q7LyOV3
AF17aCzTL1OT1GQ+yO+6JpPb30Owy3ES+eOcU+8eM9QMIqfVoGwq5z8mefmyzbDy
WCk3Mtunbbncj0s+d9ERrbsYoh8A9D5J4qRlOkA0f/H0q5BjdRKnFTfOR+kAASUs
gR4YpIm2dqJLzhEe9zYzCiD7MdhfX/FcfWsFL+bnwTfeJgN/U/H+7JFvsCUxrD8i
MisEfJSeWlnt/2FVFHQTCCsNV2FZHcUqJ2eNvHIdqIH/S88vGZ1XPX9K5oS4H8Ve
8fcq1oR7JDfsB1Etz5pVLmzQ5T9u1xzmboPP0VzV3rQRbQKKCUlOT+Jevw==
=n5r4
-----END PGP SIGNATURE-----



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

* Re: eldoc-mode can't enabled in sql-mode
  2020-03-08  2:47     ` Štěpán Němec
  2020-03-08 10:37       ` [SOLVED] " stardiviner
@ 2020-03-08 10:39       ` Dmitry Gutov
  1 sibling, 0 replies; 7+ messages in thread
From: Dmitry Gutov @ 2020-03-08 10:39 UTC (permalink / raw)
  To: Štěpán Němec, stardiviner; +Cc: Mark Oteiza, Emacs Help

On 08.03.2020 4:47, Štěpán Němec wrote:
> On Sun, 08 Mar 2020 10:35:28 +0800
> stardiviner wrote:
> 
>>   Even though the problem is solved. But this still has issue, why
>> setting ~eldoc-documentation-function~ does not work?
> As I wrote in the previous message, the API has changed recently:
> 
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c0fcbd2c11

Hmm, shouldn't that change have been backward-compatible?



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

end of thread, other threads:[~2020-03-08 10:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-07 13:41 eldoc-mode can't enabled in sql-mode stardiviner
2020-03-07 16:10 ` Štěpán Němec
2020-03-08  2:32   ` stardiviner
2020-03-08  2:35   ` stardiviner
2020-03-08  2:47     ` Štěpán Němec
2020-03-08 10:37       ` [SOLVED] " stardiviner
2020-03-08 10:39       ` Dmitry Gutov

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).