Merge lp://qastaging/~akwm/vm/abbreviate-headers into lp://qastaging/vm
Status: | Needs review |
---|---|
Proposed branch: | lp://qastaging/~akwm/vm/abbreviate-headers |
Merge into: | lp://qastaging/vm |
Diff against target: |
171 lines (+132/-0) 3 files modified
info/vm.texinfo (+23/-0) lisp/vm-page.el (+90/-0) lisp/vm-vars.el (+19/-0) |
To merge this branch: | bzr merge lp://qastaging/~akwm/vm/abbreviate-headers |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Cross | Pending | ||
Review via email:
|
Description of the change
Change adds to core VM two functions for handling the display of headers. One will abbreviate the number of lines in any header to an amount particular to that header as given by the variable vm-abbreviate-
Should make sure that it is indeed always the presentation buffer. Should also check for corner cases perhaps with conflicting user config etc.
Unmerged revisions
- 1179. By Arik
-
Added documentation to the new variables for automatically filling and
shrinking headers. - 1178. By Arik
-
fixed a bug involving identifying header boundaries, cleaned up the
code as well to be more clear - 1177. By Arik
-
changed "abbreviate" to "shrunken/shrink", the expander button now
uses >>> and <<< to indicate the state of header shrinkage and also
uses the vm-mime-button face, altered the search for headers to use
vm-match-header functionality. - 1176. By Arik
-
Added two functions to prettify the presentation of headers when
viewing a message. vm-abbreviate-headers will truncate headers in a
fasion quite similar to shrunken headers of rf-addons but is meant to
replace it, and vm-fill-headers attempts to uniformly display headers
that may have erratic layouts. Both are controlled by variables. Still
need info docs
OK, will try to find time to play with it over the weekend.
Brief scan of the code looks good. However, your right about possible
conflicts with other configuraiton settings.
Will see if I can make it blow up! :)
Tim
On Wed, Apr 13, 2011 at 4:19 PM, Arik <email address hidden> wrote:
> Arik has proposed merging lp:~akwm/vm/abbreviate-headers into lp:vm. /code.launchpad .net/~akwm/ vm/abbreviate- headers/ +merge/ 57440 headers. headers- column. Both these variables, when set to nil, will cause VM /code.launchpad .net/~akwm/ vm/abbreviate- headers/ +merge/ 57440 urls-in- message- region) headers- maybe) headers- and-xfaces) ) headers- column (vm-fill-headers)) headers (vm-abbreviate- headers) ) page-delimiters need-preview) current- message 'vm-present- current- message) headers- column' to determine the column to fill to. headers- column' is headers- column) forward- regexp "^\\w+: " nil t) forward- regexp "^[ \t]+") forward- regexp "^\\w+: \\|^$" nil
>
> Requested reviews:
> Tim Cross (tcross)
>
> For more details, see:
> https:/
>
> Change adds to core VM two functions for handling the display of headers.
> One will abbreviate the number of lines in any header to an amount
> particular to that header as given by the variable vm-abbreviate-
> The other fills headers to a particular column (at the same time uniformly
> making a single space at each new line) controlled by
> vm-fill-
> to do nothing. Both likewise act only in the presentation buffer so will not
> make changes to the message itself.
>
> Should make sure that it is indeed always the presentation buffer. Should
> also check for corner cases perhaps with conflicting user config etc.
> --
> https:/
> You are requested to review the proposed merge of
> lp:~akwm/vm/abbreviate-headers into lp:vm.
>
> === modified file 'lisp/vm-page.el'
> --- lisp/vm-page.el 2011-03-30 20:33:50 +0000
> +++ lisp/vm-page.el 2011-04-13 06:19:23 +0000
> @@ -873,6 +873,11 @@
> (vm-energize-
> (vm-highlight-
> (vm-energize-
> +
> + ;; 5.5 prettify the headers of the message while still
> + ;; in the presentation buffer
> + (when vm-fill-
> + (when vm-abbreviate-
>
> ;; 6. Go to the text of message
> (if (and vm-honor-
> @@ -894,6 +899,76 @@
>
> (defalias 'vm-preview-
>
> +(defun vm-fill-headers ()
> + "Fill headers of the message in the current buffer using
> +`vm-fill-
> +This function will be run (given that `vm-fill-
> +non-nil) in the presentation buffer when viewing a message."
> + (let ((buffer-read-only nil)
> + (fill-column vm-fill-
> + done start )
> + (save-excursion
> + (goto-char (point-min))
> + (when (search-
> + (while (not done)
> + (setq start (point))
> + (goto-char (point-at-bol))
> + (insert " ")
> + (forward-line 1)
> + (when (looking-at "^[ \t]+")
> + (search-
> + (delete-region (point-at-bol) (point))
> + (insert " "))
> + (when (or (not (search-
> t))
> + (looking-at "^$")
> + ...