From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Re: Better ways to inspect text properties? Date: Sat, 29 Oct 2022 22:08:14 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2232"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Samuel Wales , Mariano Montone Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 30 02:09:06 2022 Return-path: Envelope-to: geh-help-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 1oowoz-0000Mi-66 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 30 Oct 2022 02:09:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oowoQ-0001VS-Nc; Sat, 29 Oct 2022 21:08:30 -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 1oowoP-0001VG-LS for help-gnu-emacs@gnu.org; Sat, 29 Oct 2022 21:08:29 -0400 Original-Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oowoN-0008P5-Ro for help-gnu-emacs@gnu.org; Sat, 29 Oct 2022 21:08:29 -0400 Original-Received: by mail-io1-xd30.google.com with SMTP id e15so7434091iof.2 for ; Sat, 29 Oct 2022 18:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oCGaJ2vJtN0tuh7umO41ZWCwR+E2qXBN7dJTG8MydDY=; b=Wzwe7D5QQRc1ekXgPtanJfDKbhe2o8678aYUTjdqBuARu6Pf1fYWcz284xXrUOCha7 ryznQFrUxUSfiKj4u0dgoD66y6PQKMYp7WZfD+5yOQFkfJsc0C8pnRm7KuXMqncVYS9c /fTsZQBpNWk5tPrr/eVAD/FNlLVdK9y8KoKkwuunW2oPK3+MhKDkNI/lbWzkMOVriZ2j w2gp0iJS7ELrwUGGvYEa1PYgNK2Vp74iqY9fHighsXlDNCvc1qJ6d0qkK0DKXZln1yNV QsEGv6ZVp6+CKQHvFYMl5ijBBeOCX/sbFJxRr9USLZc6XJLDM1wBVpCy1TxqNBv+askk sUAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oCGaJ2vJtN0tuh7umO41ZWCwR+E2qXBN7dJTG8MydDY=; b=HhPeLrqrrQu0sPnRlkxpFzLeAMTEjEudxseKCaW2ohRCdIkFOVJyigYLXdLJwHpV65 NJELis8GK/OsmIS38TWTps+4FcUKqYz4jk0LRAc+TBZCoGegETBkMLKxHe/uPSxScW2U wLSOHGiJoV53ZrdS/bPCCcd67xw8hVwfqIrYamXj+LFXeqtjGuSMqKRRZalUz6G1o7sY sXs7AyjvJ8NyUBNMCE3drSr63T2pnP9loWgL5JOBmKxKpbI7VeDGDbLRI++Zqncomcgc 7gJw/mXgTXZJiAWwV3yNsfbPJd/YOWeDcZEWoNUP6YGm9RRvmzWQMgom0HE8pn9O2EXK k12Q== X-Gm-Message-State: ACrzQf08S4q6JALFwSEa6nxLyhv1mh+nBZtgu0pRH+4miSReGTQQxkUB SlqrSoCuHE/LQh40ZBnV6krC5TSkeTsygXAVHe0= X-Google-Smtp-Source: AMsMyM709m6AubyD6+l9A2Lncghyz+Rngh5RmZCSMRIOnzMLtQ9xa4RXr8YND7KofuAX9cPatbNrK3KH81NzPYv8WLc= X-Received: by 2002:a6b:3f04:0:b0:6bc:75c4:586a with SMTP id m4-20020a6b3f04000000b006bc75c4586amr3050831ioa.83.1667092106150; Sat, 29 Oct 2022 18:08:26 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d30; envelope-from=eduardoochs@gmail.com; helo=mail-io1-xd30.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "help-gnu-emacs" Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140502 Archived-At: On Sat, 29 Oct 2022 at 20:46, Samuel Wales wrote: > > a good question imo! tangentially, by coincidence i was wanting some > similar things to understand better. > > showing the output prettily would be great. c-u c-x = is just a bit > limited. some kind of inspector? > > what if we could show all text properties in a buffer kind of like visible-mode? > > is it possible to diff two buffers completely? i.e. not only the text > as shown [or folded] but the properties too? > > that would allow regression testing of changes that affect only text > properties. i don't mean displaying colors or so as a bespoke > non-traditional diff but rather the text property differnces as text. > > can a buffer with text properties be saved to a file and reloaded > preserving properties? > > what about visibility and folding? could they be preserved like that > also? my regression testing could be improved. > > i also still struggle with visibility and folding and the fucntios for > getting visible-only parts of a buffer, or copying and inserting in > buffers, or looping only visible lines etc. i keep getting results i > do not expect. [cannot debug now.] e.g. i am in magit and it is > partly folded and i want to do various programmatic copy or operate > type operations on visible. > > i have not even yet found a good protocol for pp and frineds yet to > insert nicely into buffer at point, when called after a pp expression > with c-x c-=. even for a paren-containing sexp, not only a string > with text properties. > > so idk it is probably just me and not finding documentation that suits > me well for it, but it seems a ripe area. Hi Samuel! By "an inspector" do you mean like what this package does? https://github.com/mmontone/emacs-inspector I have just tried this (defun inspector-inspect-region (b e) (interactive "r") (inspector-inspect-expression (buffer-substring b e))) in a grep buffer, and it seems that the current version of inspector doesn't have support for treating strings with text properties as trees... and then I tried this on the same grep buffer, (defun inspector-inspect-region (b e) (interactive "r") (inspector-inspect-expression '(ee-string-intervals (buffer-substring b e)))) where ee-string-intervals is the function defined here, (find-eev "eev-blinks.el" "find-eregionpp") http://angg.twu.net/eev-current/eev-blinks.el.html#find-eregionpp and it worked very well - it was even able to show that certain #s(...) objects are structs of the kind "compilation--message", and it showed its slots. I have added inspector's author - Mariano Montone - to the list of recipients of this message, let's see what happens... =) Cheers, Eduardo Ochs http://angg.twu.net/eepitch.html