はやみずです

須藤さんと松尾さんのパッチを取り込みました。ありがとうございます。

> uriプロパティが標準的ならuri-in-textをuriに置き換えて
> しまう方が良いかもしれませんね。

uri-in-textは以下のenterキーの振舞い(twittering-enter)を実現するために
使われているので、単純にuriには置き換えられません。

- @fooの上なら reply
- URIの上ならブラウザで開く
- どちらでもなければ発言者へのreply

twittering-enterでは screen-name-in-text, uri-in-text, username, uri の
順でプロパティの存在を見て動作を制御しています。usernameは発言のテキス
ト全体に設定されているので、uri-in-textとuriを統一してしてしまうと、
URI文字列の上でenterキーを押しても発言者へのreplyになってしまいます。

最新の実装だと、プロパティが設定されている範囲を図示すれば感じでしょう
か。

text body      : @foo hello @bar. look http://example.com/
'screen-name.. :             ---
'uri-in-text   :                       -------------------
'username      : -----------------------------------------
'uri           :  ---                  -------------------

この図を書いてみて気付いたのですが、発言者名にもscreen-name-in-textを設
定して、uri-in-textとuriを統一して、twittering-enterでの優先順位を
screen-name-in-text, uri, username にすれば今と同じ振舞いが実現できそう
です。

At Mon, 11 Jan 2010 22:35:41 +0900 (JST),
Tadashi MATSUO wrote:
> 
> [1  <text/plain; iso-2022-jp (7bit)>]
> 松尾です。
> 
> uriプロパティを設定するのであれば、http://... にも
> 設定すべきだと思います。
> 添付したadd-uri-property.patchではどうでしょうか。
> 
> uriプロパティが標準的ならuri-in-textをuriに置き換えて
> しまう方が良いかもしれませんね。
> 
> ---
> 松尾 直志 <t...@mymail.twin.jp>
> [2 add-uri-property.patch <text/plain; us-ascii (7bit)>]
> diff -r e9c6541a308a twittering-mode.el
> --- a/twittering-mode.el      Mon Jan 11 02:32:09 2010 +0900
> +++ b/twittering-mode.el      Mon Jan 11 22:31:55 2010 +0900
> @@ -1498,9 +1498,11 @@
>                `(mouse-face
>                  highlight
>                  face twittering-uri-face
> +                uri ,(concat "http://twitter.com/"; screen-name)
>                  uri-in-text ,(concat "http://twitter.com/"; screen-name))
>              `(mouse-face highlight
>                           face twittering-uri-face
> +                         uri ,uri
>                           uri-in-text ,uri))
>            text))
>         (setq regex-index (match-end 0)) ))
> [3  <text/plain; us-ascii (7bit)>]
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> [4  <text/plain; iso-2022-jp (7bit)>]
> _______________________________________________
> twmode-users mailing list
> twmode-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/twmode-users

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
twmode-users mailing list
twmode-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/twmode-users

メールによる返信