unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode'
@ 2014-11-19  1:17 Richard Copley
  2014-11-19  6:53 ` bug#19101: 25.0.50; vc-print-log puts wrong buffer into log-view-mode Ivan Shmakov
  2014-11-19 16:12 ` bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode' Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Copley @ 2014-11-19  1:17 UTC (permalink / raw)
  To: 19101

Visit a file under Subversion or RCS (not Git or Bazaar) and invoke
`vc-print-log'. The log buffer should be put into log-view-mode, but it
isn't. The buffer visiting the file is put into log-view-mode instead.

In GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
 of 2014-11-18 on MACHINE
Repository revision: 4a306d701b0dbe860c8ced70e0d93bd3129f0665
Windowing system distributor `Microsoft Corp.', version 6.3.9600
Configured using:
 `configure --prefix /c/emacs/emacs-20141217-222347
 --disable-dependency-tracking
 --enable-locallisppath=%emacs_dir%/../site-lisp --with-wide-int
 --build=x86_64-w64-mingw32 'CPPFLAGS=-I G:/usr/include -I
 C:/GnuWin32/include 'LDFLAGS=-L G:/usr/lib -L C:/GnuWin32/lib''

Configured features:
XPM JPEG TIFF GIF PNG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils add-log log-view easymenu
easy-mmode pcvs-util cl-extra vc cl-loaddefs cl-lib vc-dispatcher vc-svn
make-mode time-date tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
w32notify w32 multi-tty emacs)

Memory information:
((conses 16 86122 7047)
 (symbols 56 18892 1)
 (miscs 48 52 94)
 (strings 32 15819 4424)
 (string-bytes 1 430435)
 (vectors 16 10614)
 (vector-slots 8 389547 5184)
 (floats 8 66 152)
 (intervals 56 327 1)
 (buffers 976 13))





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

* bug#19101: 25.0.50; vc-print-log puts wrong buffer into log-view-mode
  2014-11-19  1:17 bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode' Richard Copley
@ 2014-11-19  6:53 ` Ivan Shmakov
  2014-11-19 16:14   ` Eli Zaretskii
  2014-11-19 16:12 ` bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode' Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Ivan Shmakov @ 2014-11-19  6:53 UTC (permalink / raw)
  To: 19101

>>>>> Richard Copley <rcopley@gmail.com> writes:

 > Visit a file under Subversion or RCS (not Git or Bazaar) and invoke
 > `vc-print-log'.  The log buffer should be put into log-view-mode, but
 > it isn't.  The buffer visiting the file is put into log-view-mode
 > instead.

	This is likely to be caused by VC assuming that the ‘print-log’
	backend function leaves the log buffer as the current one.
	It doesn’t seem documented, and frankly, I’ve stumbled on that
	myself while working on vc-mw.el.

	My suggestion would be for vc-print-log-internal to explicitly
	set-buffer after (successfully) invoking ‘print-log’.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A





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

* bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode'
  2014-11-19  1:17 bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode' Richard Copley
  2014-11-19  6:53 ` bug#19101: 25.0.50; vc-print-log puts wrong buffer into log-view-mode Ivan Shmakov
@ 2014-11-19 16:12 ` Eli Zaretskii
  2014-11-19 19:04   ` Richard Copley
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2014-11-19 16:12 UTC (permalink / raw)
  To: Richard Copley; +Cc: 19101

> Date: Wed, 19 Nov 2014 01:17:00 +0000
> From: Richard Copley <rcopley@gmail.com>
> 
> Visit a file under Subversion or RCS (not Git or Bazaar) and invoke
> `vc-print-log'. The log buffer should be put into log-view-mode, but it
> isn't. The buffer visiting the file is put into log-view-mode instead.

Fixed on trunk (e9917c0).





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

* bug#19101: 25.0.50; vc-print-log puts wrong buffer into log-view-mode
  2014-11-19  6:53 ` bug#19101: 25.0.50; vc-print-log puts wrong buffer into log-view-mode Ivan Shmakov
