From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] xwidget updated (1d8b8a2 -> 5f46725) Date: Fri, 16 Jan 2015 22:59:15 +0200 Message-ID: <838uh21ly4.fsf@gnu.org> References: <20141226164113.11620.38682@vcs.savannah.gnu.org> <831tnjlpts.fsf@gnu.org> <83k31ajvdz.fsf@gnu.org> <83wq4v4rr9.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1421441956 31575 80.91.229.3 (16 Jan 2015 20:59:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2015 20:59:16 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 16 21:59:15 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YCDz9-0004u8-NU for ged-emacs-devel@m.gmane.org; Fri, 16 Jan 2015 21:59:15 +0100 Original-Received: from localhost ([::1]:57408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCDz9-0002iV-21 for ged-emacs-devel@m.gmane.org; Fri, 16 Jan 2015 15:59:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCDyw-0002fj-IL for emacs-devel@gnu.org; Fri, 16 Jan 2015 15:59:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCDyt-00058U-9y for emacs-devel@gnu.org; Fri, 16 Jan 2015 15:59:02 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:57579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCDyt-000585-1O for emacs-devel@gnu.org; Fri, 16 Jan 2015 15:58:59 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NIA00600EQ5VD00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Fri, 16 Jan 2015 22:58:57 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIA00676FM9SF60@a-mtaout23.012.net.il>; Fri, 16 Jan 2015 22:58:57 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181350 Archived-At: > From: joakim@verona.se > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Fri, 16 Jan 2015 21:50:20 +0100 > > (defmacro xwidget-demo (name &rest body) > `(defun ,(intern (concat "xwidget-demo-" name)) () > (interactive) > (switch-to-buffer ,(format "*xwidget-demo-%s*" name)) > (text-mode);;otherwise no local keymap > (insert "Some random text for xwidgets to be inserted in for demo purposes.\n") > ,@body)) > > (xwidget-demo "a-button-bidi" > (xwidget-insert (point-min) 'Button "button" 60 50) > (set (make-local-variable 'bidi-paragraph-direction) 'right-to-left) > (define-key (current-local-map) [xwidget-event] 'xwidget-handler-demo-basic)) > > and I get a buffer with some text that behaves in R2L mode, and a gtk > button embedded in the text. > > The button doesnt seem to move with the text as it should, it stays > glued to the right window edge for some reason. > > I tried adding some missing bidi code in produce_xwidget_glyph() but the > result is the same, so I'm obviously missing something. Any ideas? I'm not sure I'm following, sorry. Can you show a screenshot, and explain what did you mean by "move with the text as it should"? Also, what text did you insert? If my reading of the defmacro and its call is correct, you just put a single button alone on its line, in which case it should behave like a single character, and should be displayed at the right edge of the window when paragraph direction is right-to-left.