all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: joakim@verona.se
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] xwidget updated (1d8b8a2 -> 5f46725)
Date: Fri, 16 Jan 2015 22:59:15 +0200	[thread overview]
Message-ID: <838uh21ly4.fsf@gnu.org> (raw)
In-Reply-To: <m3y4p2tppv.fsf@exodia.verona.se>

> 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.



  reply	other threads:[~2015-01-16 20:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20141226164113.11620.38682@vcs.savannah.gnu.org>
2014-12-27 15:22 ` [Emacs-diffs] xwidget updated (1d8b8a2 -> 5f46725) Stefan Monnier
2014-12-27 15:48   ` joakim
2014-12-28 16:08     ` Eli Zaretskii
2014-12-29  9:48       ` joakim
2014-12-29 13:46         ` Ulrich Mueller
2014-12-29 16:10           ` Eli Zaretskii
2015-01-09 20:17           ` joakim
2014-12-29 16:03         ` Eli Zaretskii
2015-01-09 20:12           ` joakim
2015-01-09 20:35             ` Eli Zaretskii
2015-01-16 20:50               ` joakim
2015-01-16 20:59                 ` Eli Zaretskii [this message]
2015-01-16 21:16                   ` joakim
2015-01-17 10:19                     ` Eli Zaretskii
2015-01-17 15:21                       ` joakim
2015-01-17 17:40                         ` joakim
2015-01-17 18:04                           ` Eli Zaretskii
2015-01-17 18:13                             ` joakim
2015-01-17 18:39                             ` Eli Zaretskii
2015-01-17 23:08                               ` joakim

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

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

  git send-email \
    --in-reply-to=838uh21ly4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=joakim@verona.se \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.