From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51716: 29.0.50; [PATCH] Expose xwidget navigation history to Lisp code Date: Sat, 13 Nov 2021 17:02:13 +0200 Message-ID: <83czn4xfnu.fsf@gnu.org> References: <871r3p8r05.fsf.ref@yahoo.com> <871r3p8r05.fsf@yahoo.com> <83o86s2ft8.fsf@gnu.org> <874k8j33mw.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22846"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51716@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 13 16:03:23 2021 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 1mluYs-0005kU-7q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Nov 2021 16:03:22 +0100 Original-Received: from localhost ([::1]:60674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mluYr-0001Ix-7p for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Nov 2021 10:03:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mluYY-0001Ia-HH for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 10:03:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36335) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mluYY-0007SS-1c for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 10:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mluYX-0007yx-Qq for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 10:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Nov 2021 15:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51716 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51716-submit@debbugs.gnu.org id=B51716.163681575630645 (code B ref 51716); Sat, 13 Nov 2021 15:03:01 +0000 Original-Received: (at 51716) by debbugs.gnu.org; 13 Nov 2021 15:02:36 +0000 Original-Received: from localhost ([127.0.0.1]:47881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mluY7-0007yC-Vs for submit@debbugs.gnu.org; Sat, 13 Nov 2021 10:02:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mluY6-0007y0-CR for 51716@debbugs.gnu.org; Sat, 13 Nov 2021 10:02:34 -0500 Original-Received: from [2001:470:142:3::e] (port=53228 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mluY1-0007OO-4p; Sat, 13 Nov 2021 10:02:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/sOLe4OmBA93SFlthAU5a39wJVwP/zJcdQ0yh46/2Dg=; b=jeZV+X9rEL/b e86dKcQ46FHns5LBbASJjbMi7cH4UZgxh7QAwfWDM1vFNjZG79Isy5qI5vpVjasnvt4527URITXzu YcqmPHUb4Z99edxbrEWxgXfc2D051TBTflf853PbAUXn5xpgol77vU2zuar3wBHU+PkOLs+AflcXO BCwb7rTo415wArq+B3yzhA1kZqlKMrHgouzshhFhnSOK5Dx+yW0rBeMRaHjcHGOfP3Mnm+k8qJiqd pA1sFNeABNBUcXmOYl7RxVrJKr77UdxtAjmR9bbjam6gDIdB87LGkRlxhaaS/nqivhIFY+kQcUPPT eB9CgFu2420F/Io6K0mbxw==; Original-Received: from [87.69.77.57] (port=4502 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mluY0-0008RL-P9; Sat, 13 Nov 2021 10:02:29 -0500 In-Reply-To: <874k8j33mw.fsf@yahoo.com> (message from Po Lu on Thu, 11 Nov 2021 09:03:19 +0800) 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" Xref: news.gmane.io gmane.emacs.bugs:219816 Archived-At: > From: Po Lu > Cc: 51716@debbugs.gnu.org > Date: Thu, 11 Nov 2021 09:03:19 +0800 > > >> + if (item) > >> + { > >> + item_title = webkit_back_forward_list_item_get_title (item); > >> + item_uri = webkit_back_forward_list_item_get_uri (item); > >> + here = list3 (make_fixnum (0), > >> + build_string (item_title ? item_title : ""), > >> + build_string (item_uri ? item_uri : "")); > >> + } > >> + parent = webkit_back_forward_list_get_back_list_with_limit (list, lim); > >> + > >> + if (parent) > >> + { > >> + for (i = 1, tem = parent; parent; parent = parent->next, ++i) > >> + { > >> + item = tem->data; > >> + item_title = webkit_back_forward_list_item_get_title (item); > >> + item_uri = webkit_back_forward_list_item_get_uri (item); > >> + title = build_string (item_title ? item_title : ""); > >> + uri = build_string (item_uri ? item_uri : ""); > > > build_string can produce either multibyte or unibyte strings. Which > > ones do we want? And shouldn't we decode the strings that come from > > WebKit? > > Sorry for that. We want UTF-8 strings, as that's the format of strings > which come from WebKitGTK. (And most GLib-related software, as well). Sorry, I don't understand: the above produces strings that will be used by Emacs Lisp. So UTF-8 is not relevant; the question is whether the string that comes from WebKitGTK can include non-ASCII characters. If it can, we need to decode it, e.g. by decode_string_utf_8 (can these strings include byte sequences that aren't valid UTF-8?). When this issue is resolved, the changes can be installed. Thanks.