unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17884: 24.3.92; `vc-next-action' discards commit message
@ 2014-06-30 15:23 Richard Copley
  2014-06-30 15:39 ` Glenn Morris
  2014-07-12  2:25 ` Paul Eggert
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Copley @ 2014-06-30 15:23 UTC (permalink / raw)
  To: 17884

It used to be that if you typed "C-v v" from a file buffer for which you
had already started to compose a commit message, you would be taken to
your message so that you could continue composing it. In recent builds
the message gets clobbered by the (unwanted!) text "Summary: ^J".
That's not very nice.


In GNU Emacs 24.3.92.1 (x86_64-w64-mingw32)
 of 2014-06-30 on 80461UHB
Repository revision: 117326
schwab@linux-m68k.org-20140629204855-6i3r3pi3ls4e4c6q
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix c:/emacs/emacs-117326 --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''

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

Major mode: Log-Edit

Minor modes in effect:
  tooltip-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
  transient-mark-mode: t

Recent input:
C-x C-f \ t e m p \ t e s t \ t e s t . t x t <return>
C-x v v T h i s SPC t o o k SPC m e SPC a g e s . C-x
v v O h ! M-x r - e - b <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
Mark set
Press C-c C-c when you are done editing.
Enter a change comment.  Type C-c C-c when done
Mark set
Press C-c C-c when you are done editing.
Enter a change comment.  Type C-c C-c when done

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug sendmail log-edit easy-mmode
message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns
mail-prsvr mailabbrev mail-utils gmm-utils mailheader ring pcvs-util
add-log vc vc-dispatcher vc-rcs time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment 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 79005 8573)
 (symbols 56 18045 0)
 (miscs 48 49 159)
 (strings 32 12796 4781)
 (string-bytes 1 329463)
 (vectors 16 9811)
 (vector-slots 8 383011 9074)
 (floats 8 62 207)
 (intervals 56 246 0)
 (buffers 960 16))





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

* bug#17884: 24.3.92; `vc-next-action' discards commit message
  2014-06-30 15:23 bug#17884: 24.3.92; `vc-next-action' discards commit message Richard Copley
@ 2014-06-30 15:39 ` Glenn Morris
  2014-06-30 17:35   ` Richard Copley
  2014-06-30 19:33   ` Glenn Morris
  2014-07-12  2:25 ` Paul Eggert
  1 sibling, 2 replies; 9+ messages in thread
From: Glenn Morris @ 2014-06-30 15:39 UTC (permalink / raw)
  To: Richard Copley; +Cc: 17884

Richard Copley wrote:

> It used to be that if you typed "C-v v" from a file buffer for which you
> had already started to compose a commit message, you would be taken to
> your message so that you could continue composing it. In recent builds
> the message gets clobbered by the (unwanted!) text "Summary: ^J".
> That's not very nice.

No, it's not; but as a workaround I find M-x undo brings the text back.

> In GNU Emacs 24.3.92.1 (x86_64-w64-mingw32)





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

* bug#17884: 24.3.92; `vc-next-action' discards commit message
  2014-06-30 15:39 ` Glenn Morris
@ 2014-06-30 17:35   ` Richard Copley
  2014-06-30 19:33   ` Glenn Morris
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Copley @ 2014-06-30 17:35 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17884

On 30 June 2014 16:39, Glenn Morris <rgm@gnu.org> wrote:
>> That's not very nice.
>
> No, it's not; but as a workaround I find M-x undo brings the text back.
>
That's good to know. Thanks!





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

* bug#17884: 24.3.92; `vc-next-action' discards commit message
  2014-06-30 15:39 ` Glenn Morris
  2014-06-30 17:35   ` Richard Copley