@ 2014-11-19 16:14   ` Eli Zaretskii
  2014-11-19 16:51     ` Ivan Shmakov
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2014-11-19 16:14 UTC (permalink / raw)
  To: Ivan Shmakov; +Cc: 19101

> From: Ivan Shmakov <ivan@siamics.net>
> Date: Wed, 19 Nov 2014 06:53:15 +0000
> 
> >>>>> Richard Copley <rcopley@gmail.com> writes:
> 
>  > Visit a file under Subversion or RCS (not Git or Bazaar) and invoke
>  > `vc-print-log'.  The log buffer should be put into log-view-mode, but
>  > it isn't.  The buffer visiting the file is put into log-view-mode
>  > instead.
> 
> 	This is likely to be caused by VC assuming that the ‘print-log’
> 	backend function leaves the log buffer as the current one.

No, it's because Stefan moved the call to pop-to-buffer so that the
part that turned on the mode was running in the wrong buffer.

As for print-log backend function, those that I saw run inside
with-temp-buffer, so they don't switch buffers.





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

* bug#19101: 25.0.50; vc-print-log puts wrong buffer into log-view-mode
  2014-11-19 16:14   ` Eli Zaretskii
@ 2014-11-19 16:51     ` Ivan Shmakov
  2014-11-19 18:52       ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Ivan Shmakov @ 2014-11-19 16:51 UTC (permalink / raw)
  To: 19101

>>>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>>> From: Ivan Shmakov <ivan@siamics.net>
>>>>> Richard Copley <rcopley@gmail.com> writes:

 >>> Visit a file under Subversion or RCS (not Git or Bazaar) and invoke
 >>> `vc-print-log'.  The log buffer should be put into log-view-mode,
 >>> but it isn't.  The buffer visiting the file is put into
 >>> log-view-mode instead.

 >> This is likely to be caused by VC assuming that the ‘print-log’
 >> backend function leaves the log buffer as the current one.

 > No, it's because Stefan moved the call to pop-to-buffer so that the
 > part that turned on the mode was running in the wrong buffer.

	ACK, but that change seem to be dated 2014-11-05, while I’ve
	observed a similar issue (with non-Emacs code, though) before.
	Or so I think.

 > As for print-log backend function, those that I saw run inside
 > with-temp-buffer, so they don't switch buffers.

	There’re several which use vc-setup-buffer, which in turn calls
	set-buffer.  Consider, e. g.:

