From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: How to handle mixed LtR and RtL scripts in tabulated lists Date: Tue, 15 Sep 2020 13:45:50 +0200 Message-ID: <87ft7j1cwh.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36023"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.5; emacs 27.1.50 To: gnu-emacs-help@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 15 13:47:33 2020 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 1kI9Qq-0009HL-Vv for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 15 Sep 2020 13:47:32 +0200 Original-Received: from localhost ([::1]:50650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kI9Qp-0004r2-V9 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 15 Sep 2020 07:47:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kI9PN-00046u-OU for help-gnu-emacs@gnu.org; Tue, 15 Sep 2020 07:46:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42726) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kI9PN-0004Il-Db for help-gnu-emacs@gnu.org; Tue, 15 Sep 2020 07:46:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38968) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kI9PN-0001lB-3w for gnu-emacs-help@gnu.org; Tue, 15 Sep 2020 07:46:01 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:60941) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kI9PK-0004H5-Pt for gnu-emacs-help@gnu.org; Tue, 15 Sep 2020 07:46:00 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id DDF4B32B for ; Tue, 15 Sep 2020 07:45:55 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 15 Sep 2020 07:45:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:subject:date:message-id:mime-version:content-type; s= fm1; bh=GRm4YOKwRwCzzGAUatno4Psnd2mIYhjfO1U4dr97k6U=; b=oOrgqiBg xEqfWn7gLsdQICaxeDUzMXyiZf4VunoRsoQtCOzPInkIzu35pScESLZ8wjLe37NG +8oofEWhTd0UE7oTeQuiZi+U2e6hIDmtjzN0WpKQZlMpK/0GIUpr5kLgU3S8pUv5 +Riuhbm6pMSrDKx22kzxCRJDxQgUmW5BQv9b5tilgknIMTh9aqYRy2nZx/S3jbTN b60WyrpIr2OSY8K9nY84SX7+Rmpyl7bg1r0KZmVqKHNoh5HzT84q60GInYm5vs4u WRjvkOA4dO0knbDd2r8OpQADwL7XxWheqItayouUFU5YWP4ZifTBpbUGwwfsTeQ2 bN9ult/79a0hPw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=GRm4YOKwRwCzzGAUatno4Psnd2mIY hjfO1U4dr97k6U=; b=ZWWg8dpbsX3HfUwsiZV6y974Xa1poYm3H7I+yAWaXrfxT KTs1Ss4AUCOTE0JtS7X85jqOQoK4oBOItW/XRcJ7CMLs8DdcTMuwGDkQvka+ENoT IjwmFnEmNBDuORMTWMUc5qcGzcgujW8GeeSUjP0bU0BNjdTwE8tdUhK7+hqz2DCa gx7K/yOeEXcNnfKXvHuwKTqyobQ2xecrGarI0wUx0UXC1i7XrfbXbSfsv3SMUHGD oSRbSzS83usAhaZjRraQbZADXAcvjZHIjTNCA75bcRNxC5NYbeFqVQd43e0rQ/Wl NlWYNKNPyyDnRbGQGS/TZQS03YVGglpj2uYDw5OCg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrtddtgdduvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfgfhvffufffkgggtsehttdertddtre dtnecuhfhrohhmpeflohhoshhtucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhs sehfrghsthhmrghilhdrfhhmqeenucggtffrrghtthgvrhhnpeetvdelueehffevvdetje dvieehtddviedvtdfgheehieejhfdtvddufeevudfgjeenucffohhmrghinhepghhithhh uhgsrdgtohhmnecukfhppeelhedrledtrddvvdegrddvgeehnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgvmhgvrhhssehf rghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: from Swift.fastmail.com (unknown [95.90.224.245]) by mail.messagingengine.com (Postfix) with ESMTPA id 79569306467E for ; Tue, 15 Sep 2020 07:45:54 -0400 (EDT) Received-SPF: pass client-ip=64.147.123.20; envelope-from=joostkremers@fastmail.fm; helo=wout4-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/15 07:45:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124063 Archived-At: Hi, I'm wondering if there is a good way to create tabulated lists that have both left-to-right and right-to-left scripts. I'm running into the problem that the rtl entries have the columns in the "wrong" order. I'm putting "wrong" in quotes here, because for the actual rtl entry, the columns would be in the right order. It's just that mixing such entries with ltr entries yields bad results. Details of the actual problem can be found in this Github issue: https://github.com/joostkremers/ebib/issues/172 Basically, I'm creating a tabulated list of BibTeX entries, where each entry should have the columns "Key", "Author", "Year", "Title", in that order. However, entries that contain (in the example issue linked to) Hebrew text (specifically author name and title), the order of the columns ends up as (from left to right): "Key", "Title", "Year", "Author", the last three columns being in the "wrong" order compared to the ltr entries. Currently, I'm using the built-in function `truncate-string-to-width` to create the rows of the tabulated list. (At the time I decided against using `tabulated-list-mode`, because I had some requirements that `tabulated-list-mode` didn't seem to handle. I don't remember the details...) Is there a better way to this sort of thing? Should I be handling this differently? TIA for any and all suggestions. -- Joost Kremers Life has its moments