@ 2014-06-30 19:33   ` Glenn Morris
  1 sibling, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2014-06-30 19:33 UTC (permalink / raw)
  To: 17884; +Cc: Richard Copley


I think this is due to:

2013-11-28  Stefan Monnier  <monnier@iro.umontreal.ca>

   * vc/vc-dispatcher.el (vc-log-edit): Setup the Summary&Author headers.

log-edit with non-nil SETUP first erases the log buffer, thus defeating
the purpose of log-edit-empty-buffer-p.





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

* bug#17884: 24.3.92; `vc-next-action' discards commit message
  2014-06-30 15:23 bug#17884: 24.3.92; `vc-next-action' discards commit message Richard Copley
  2014-06-30 15:39 ` Glenn Morris
@ 2014-07-12  2:25 ` Paul Eggert
  2014-07-12  2:56   ` Glenn Morris
  1 sibling, 1 reply; 9+ messages in thread
From: Paul Eggert @ 2014-07-12  2:25 UTC (permalink / raw)
  To: Richard Copley; +Cc: 17884-done

Thanks for reporting that.  I installed a fix in emacs-24 bzr 117371.





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

* bug#17884: 24.3.92; `vc-next-action' discards commit message
  2014-07-12  2:25 ` Paul Eggert
@ 2014-07-12  2:56   ` Glenn Morris
  2014-07-12  3:09     ` Paul Eggert
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2014-07-12  2:56 UTC (permalink / raw)
  To: 17884; +Cc: rcopley, eggert

Paul Eggert wrote:

> I installed a fix in emacs-24 bzr 117371.

I'm not sure this is 100% right.
If the *vc-log* buffer that exists corresponds to a different set of
files than the ones being committed now, then the old contents should be
replaced, even if the buffer is not empty.

Or if the buffer contains just the header template
(log-edit-empty-buffer-p), then the contents should always be replaced,
in case a proper log is available now.





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

* bug#17884: 24.3.92; `vc-next-action' discards commit message
  2014-07-12  2:56   ` Glenn Morris
@ 2014-07-12  3:09     ` Paul Eggert
  2014-07-12 20:25       ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggert @ 2014-07-12  3:09 UTC (permalink / raw)
  To: Glenn Morris, 17884; +Cc: rcopley

Glenn Morris wrote:
> I'm not sure this is 100% right.

No doubt you're right, so I'm reopening the bug.  I think emacs-24 bzr 
117371 is a step forward though, as it handles the use case in the 
original bug report, and it's easier for a novice to delete text than to 
recreate deleted text.

bzr 117371 didn't use log-edit-empty-buffer-p, as its module might not 
be loaded and I didn't want to introduce an unnecessary dependency.  But 
perhaps the dependency is necessary after all.





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

* bug#17884: 24.3.92; `vc-next-action' discards commit message
  2014-07-12  3:09     ` Paul Eggert
@ 2014-07-12 20:25       ` Glenn Morris
  2014-07-14 19:31         ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2014-07-12 20:25 UTC (permalink / raw)
  To: Paul Eggert; +Cc: rcopley, 17884

Paul Eggert wrote:

> bzr 117371 didn't use log-edit-empty-buffer-p, as its module might not
> be loaded and I didn't want to introduce an unnecessary dependency.
> But perhaps the dependency is necessary after all.

I don't see the issue.
We are talking about vc-dispatcher calling log-edit, which is defined in
log-edit.el, which is also where log-edit-empty-buffer-p is defined.
So just make vc-log-edit explicitly require log-edit?

For the other thing I mentioned, I think checking whether there is an
existing local value of vc-log-fileset that matches the new one should
cover it.





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

* bug#17884: 24.3.92; `vc-next-action' discards commit message
  2014-07-12 20:25       ` Glenn Morris
@ 2014-07-14 19:31         ` Glenn Morris
  0 siblings, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2014-07-14 19:31 UTC (permalink / raw)
  To: Paul Eggert; +Cc: rcopley, 17884


I applied this, which hopefully covers it.


--- a/lisp/vc/vc-dispatcher.el	2014-07-12 02:24:02 +0000
+++ b/lisp/vc/vc-dispatcher.el	2014-07-14 19:29:29 +0000
@@ -591,12 +591,19 @@
 
 ;; Set up key bindings for use while editing log messages
 
+(declare-function log-edit-empty-buffer-p "log-edit" ())
+
 (defun vc-log-edit (fileset mode backend)
   "Set up `log-edit' for use on FILE."
   (setq default-directory
 	(buffer-local-value 'default-directory vc-parent-buffer))
+  (require 'log-edit)
   (log-edit 'vc-finish-logentry
-	    (= (point-min) (point-max))
+	    ;; Setup a new log message if the log buffer is "empty",
+	    ;; or was previously used for a different set of files.
+	    (or (log-edit-empty-buffer-p)
+		(and (local-variable-p 'vc-log-fileset)
+		     (not (equal vc-log-fileset fileset))))
 	    `((log-edit-listfun . (lambda ()
                                     ;; FIXME: Should expand the list
                                     ;; for directories.






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

end of thread, other threads:[~2014-07-14 19:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30 15:23 bug#17884: 24.3.92; `vc-next-action' discards commit message Richard Copley
2014-06-30 15:39 ` Glenn Morris
2014-06-30 17:35   ` Richard Copley
2014-06-30 19:33   ` Glenn Morris
2014-07-12  2:25 ` Paul Eggert
2014-07-12  2:56   ` Glenn Morris
2014-07-12  3:09     ` Paul Eggert
2014-07-12 20:25       ` Glenn Morris
2014-07-14 19:31         ` Glenn Morris

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).