diff options
| author | Joakim Verona | 2011-08-11 11:55:40 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-08-11 11:55:40 +0200 |
| commit | 3121ae1fb58fc8584f06561974c99e3cc250dcb3 (patch) | |
| tree | b550f0698614b796b7bdc036127ec32d17b5e34a | |
| parent | 35aa3ba0c973865487480b44774440a0f97666ee (diff) | |
| parent | 3e26a4a28c6ad382f3bea07a1a6e0175ed8acdc6 (diff) | |
| download | emacs-3121ae1fb58fc8584f06561974c99e3cc250dcb3.tar.gz emacs-3121ae1fb58fc8584f06561974c99e3cc250dcb3.zip | |
upstream
| -rw-r--r-- | README.xwidget | 54 | ||||
| -rw-r--r-- | etc/NEWS | 6 | ||||
| -rw-r--r-- | lisp/ChangeLog | 18 | ||||
| -rw-r--r-- | lisp/buff-menu.el | 17 | ||||
| -rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 3 | ||||
| -rw-r--r-- | lisp/subr.el | 14 |
7 files changed, 91 insertions, 25 deletions
diff --git a/README.xwidget b/README.xwidget index 01902702033..a1587f2eb76 100644 --- a/README.xwidget +++ b/README.xwidget | |||
| @@ -226,6 +226,9 @@ delete-other-windows-internal | |||
| 226 | delete_all_subwindows | 226 | delete_all_subwindows |
| 227 | unshow_buffer | 227 | unshow_buffer |
| 228 | 228 | ||
| 229 | Added cleanup those window configuration hook which works in practice | ||
| 230 | but feels kludgy. | ||
| 231 | |||
| 229 | ** DONE BUG annoying backtrace | 232 | ** DONE BUG annoying backtrace |
| 230 | CLOSED: [2011-07-19 Tue 14:28] | 233 | CLOSED: [2011-07-19 Tue 14:28] |
| 231 | (this no longer seems to happen even under heavy usage. seems merging | 234 | (this no longer seems to happen even under heavy usage. seems merging |
| @@ -304,7 +307,7 @@ xwidget, but it doesnt currently work very well. | |||
| 304 | *** TODO try gtk event creation instead | 307 | *** TODO try gtk event creation instead |
| 305 | since that works fine in the webkit osr code. | 308 | since that works fine in the webkit osr code. |
| 306 | but, oh no, that didn't work for some reason. | 309 | but, oh no, that didn't work for some reason. |
| 307 | the event seems to receive the event but then the embedded widgets | 310 | the widgets seems to receive the event but then the embedded widgets |
| 308 | hangs. | 311 | hangs. |
| 309 | 312 | ||
| 310 | 313 | ||
| @@ -444,7 +447,7 @@ with at the lisp level. | |||
| 444 | ** DONE MVC mode for xwidgets | 447 | ** DONE MVC mode for xwidgets |
| 445 | CLOSED: [2011-06-27 Mon 12:53] | 448 | CLOSED: [2011-06-27 Mon 12:53] |
| 446 | It appears unfruitful to chase using the same display mode for all | 449 | It appears unfruitful to chase using the same display mode for all |
| 447 | types of xwidgets. Composition is fun but not robust the way I'm | 450 | types of xwidgets. Composition is fun but not robust the way I |
| 448 | tried to do it. | 451 | tried to do it. |
| 449 | 452 | ||
| 450 | Instead there should be a set of MVC xwidgets. Each on-screen instance | 453 | Instead there should be a set of MVC xwidgets. Each on-screen instance |
| @@ -526,7 +529,8 @@ make | |||
| 526 | 529 | ||
| 527 | 530 | ||
| 528 | *** webkit html 5 | 531 | *** webkit html 5 |
| 529 | expose the DOM to lisp or something | 532 | expose the DOM to lisp or something. The webkit xwidget works pretty |
| 533 | well now, so this might be the way ahead. | ||
| 530 | ** DONE mvc code crashes after a while | 534 | ** DONE mvc code crashes after a while |
| 531 | CLOSED: [2011-07-12 Tue 18:52] | 535 | CLOSED: [2011-07-12 Tue 18:52] |
| 532 | seemingly only when compiling with optimizations. | 536 | seemingly only when compiling with optimizations. |
| @@ -944,7 +948,7 @@ crashes taking emacs with it. | |||
| 944 | *** TODO webkit downloads | 948 | *** TODO webkit downloads |
| 945 | when clicking a download link in Webkit Emacs should take over and handle it | 949 | when clicking a download link in Webkit Emacs should take over and handle it |
| 946 | from there. Probably need signals. There are Emacs libraries to | 950 | from there. Probably need signals. There are Emacs libraries to |
| 947 | download things, with wget etc. | 951 | download things, with wget etc. an url.el facility should be made. |
| 948 | "download-requested" | 952 | "download-requested" |
| 949 | *** TODO webkit alt-text not handled | 953 | *** TODO webkit alt-text not handled |
| 950 | XKCD use image-title to display a cartoon comment. These mysteriously | 954 | XKCD use image-title to display a cartoon comment. These mysteriously |
| @@ -956,14 +960,15 @@ have a look at how docview solves it | |||
| 956 | webkit_web_view_search_text () | 960 | webkit_web_view_search_text () |
| 957 | *** TODO webkit relative references doesn't work | 961 | *** TODO webkit relative references doesn't work |
| 958 | probably because we handle scrolling in a non-standard way. It does | 962 | probably because we handle scrolling in a non-standard way. It does |
| 959 | work sort of when theres a html frameset and webkit scrols by itself. | 963 | work sort of when theres a html frameset and webkit scrolls by itself. |
| 964 | |||
| 960 | *** TODO webkit width adjustment handling issue | 965 | *** TODO webkit width adjustment handling issue |
| 961 | since there are so many levels of clipping and whatnot in xwidgets | 966 | since there are so many levels of clipping and whatnot in xwidgets |
| 962 | sizing issues are difficult. | 967 | sizing issues are difficult. |
| 963 | 968 | ||
| 964 | - an xwidget is told how large it can be by emacs. thats the end of | 969 | - an xwidget is told how large it can be by emacs. thats the end of |
| 965 | it. if the xwidget thinks otherwise it will be clipped. | 970 | it. if the xwidget thinks otherwise it will be clipped. |
| 966 | - but emacs can ask the xwudget how large it wants to be. it can then | 971 | - but emacs can ask the xwidget how large it wants to be. it can then |
| 967 | resize the reserved area and inform the xwidget thusly. | 972 | resize the reserved area and inform the xwidget thusly. |
| 968 | 973 | ||
| 969 | That should have been enough. but webkit never reports less than what | 974 | That should have been enough. but webkit never reports less than what |
| @@ -983,6 +988,9 @@ and then compare by resizing in Epiphany, which is also webkit based. | |||
| 983 | CLOSED: [2011-08-01 Mon 22:38] | 988 | CLOSED: [2011-08-01 Mon 22:38] |
| 984 | was rather hurried. end result is that the lisp layer only really | 989 | was rather hurried. end result is that the lisp layer only really |
| 985 | allows for one webkit session. | 990 | allows for one webkit session. |
| 991 | *** TODO extract DOM so SHR can render it | ||
| 992 | then the SHR html renderer from Gnus could render the DOM as created | ||
| 993 | by Webkit. | ||
| 986 | *** TODO C-X b in other buffer from webkit | 994 | *** TODO C-X b in other buffer from webkit |
| 987 | bafflingly resets the webkit view to the top. Maybe the window | 995 | bafflingly resets the webkit view to the top. Maybe the window |
| 988 | reconfiguration hook code? further mystification is added because it | 996 | reconfiguration hook code? further mystification is added because it |
| @@ -1003,6 +1011,9 @@ can't be reused for xwidget, in particular image-mode. | |||
| 1003 | Maybe a new image type could be added that was a wraper on an | 1011 | Maybe a new image type could be added that was a wraper on an |
| 1004 | xwidget. Then image mode could be reused for webkit mode. | 1012 | xwidget. Then image mode could be reused for webkit mode. |
| 1005 | 1013 | ||
| 1014 | I tried some adaptor code in xwidget.el so webkit mode now delegates | ||
| 1015 | to image mode buh its a kludge. | ||
| 1016 | |||
| 1006 | ** socket related | 1017 | ** socket related |
| 1007 | *** TODO some flickering during redisplay of sockets | 1018 | *** TODO some flickering during redisplay of sockets |
| 1008 | with gtk3 an size allocation workaround is used. | 1019 | with gtk3 an size allocation workaround is used. |
| @@ -1029,10 +1040,14 @@ get reaped and a new socket thus created. | |||
| 1029 | didn't work too well in the inkscape case. it might be that some other | 1040 | didn't work too well in the inkscape case. it might be that some other |
| 1030 | bitmap copy method works better though. | 1041 | bitmap copy method works better though. |
| 1031 | 1042 | ||
| 1032 | ** TODO synchronise emacs background with xwidget color | 1043 | basically sockets doesn't like to be offscreen because they want their |
| 1033 | fine-tuning to reduce flicker. | 1044 | own gdk window. |
| 1034 | 1045 | ||
| 1046 | ** DONE synchronise emacs background with xwidget color | ||
| 1047 | CLOSED: [2011-08-11 Thu 11:04] | ||
| 1048 | fine-tuning to reduce flicker. | ||
| 1035 | 1049 | ||
| 1050 | isn't needed if emacs bg erase disabled | ||
| 1036 | 1051 | ||
| 1037 | ** DONE xwidgets doesn't work during bootstrap all of a sudden | 1052 | ** DONE xwidgets doesn't work during bootstrap all of a sudden |
| 1038 | CLOSED: [2011-08-01 Mon 22:33] | 1053 | CLOSED: [2011-08-01 Mon 22:33] |
| @@ -1046,7 +1061,8 @@ that way it would be possible to merge to trunk in stages. | |||
| 1046 | so, webkit could be used to display the SVG. the display spec for | 1061 | so, webkit could be used to display the SVG. the display spec for |
| 1047 | images would be used. multiple webkits would be used rather than | 1062 | images would be used. multiple webkits would be used rather than |
| 1048 | offscreen rendering, so it would be GTK2 compatible. | 1063 | offscreen rendering, so it would be GTK2 compatible. |
| 1049 | ** TODO xwidget movement doesn't work all of a sudden | 1064 | ** DONE xwidget movement doesn't work all of a sudden |
| 1065 | CLOSED: [2011-08-11 Thu 11:03] | ||
| 1050 | this used to work great. now it doesn't. | 1066 | this used to work great. now it doesn't. |
| 1051 | 1067 | ||
| 1052 | suspects: | 1068 | suspects: |
| @@ -1078,6 +1094,26 @@ old behaviour, GLYPH_DEBUG doesn't seem needed. | |||
| 1078 | ** DONE GLYPH_DEBUG doesn't work | 1094 | ** DONE GLYPH_DEBUG doesn't work |
| 1079 | CLOSED: [2011-08-08 Mon 17:30] | 1095 | CLOSED: [2011-08-08 Mon 17:30] |
| 1080 | was stupid accidental line removal that was hard to spot | 1096 | was stupid accidental line removal that was hard to spot |
| 1097 | ** TODO osc xwidget example | ||
| 1098 | a couple of xwidget sliders that control a csound/supercollider song with osc. | ||
| 1099 | so, for that to work we need slider callbacks to work. when a slider | ||
| 1100 | changes send an osc message. use ocssend: | ||
| 1101 | |||
| 1102 | oscsend localhost 7777 /sample/address iTfs 1 3.14 hello | ||
| 1103 | |||
| 1104 | or better: | ||
| 1105 | http://delysid.org/emacs/osc.el | ||
| 1106 | |||
| 1107 | sliders could be defined in csound comments or something to illustrate | ||
| 1108 | the point. or if real fanciness is desired parse the csound source | ||
| 1109 | with Semantic and provide a control buffer corresponding to the | ||
| 1110 | defined controls. | ||
| 1111 | |||
| 1112 | |||
| 1113 | |||
| 1114 | Added: [2011-08-11 Thu 10:53] | ||
| 1115 | |||
| 1116 | |||
| 1081 | * old notes from x_draw_xwidget_glyph_string | 1117 | * old notes from x_draw_xwidget_glyph_string |
| 1082 | 1118 | ||
| 1083 | BUG it seems this method for some reason is called with bad s->x and s->y sometimes. | 1119 | BUG it seems this method for some reason is called with bad s->x and s->y sometimes. |
| @@ -1038,6 +1038,12 @@ of function value which looks like (closure ENV ARGS &rest BODY). | |||
| 1038 | *** New function `special-variable-p' to check whether a variable is | 1038 | *** New function `special-variable-p' to check whether a variable is |
| 1039 | declared as dynamically bound. | 1039 | declared as dynamically bound. |
| 1040 | 1040 | ||
| 1041 | ** New function `string-mark-left-to-right' appends a Unicode LRM | ||
| 1042 | (left-to-right mark) character to a string if it terminates in | ||
| 1043 | right-to-left script. This is useful when the buffer has overall | ||
| 1044 | left-to-right paragraph direction and you need to insert a string | ||
| 1045 | whose contents (and directionality) are not known in advance. | ||
| 1046 | |||
| 1041 | ** pre/post-command-hook are not reset to nil upon error. | 1047 | ** pre/post-command-hook are not reset to nil upon error. |
| 1042 | Instead, the offending function is removed. | 1048 | Instead, the offending function is removed. |
| 1043 | 1049 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 66874bdb29a..ad300b10f47 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2011-08-10 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * subr.el (string-mark-left-to-right): New function. | ||
| 4 | |||
| 5 | * buff-menu.el (Buffer-menu-buffer+size): Remove LRM argument. | ||
| 6 | Use string-mark-left-to-right. | ||
| 7 | (list-buffers-noselect): Caller changed. | ||
| 8 | |||
| 9 | * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Use | ||
| 10 | string-mark-left-to-right. | ||
| 11 | (tabulated-list-print): Recenter after moving point. | ||
| 12 | |||
| 13 | 2011-08-10 Juri Linkov <juri@jurta.org> | ||
| 14 | |||
| 15 | * progmodes/grep.el (rgrep): Don't bind `process-connection-type'. | ||
| 16 | This finishes incomplete reversion of 2011-06-30T01:09:13Z!larsi@gnus.org | ||
| 17 | intended by 2011-07-06T15:49:19Z!larsi@gnus.org. | ||
| 18 | |||
| 1 | 2011-08-09 Chong Yidong <cyd@stupidchicken.com> | 19 | 2011-08-09 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 20 | ||
| 3 | * hi-lock.el (hi-lock-unface-buffer): Fix interactive spec | 21 | * hi-lock.el (hi-lock-unface-buffer): Fix interactive spec |
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index f0a44747378..a5b45921d28 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el | |||
| @@ -666,7 +666,7 @@ For more information, see the function `buffer-menu'." | |||
| 666 | ":" ;; (if (char-displayable-p ?…) "…" ":") | 666 | ":" ;; (if (char-displayable-p ?…) "…" ":") |
| 667 | ) | 667 | ) |
| 668 | 668 | ||
| 669 | (defun Buffer-menu-buffer+size (name size &optional name-props size-props lrm) | 669 | (defun Buffer-menu-buffer+size (name size &optional name-props size-props) |
| 670 | (if (> (+ (string-width name) (string-width size) 2) | 670 | (if (> (+ (string-width name) (string-width size) 2) |
| 671 | Buffer-menu-buffer+size-width) | 671 | Buffer-menu-buffer+size-width) |
| 672 | (setq name | 672 | (setq name |
| @@ -681,17 +681,9 @@ For more information, see the function `buffer-menu'." | |||
| 681 | (string-width tail) | 681 | (string-width tail) |
| 682 | 2)) | 682 | 2)) |
| 683 | Buffer-menu-short-ellipsis | 683 | Buffer-menu-short-ellipsis |
| 684 | tail | 684 | (string-mark-left-to-right tail)))) |
| 685 | ;; Append an invisible LRM character to the | ||
| 686 | ;; buffer's name to avoid ugly display with the | ||
| 687 | ;; buffer size to the left of the name, when the | ||
| 688 | ;; name begins with R2L character. | ||
| 689 | (if lrm (propertize (string ?\x200e) 'invisible t) "")))) | ||
| 690 | ;; Don't put properties on (buffer-name). | 685 | ;; Don't put properties on (buffer-name). |
| 691 | (setq name (concat (copy-sequence name) | 686 | (setq name (string-mark-left-to-right name))) |
| 692 | (if lrm | ||
| 693 | (propertize (string ?\x200e) 'invisible t) | ||
| 694 | "")))) | ||
| 695 | (add-text-properties 0 (length name) name-props name) | 687 | (add-text-properties 0 (length name) name-props name) |
| 696 | (add-text-properties 0 (length size) size-props size) | 688 | (add-text-properties 0 (length size) size-props size) |
| 697 | (let ((name+space-width (- Buffer-menu-buffer+size-width | 689 | (let ((name+space-width (- Buffer-menu-buffer+size-width |
| @@ -929,8 +921,7 @@ For more information, see the function `buffer-menu'." | |||
| 929 | (max (length size) 3) | 921 | (max (length size) 3) |
| 930 | 2)) | 922 | 2)) |
| 931 | name | 923 | name |
| 932 | "mouse-2: select this buffer")) | 924 | "mouse-2: select this buffer")))) |
| 933 | nil t)) | ||
| 934 | " " | 925 | " " |
| 935 | (if (> (string-width (nth 4 buffer)) Buffer-menu-mode-width) | 926 | (if (> (string-width (nth 4 buffer)) Buffer-menu-mode-width) |
| 936 | (truncate-string-to-width (nth 4 buffer) | 927 | (truncate-string-to-width (nth 4 buffer) |
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 2fdfa9525b1..9b485b58608 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el | |||
| @@ -258,7 +258,8 @@ to the entry with the same ID element as the current line." | |||
| 258 | ;; If REMEMBER-POS was specified, move to the "old" location. | 258 | ;; If REMEMBER-POS was specified, move to the "old" location. |
| 259 | (if saved-pt | 259 | (if saved-pt |
| 260 | (progn (goto-char saved-pt) | 260 | (progn (goto-char saved-pt) |
| 261 | (move-to-column saved-col)) | 261 | (move-to-column saved-col) |
| 262 | (recenter)) | ||
| 262 | (goto-char (point-min))))) | 263 | (goto-char (point-min))))) |
| 263 | 264 | ||
| 264 | (defun tabulated-list-print-entry (id cols) | 265 | (defun tabulated-list-print-entry (id cols) |
| @@ -282,6 +283,7 @@ of column descriptors." | |||
| 282 | (> (length label) width) | 283 | (> (length label) width) |
| 283 | (setq label (concat (substring label 0 (- width 3)) | 284 | (setq label (concat (substring label 0 (- width 3)) |
| 284 | "..."))) | 285 | "..."))) |
| 286 | (setq label (string-mark-left-to-right label)) | ||
| 285 | (if (stringp desc) | 287 | (if (stringp desc) |
| 286 | (insert (propertize label 'help-echo help-echo)) | 288 | (insert (propertize label 'help-echo help-echo)) |
| 287 | (apply 'insert-text-button label (cdr desc))) | 289 | (apply 'insert-text-button label (cdr desc))) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 5561575ea20..db8e82193b3 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -1023,8 +1023,7 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]." | |||
| 1023 | (read-from-minibuffer "Confirm: " | 1023 | (read-from-minibuffer "Confirm: " |
| 1024 | command nil nil 'grep-find-history)) | 1024 | command nil nil 'grep-find-history)) |
| 1025 | (add-to-history 'grep-find-history command)) | 1025 | (add-to-history 'grep-find-history command)) |
| 1026 | (let ((default-directory dir) | 1026 | (let ((default-directory dir)) |
| 1027 | (process-connection-type nil)) | ||
| 1028 | (compilation-start command 'grep-mode)) | 1027 | (compilation-start command 'grep-mode)) |
| 1029 | ;; Set default-directory if we started rgrep in the *grep* buffer. | 1028 | ;; Set default-directory if we started rgrep in the *grep* buffer. |
| 1030 | (if (eq next-error-last-buffer (current-buffer)) | 1029 | (if (eq next-error-last-buffer (current-buffer)) |
diff --git a/lisp/subr.el b/lisp/subr.el index d57c507a548..a897da1d9ba 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -3538,6 +3538,20 @@ If IGNORE-CASE is non-nil, the comparison is done without paying attention | |||
| 3538 | to case differences." | 3538 | to case differences." |
| 3539 | (eq t (compare-strings str1 nil nil | 3539 | (eq t (compare-strings str1 nil nil |
| 3540 | str2 0 (length str1) ignore-case))) | 3540 | str2 0 (length str1) ignore-case))) |
| 3541 | |||
| 3542 | (defun string-mark-left-to-right (str) | ||
| 3543 | "Return a string that can be safely embedded in left-to-right text. | ||
| 3544 | If STR ends in right-to-left (RTL) script, return a string | ||
| 3545 | consisting of STR followed by an invisible left-to-right | ||
| 3546 | mark (LRM) character. Otherwise, return STR." | ||
| 3547 | (unless (stringp str) | ||
| 3548 | (signal 'wrong-type-argument (list 'stringp str))) | ||
| 3549 | (if (and (> (length str) 0) | ||
| 3550 | (eq (get-char-code-property (aref str (1- (length str))) | ||
| 3551 | 'bidi-class) | ||
| 3552 | 'R)) | ||
| 3553 | (concat str (propertize (string ?\x200e) 'invisible t)) | ||
| 3554 | str)) | ||
| 3541 | 3555 | ||
| 3542 | ;;;; invisibility specs | 3556 | ;;;; invisibility specs |
| 3543 | 3557 | ||