From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felician Nemeth Newsgroups: gmane.emacs.bugs Subject: bug#61072: How to change the length of the separation lines in eldoc, used by eglot? Date: Tue, 28 Mar 2023 17:16:00 +0200 Message-ID: <87o7oc6h5b.fsf@betli.tmit.bme.hu> References: <871qmyn51d.fsf@betli.tmit.bme.hu> <87pma3gcyw.fsf@betli.tmit.bme.hu> <87r0tq8bgp.fsf@betli.tmit.bme.hu> <87wn37ceo6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16996"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: 61072@debbugs.gnu.org, Wei-Ting Lin To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 28 17:17:42 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phB4v-0004GV-Oj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Mar 2023 17:17:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phB4e-0001uI-0D; Tue, 28 Mar 2023 11:17:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phB4I-0001pz-GX for bug-gnu-emacs@gnu.org; Tue, 28 Mar 2023 11:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phB4I-0001Ig-3k for bug-gnu-emacs@gnu.org; Tue, 28 Mar 2023 11:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phB4H-0003xl-VA for bug-gnu-emacs@gnu.org; Tue, 28 Mar 2023 11:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Mar 2023 15:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61072 X-GNU-PR-Package: emacs Original-Received: via spool by 61072-submit@debbugs.gnu.org id=B61072.168001657015160 (code B ref 61072); Tue, 28 Mar 2023 15:17:01 +0000 Original-Received: (at 61072) by debbugs.gnu.org; 28 Mar 2023 15:16:10 +0000 Original-Received: from localhost ([127.0.0.1]:50519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phB3S-0003wR-GY for submit@debbugs.gnu.org; Tue, 28 Mar 2023 11:16:10 -0400 Original-Received: from mail-ed1-f49.google.com ([209.85.208.49]:47065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phB3R-0003w8-9C for 61072@debbugs.gnu.org; Tue, 28 Mar 2023 11:16:09 -0400 Original-Received: by mail-ed1-f49.google.com with SMTP id eg48so51051158edb.13 for <61072@debbugs.gnu.org>; Tue, 28 Mar 2023 08:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680016563; h=content-transfer-encoding:mime-version:face:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=GP8hcorV6RH+0EdcsbDRfug8IPtx5qJXIpNxy30W3bQ=; b=S4IKhEJiuwe/r3j6tcjhfhDUR6EaN64YHunkz8ZRQ1zLntICKS99MR7akoTWvtmJlz npaqj7EuwuXDo3o5kn5dsfyQdPJKdPNVGbTyCkjFenlpt9CjHzLgYmwEMSmrBJkLKPOQ w+yodVciYVyFISh21fR6JwZJu/+kb5f6Qj0IWjbtmBnFMvTYY4RXqmm7TIxsc49wh4Mi I6Ggkgzam9EqE8fDcu5OBEkUVliiOvdQhDbPBN6WyldIU5jGuoH9GRQ5E/RThTJtPani yVQGlB2fQ2CRYIN9mHmPKwbytpZBP6IBF8pM9TEMSOpR8w9NdqgAki/EZ9P8oMa+t1z0 CxUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680016563; h=content-transfer-encoding:mime-version:face:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GP8hcorV6RH+0EdcsbDRfug8IPtx5qJXIpNxy30W3bQ=; b=3d0nZo1bx8Pyy938BOydVv2ODxJRzWP3HNoQ+QPnk/OdBq8iZSv6QLP2gf5uJomLVa x0WJDRW09N1dCXWFtF1YFDYhuTJai5dvPxXbuX4OnyUtYew04Jz3WhuOBBlbzEYFQdH6 y8pHF8j4TJ6Z5NpG+e17n9tBwSNop+Y4wLgMbZI22wa42/0G0CswXsMHmonT3KaU6/CB ESYx7KDf2o37BkTaf9FsXbcNDGKCzynokPeDs3z+YjRr2U1hUzEfeWreQUQ4mbyWqpPs pKsoAoQbacfuva3RL94rgLCe2STIGaCp/T5xeuBaJdM+BWHiDZh2Dw+/kp4IIuHJ+gLR 5q5A== X-Gm-Message-State: AAQBX9dniiiSgkw0ioNjRHNAJ/K0kobk+dOTKjRP0zQ3+83uvg3cCE0N 2daQXjxc5Ks8uTUNco1F4dAiM9deWKk= X-Google-Smtp-Source: AKy350by5ZzRR42kIx57bS/JOTFVUOs6kw+eggoKBsW0aulsrKcpy45gAURFxcl1w+QDXRX5R/7U8w== X-Received: by 2002:a17:906:5010:b0:92a:77dd:f6f with SMTP id s16-20020a170906501000b0092a77dd0f6fmr18104649ejj.73.1680016563261; Tue, 28 Mar 2023 08:16:03 -0700 (PDT) Original-Received: from betli.gmail.com (catv-86-101-66-128.catv.fixed.vodafone.hu. [86.101.66.128]) by smtp.gmail.com with ESMTPSA id ox7-20020a170907100700b008cf8c6f5c43sm15360126ejb.83.2023.03.28.08.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 08:16:02 -0700 (PDT) In-Reply-To: <87wn37ceo6.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 23 Mar 2023 21:59:21 +0000") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX5+fmhoaEwMDD/ ///TMNVWAAAAAWJLR0QDEQxM8gAAAAlwSFlzAAAPEgAADxIBIZvyMwAAAAd0SU1FB+AICBUfHgLs gGoAAAGXSURBVCjPRdK/b5tAFAfw753gBEwM2ApMbuVIqf+Ko0qiyhOu4sj2xJBYMn/FUdX7UUUZ OjHgyvf+yj6IcW6Bjx53934ADEvs8bmEr8UVoTYTOyJO9KoYsVofN8kILdbeJ8Li6YpZWop4xOK0 VdfIoXmkHn5/5D7/Ts/8THacSqnkKTcMTxgUkVzFnEIRTKwwYYSCvzfg16f0i8YApW/XG/Pm8R49 dXjxKmRnxv3OwooQWcv4RUYem1fsNe/WU63uk7AmYxk78y32/ee2tZB4fO+WcZ7lnIGEolXW1EGw LfkSuQ0XTgRefgNlfNwRNV6QhBxJ8JNxTMUPyBqTd0bjaAP5G7NJRU39z80hLOZTjqB7K3tEEFSj aEsuQew6qBxxyhHjVUR7H7NpC9iHJZGLMCEuweqAqE1BHbfK2oRIz9EHYA/+wiFWru9smeVfuWNZ 2+NFtX80UA1TvJNdytM4DwO4kY7bJz8Qcd0G0ceslZGkkeoBsjUHwF1+jjM3XHaXEZ7mGLfwPFO+ RV9QLY2iEdmDo78D/gNPaXVYqd+pyQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNi0wOC0wOFQyMzoz MDoyOCswMjowMGy/yHYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTYtMDgtMDhUMjM6MzA6MjgrMDI6 MDAd4nDKAAAAAElFTkSuQmCC X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258810 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > See docstring of eldoc-documentation-functions. The docstring is quite easy to follow. Nice work. > I stopped short of adding :content-type there. There's not much point > in moving rendering from Eglot to ElDoc if the rendering is going to > suck just as bad. So I think this has to be analyzed carefully. Here > are some ideas: > > 1. Use eww to render HTML, as you suggest. But how to get that HTML? > Call an external process? My idea was to leave the door open for a potential ElDoc backend that produces raw HTML documentation. But it is a half-backed idea. I don't know how images should be specified. Just as an IMG tag: . Or inline like in an email. If I understood correctly, one of your original ideas was to let ElDoc backends (Eglot) to specify a flag whether the documentation was in markdown format. Using terminology of the eldoc-documentation-functions, I simply suggested a :content-type key to generalize the markdown flag hoping Emacs had helper functions to help handling a content-type specification. Unfortunately, I now see a small problem with the :content-type approach. How should Eglot know whether ElDoc can render a markdown formatted documentation? If Eglot can request the documentation in multiple formats, how it should know which one to choose. > 2. You seem to suggest that eww can render markdown directly. Sure? This is a misunderstanding. I didn't intend to suggest that. > 3. Lobby for markdown.el to become more render-friendly, (remove hard > newlines from paragraphs, remove invisible text, etc.) Sure, but can a better markdown.el solve the original issue? Is there a way to render a separation line independently of the current window-width? > 4. Make a new Markdown mode based on a tree-sitter grammar I think a simple mode just to view a markdown document would be useful. However, tree-sitter only helps parse a document. Turning an abstract syntax tree into a viewable Emacs buffer is still a substantial work, I suppose. Felici=C3=A1n