(defun vc-setup-buffer (buf)
  "Prepare BUF for executing a slave command and make it current."
  (let ((camefrom (current-buffer))
	(olddir default-directory))
    (set-buffer (get-buffer-create buf))

(defun vc-bzr-print-log (files buffer &optional shortlog start-revision limit)
  …
  ;; `vc-do-command' creates the buffer, but we need it before running
  ;; the command.
  (vc-setup-buffer buffer)

(defun vc-git-print-log (files buffer &optional shortlog start-revision limit)
  …
  (let ((coding-system-for-read vc-git-commits-coding-system))
    ;; `vc-do-command' creates the buffer, but we need it before running
    ;; the command.
    (vc-setup-buffer buffer)

(defun vc-hg-print-log (files buffer &optional shortlog start-revision limit)
  …
  ;; `vc-do-command' creates the buffer, but we need it before running
  ;; the command.
  (vc-setup-buffer buffer)

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A





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

* bug#19101: 25.0.50; vc-print-log puts wrong buffer into log-view-mode
  2014-11-19 16:51     ` Ivan Shmakov
@ 2014-11-19 18:52       ` Eli Zaretskii
  2014-11-20 11:17         ` Ivan Shmakov
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2014-11-19 18:52 UTC (permalink / raw)
  To: Ivan Shmakov; +Cc: 19101

> From: Ivan Shmakov <ivan@siamics.net>
> Date: Wed, 19 Nov 2014 16:51:13 +0000
> 
>  >> This is likely to be caused by VC assuming that the ‘print-log’
>  >> backend function leaves the log buffer as the current one.
> 
>  > No, it's because Stefan moved the call to pop-to-buffer so that the
>  > part that turned on the mode was running in the wrong buffer.
> 
> 	ACK, but that change seem to be dated 2014-11-05, while I’ve
> 	observed a similar issue (with non-Emacs code, though) before.
> 	Or so I think.

The problem reported in this bug started happening on 2014-11-05.

>  > As for print-log backend function, those that I saw run inside
>  > with-temp-buffer, so they don't switch buffers.
> 
> 	There’re several which use vc-setup-buffer, which in turn calls
> 	set-buffer.

But no one relies on that.





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

* bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode'
  2014-11-19 16:12 ` bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode' Eli Zaretskii
@ 2014-11-19 19:04   ` Richard Copley
  2014-11-19 19:17     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Copley @ 2014-11-19 19:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 19101

>> Visit a file under Subversion or RCS (not Git or Bazaar) and invoke
>> `vc-print-log'. The log buffer should be put into log-view-mode, but it
>> isn't. The buffer visiting the file is put into log-view-mode instead.
>
> Fixed on trunk (e9917c0).

Confirmed, thanks.





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

* bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode'
  2014-11-19 19:04   ` Richard Copley
@ 2014-11-19 19:17     ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2014-11-19 19:17 UTC (permalink / raw)
  To: Richard Copley; +Cc: 19101-done

> Date: Wed, 19 Nov 2014 19:04:44 +0000
> From: Richard Copley <rcopley@gmail.com>
> Cc: 19101@debbugs.gnu.org
> 
> >> Visit a file under Subversion or RCS (not Git or Bazaar) and invoke
> >> `vc-print-log'. The log buffer should be put into log-view-mode, but it
> >> isn't. The buffer visiting the file is put into log-view-mode instead.
> >
> > Fixed on trunk (e9917c0).
> 
> Confirmed, thanks.

Thanks, closing.





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

* bug#19101: 25.0.50; vc-print-log puts wrong buffer into log-view-mode
  2014-11-19 18:52       ` Eli Zaretskii
@ 2014-11-20 11:17         ` Ivan Shmakov
  0 siblings, 0 replies; 9+ messages in thread
From: Ivan Shmakov @ 2014-11-20 11:17 UTC (permalink / raw)
  To: 19101

>>>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>>> Ivan Shmakov <ivan@siamics.net> Date: Wed, 19 Nov 2014 16:51:13 +0000

 >>>> This is likely to be caused by VC assuming that the ‘print-log’
 >>>> backend function leaves the log buffer as the current one.

 >>> No, it's because Stefan moved the call to pop-to-buffer so that the
 >>> part that turned on the mode was running in the wrong buffer.

 >> ACK, but that change seem to be dated 2014-11-05, while I’ve
 >> observed a similar issue (with non-Emacs code, though) before.  Or
 >> so I think.

 > The problem reported in this bug started happening on 2014-11-05.

	I stand corrected; as it seems, I’ve first observed this issue
	with the then-recent development version of Emacs built
	2014-11-08.

 >>> As for print-log backend function, those that I saw run inside
 >>> with-temp-buffer, so they don't switch buffers.

 >> There’re several which use vc-setup-buffer, which in turn calls
 >> set-buffer.

 > But no one relies on that.

	ACK, thanks for the clarification.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A





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

end of thread, other threads:[~2014-11-20 11:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19  1:17 bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode' Richard Copley
2014-11-19  6:53 ` bug#19101: 25.0.50; vc-print-log puts wrong buffer into log-view-mode Ivan Shmakov
2014-11-19 16:14   ` Eli Zaretskii
2014-11-19 16:51     ` Ivan Shmakov
2014-11-19 18:52       ` Eli Zaretskii
2014-11-20 11:17         ` Ivan Shmakov
2014-11-19 16:12 ` bug#19101: 25.0.50; `vc-print-log' puts wrong buffer into `log-view-mode' Eli Zaretskii
2014-11-19 19:04   ` Richard Copley
2014-11-19 19:17     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).