all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* vc-annotate does not copy truncate-lines from the origin buffer
@ 2003-04-17  9:34 Gustav Hållberg
  2003-04-17  9:48 ` Gustav Hållberg
  0 siblings, 1 reply; 2+ messages in thread
From: Gustav Hållberg @ 2003-04-17  9:34 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

If you have set truncate-lines in a buffer, it would make a lot of sense for
the vc-annotate command to use that setting in the newly created annotation
buffer too (the same could probably be said for other variables too, but this
is the one I was being annoyed by right now).

Suggested patch attached.

- Gustav


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vc-annotate-truncate-lines.patch --]
[-- Type: text/x-patch, Size: 1269 bytes --]

--- /disk1/sources/emacs-21.3/lisp/vc.el	Mon Jan 20 12:03:30 2003
+++ vc.el	Thu Apr 17 11:27:14 2003
@@ -2941,6 +2941,7 @@
   (vc-ensure-vc-buffer)
   (let* ((temp-buffer-name (concat "*Annotate " (buffer-name) "*"))
          (temp-buffer-show-function 'vc-annotate-display)
+	 (temp-truncate-lines truncate-lines)
          (rev (vc-workfile-version (buffer-file-name)))
          (vc-annotate-version 
           (if prefix (read-string 
@@ -2953,7 +2954,7 @@
                                    nil nil "1.0"))
             1.0))
          (vc-annotate-backend (vc-backend (buffer-file-name))))
-    (message "Annotating...")
+    (message "Annotating... %s" temp-truncate-lines)
     (if (not (vc-find-backend-function vc-annotate-backend 'annotate-command))
 	(error "Sorry, annotating is not implemented for %s"
 	       vc-annotate-backend))
@@ -2962,6 +2963,9 @@
 		       (file-name-nondirectory (buffer-file-name))
 		       (get-buffer temp-buffer-name)
                        vc-annotate-version))
+    (save-excursion
+      (set-buffer temp-buffer-name)
+      (setq truncate-lines temp-truncate-lines))
     ;; Don't use the temp-buffer-name until the buffer is created
     ;; (only after `with-output-to-temp-buffer'.)
     (setq vc-annotate-buffers

[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vc-annotate does not copy truncate-lines from the origin buffer
  2003-04-17  9:34 vc-annotate does not copy truncate-lines from the origin buffer Gustav Hållberg
@ 2003-04-17  9:48 ` Gustav Hållberg
  0 siblings, 0 replies; 2+ messages in thread
From: Gustav Hållberg @ 2003-04-17  9:48 UTC (permalink / raw)


Hupp, accidentally left some printfdebugging in my patch. Feel free to remove:

-    (message "Annotating...")
+    (message "Annotating... %s" temp-truncate-lines)

- Gustav

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-17  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-17  9:34 vc-annotate does not copy truncate-lines from the origin buffer Gustav Hållberg
2003-04-17  9:48 ` Gustav Hållberg

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.