all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* commit-msg line-length limit
@ 2014-12-16 19:21 Paul Eggert
  2014-12-16 22:51 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggert @ 2014-12-16 19:21 UTC (permalink / raw)
  To: Stefan; +Cc: Emacs development discussions

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

The attached patch (emacs-24 commit dated yesterday) increased the Git 
commit message line-length limit to 78 characters.  This will have 
consequences once we start generating ChangeLog files automatically from 
commit messages.  Because ChangeLog entries are indented by a tab, the 
resulting ChangeLog files will typically require 78 + 8 == 86 columns, 
not the 80 columns they have traditionally needed.  Is this 
intentional?  If not, a simple fix is to change the limit back to 72.  
If so, I suppose we could work around the problem with something like 
the following patch, though this will be more of a change to current 
practice:

diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index 8e44c02..93a2ac6 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -1034,7 +1034,8 @@ the change log file in another window."
  ;;;###autoload
  (define-derived-mode change-log-mode text-mode "Change Log"
    "Major mode for editing change logs; like Indented Text mode.
-Prevents numeric backups and sets `left-margin' to 8 and `fill-column' 
to 74.
+Prevents numeric backups, and sets `left-margin' to 8, `fill-column' to 74,
+and `tab-width' to 2.
  New log entries are usually made with \\[add-change-log-entry] or 
\\[add-change-log-entry-other-window].
  Each entry behaves as a paragraph, and the entries for one day as a page.
  Runs `change-log-mode-hook'.
@@ -1042,7 +1043,7 @@ Runs `change-log-mode-hook'.
    (setq left-margin 8
      fill-column 74
      indent-tabs-mode t
-    tab-width 8
+    tab-width 2
      show-trailing-whitespace t)
    (set (make-local-variable 'fill-forward-paragraph-function)
         'change-log-fill-forward-paragraph)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: commit-msg.diff --]
[-- Type: text/x-patch; name="commit-msg.diff", Size: 8372 bytes --]

diff --git a/ChangeLog b/ChangeLog
index 2b75dcb..34c1840 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* build-aux/git-hooks/commit-msg (at_sign): Bump up line-length limit
+	to 78.
+
 2014-12-12  Paul Eggert  <eggert@cs.ucla.edu>
 
 	Git ignore lib/std*.h
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg
index 5eb994c..2e3e4f2 100755
--- a/build-aux/git-hooks/commit-msg
+++ b/build-aux/git-hooks/commit-msg
@@ -87,8 +87,8 @@ exec $awk '
     status = 1
   }
 
-  72 < length && $0 ~ space {
-    print "Line longer than 72 characters in commit message"
+  78 < length && $0 ~ space {
+    print "Line longer than 78 characters in commit message"
     status = 1
   }
 
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b6bf868..9e242ca 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* subr.el (sit-for): Tweak docstring (bug#19381).
+
 2014-12-15  Dmitry Gutov  <dgutov@yandex.ru>
 
 	* vc/vc-git.el (vc-git-after-dir-status-stage): Move `up-to-date'
@@ -20,8 +24,8 @@
 
 2014-12-09  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
-	* progmodes/python.el (python-shell-parse-command): Quote
-	`python-shell-interpreter`.  (Bug#19289)
+	* progmodes/python.el (python-shell-parse-command):
+	Quote `python-shell-interpreter`.  (Bug#19289)
 
 2014-12-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 
@@ -60,8 +64,8 @@
 
 2014-11-27  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
-	* progmodes/python.el (python-shell-completion-setup-code): Use
-	__builtin__ module (or builtins in Python 3) and catch all errors
+	* progmodes/python.el (python-shell-completion-setup-code):
+	Use __builtin__ module (or builtins in Python 3) and catch all errors
 	when importing readline and rlcompleter.
 
 2014-11-26  Stephen Berman  <stephen.berman@gmx.net>
@@ -113,8 +117,8 @@
 
 2014-11-21  Eli Zaretskii  <eliz@gnu.org>
 
-	* vc/vc-git.el (vc-git-command, vc-git--call): Bind
-	coding-system-for-read and coding-system-for-write to
+	* vc/vc-git.el (vc-git-command, vc-git--call):
+	Bind coding-system-for-read and coding-system-for-write to
 	vc-git-commits-coding-system.
 	(vc-git-previous-revision): Use "~1" instead of "^", since the
 	latter is a special character for MS-Windows system shells.
@@ -155,8 +159,8 @@
 
 2014-11-16  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
-	* progmodes/python.el (python-eldoc--get-doc-at-point): Strip
-	shell output before returning.  (bug#18794)
+	* progmodes/python.el (python-eldoc--get-doc-at-point):
+	Strip shell output before returning.  (bug#18794)
 
 2014-11-16  Dmitry Gutov  <dgutov@yandex.ru>
 
@@ -177,13 +181,13 @@
 
 2014-11-15  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
-	* progmodes/python.el (python-indent-calculate-levels): Fix
-	indentation behavior multiline dedenter statement.  (Bug#18432)
+	* progmodes/python.el (python-indent-calculate-levels):
+	Fix indentation behavior multiline dedenter statement.  (Bug#18432)
 
 2014-11-15  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
-	* progmodes/python.el (python-indent-region): Use
-	python-indent-line and skip special cases.  (Bug#18843)
+	* progmodes/python.el (python-indent-region):
+	Use python-indent-line and skip special cases.  (Bug#18843)
 
 2014-11-15  Michael Albinus  <michael.albinus@gmx.de>
 
@@ -196,8 +200,8 @@
 
 2014-11-14  Ivan Andrus  <darthandrus@gmail.com>
 
-	* progmodes/python.el (python-ffap-module-path): Use
-	`derived-mode-p' instead of equality test on `major-mode'.
+	* progmodes/python.el (python-ffap-module-path):
+	Use `derived-mode-p' instead of equality test on `major-mode'.
 
 2014-11-13  Ulrich Müller  <ulm@gentoo.org>
 
@@ -247,8 +251,8 @@
 2014-11-05  Alan Mackenzie  <acm@muc.de>
 
 	Fix wrong bound to c-font-lock-declarators.  Fixes bug #18948.
-	* progmodes/cc-fonts.el (c-font-lock-declarations): Pass
-	"(point-max)" as bound to c-font-lock-declarators, not "limit", as
+	* progmodes/cc-fonts.el (c-font-lock-declarations):
+	Pass "(point-max)" as bound to c-font-lock-declarators, not "limit", as
 	the buffer is sometimes narrowed to less than "limit" (e.g., in
 	the presence of macros).
 
diff --git a/lisp/subr.el b/lisp/subr.el
index 215699d..839b915 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2142,7 +2142,7 @@ keyboard-quit events while waiting for a valid input."
     char))
 
 (defun sit-for (seconds &optional nodisp obsolete)
-  "Perform redisplay, then wait for SECONDS seconds or until input is available.
+  "Redisplay, then wait for SECONDS seconds.  Stop when input is available.
 SECONDS may be a floating-point value.
 \(On operating systems that do not support waiting for fractions of a
 second, floating-point values are rounded down to the nearest integer.)
@@ -2160,7 +2160,7 @@ floating point support."
   (declare (advertised-calling-convention (seconds &optional nodisp) "22.1"))
   ;; This used to be implemented in C until the following discussion:
   ;; http://lists.gnu.org/archive/html/emacs-devel/2006-07/msg00401.html
-  ;; Then it was moved to C using an implementation based on an idle timer,
+  ;; Then it was moved here using an implementation based on an idle timer,
   ;; which was then replaced by the use of read-event.
   (if (numberp nodisp)
       (setq seconds (+ seconds (* 1e-3 nodisp))
diff --git a/src/ChangeLog b/src/ChangeLog
index 6b7abe4..c0b9039 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,11 +1,15 @@
+2014-12-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring.
+
 2014-12-13  Eli Zaretskii  <eliz@gnu.org>
 
 	* gnutls.c (gnutls_init): Fix deprecation warning from GCC.
 
 2014-12-12  Eli Zaretskii  <eliz@gnu.org>
 
-	* gnutls.c (Fgnutls_available_p, syms_of_gnutls): Move
-	gnutls-available-p out of the HAVE_GNUTLS conditional, and define
+	* gnutls.c (Fgnutls_available_p, syms_of_gnutls):
+	Move gnutls-available-p out of the HAVE_GNUTLS conditional, and define
 	them only once.
 
 2014-12-11  Teodor Zlatanov  <tzz@lifelogs.com>
@@ -21,8 +25,8 @@
 
 2014-12-10  Eli Zaretskii  <eliz@gnu.org>
 
-	* xdisp.c (move_it_in_display_line_to, display_line): Don't
-	disallow overflow-newline-into-fringe when word-wrap is in
+	* xdisp.c (move_it_in_display_line_to, display_line):
+	Don't disallow overflow-newline-into-fringe when word-wrap is in
 	effect.  (Bug#19300)
 
 2014-12-04  Lee Duhem  <lee.duhem@gmail.com>  (tiny change)
@@ -78,8 +82,8 @@
 2014-11-15  Eli Zaretskii  <eliz@gnu.org>
 
 	* window.c (window_scroll_pixel_based): Avoid truncation/rounding
-	errors in computing the number of pixels to scroll.  Suggested by
-	Kelly Dean <kelly@prtime.org>.  (Bug#19060)
+	errors in computing the number of pixels to scroll.
+	Suggested by Kelly Dean <kelly@prtime.org>.  (Bug#19060)
 
 2014-11-15  Jan Djärv  <jan.h.d@swipnet.se>
 
@@ -190,8 +194,8 @@
 
 2014-10-26  Eli Zaretskii  <eliz@gnu.org>
 
-	* dispnew.c (buffer_posn_from_coords): Use
-	WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
+	* dispnew.c (buffer_posn_from_coords):
+	Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
 	account for the header-line height.  (Bug#18839)
 
 2014-10-22  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
diff --git a/src/buffer.c b/src/buffer.c
index 495f937..368d273 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -6092,9 +6092,9 @@ from happening repeatedly and making Emacs nonfunctional.  */);
 	       doc: /* List of functions to call after each text change.
 Three arguments are passed to each function: the positions of
 the beginning and end of the range of changed text,
-and the length in bytes of the pre-change text replaced by that range.
+and the length in chars of the pre-change text replaced by that range.
 \(For an insertion, the pre-change length is zero;
-for a deletion, that length is the number of bytes deleted,
+for a deletion, that length is the number of chars deleted,
 and the post-change beginning and end are at the same place.)
 
 Buffer changes made while executing the `after-change-functions'

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

* Re: commit-msg line-length limit
  2014-12-16 19:21 commit-msg line-length limit Paul Eggert
@ 2014-12-16 22:51 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-12-16 22:51 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Emacs development discussions

> The attached patch (emacs-24 commit dated yesterday) increased the Git
> commit message line-length limit to 78 characters.  This will have
> consequences once we start generating ChangeLog files automatically from
> commit messages.  Because ChangeLog entries are indented by a tab, the
> resulting ChangeLog files will typically require 78 + 8 == 86 columns, not
> the 80 columns they have traditionally needed.  Is this intentional?

It's OK to recommend and encourage to stick to 72 columns, but rejecting
anything goes past it is a bit too drastic for my taste.
IOW the 72-chars limit could be "enforced" by suitable highlighting in
the *VC-Log* buffer.


        Stefan



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

end of thread, other threads:[~2014-12-16 22:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 19:21 commit-msg line-length limit Paul Eggert
2014-12-16 22:51 ` Stefan Monnier

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.