unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 61658@debbugs.gnu.org
Subject: bug#61658: 30.0.50; server-eval-at might handle unreadable results better
Date: Wed, 22 Feb 2023 10:28:05 -0700	[thread overview]
Message-ID: <87wn49boey.fsf@melete.silentflame.com> (raw)
In-Reply-To: <83zg98tgb7.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 20 Feb 2023 19:09:00 +0200")

Hello,

On Mon 20 Feb 2023 at 07:09PM +02, Eli Zaretskii wrote:

>> From: Sean Whitton <spwhitton@spwhitton.name>
>> Date: Mon, 20 Feb 2023 09:25:34 -0700
>>
>> I use server-eval-at to call a function, in another daemon, which
>> returns a buffer.  So, server-eval-at tries (read "#<buffer *foo*>")
>> which of course fails, and indeed signals an error.
>>
>> I wonder if server-eval-at should return a special value to indicate
>> that the remote computation returned something that is not readably
>> printable?  Or signal a particular error, which the caller might catch?
>
> Why can't you make that function return something more sensible?  Or
> even just nil?

Yes, that is a way to handle cases like this.  I was thinking it might
be better to have

    (define-error 'server-return-invalid-read-syntax
                  "Remote function returned unreadable form"
                  'invalid-read-syntax)

for a more flexible way to handle the situation.

-- 
Sean Whitton





  reply	other threads:[~2023-02-22 17:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 16:25 bug#61658: 30.0.50; server-eval-at might handle unreadable results better Sean Whitton
2023-02-20 17:09 ` Eli Zaretskii
2023-02-22 17:28   ` Sean Whitton [this message]
2023-02-22 20:07     ` Eli Zaretskii
2023-02-23  0:24       ` Sean Whitton
2023-02-23  6:24         ` Eli Zaretskii
2023-02-23 17:27           ` Sean Whitton
2023-02-23 17:42             ` Eli Zaretskii
2023-02-23 18:08               ` Sean Whitton
2023-03-09  0:10                 ` Sean Whitton
2023-03-09  9:40                   ` Robert Pluim
2023-03-11 18:48                     ` Sean Whitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wn49boey.fsf@melete.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=61658@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).