lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Git patch won't apply


From: Carl D. Sorensen
Subject: Git patch won't apply
Date: Sat, 10 Jan 2009 10:12:25 -0700

I received the following patch from Patrick McCarty;; From
61917179406f567351d73282ca4ed008b3e4b859 Mon Sep 17 00:00:00 2001
From: Patrick McCarty <address@hidden>
Date: Tue, 6 Jan 2009 16:26:22 -0800
Subject: [PATCH] Docs: Add new procedure for barNumberVisibility

* The default value of barNumberVisibility, the
  procedure first-bar-number-invisible, hides the
  first bar number when currentBarNumber is less
  than or equal to `1'.

  This new procedure, all-bar-numbers-visible,
  allows the printing of all bar numbers, given
  that the value of 'break-visibility permits it.

Signed-off-by: Patrick McCarty <address@hidden>
---
 Documentation/user/rhythms.itely                   |   17 +++-----------
 ...rinting-the-bar-number-for-the-first-measure.ly |   23
++++++++++++++++++++
 scm/output-lib.scm                                 |    2 +
 3 files changed, 29 insertions(+), 13 deletions(-)
 create mode 100644
input/new/printing-the-bar-number-for-the-first-measure.ly

diff --git a/Documentation/user/rhythms.itely
b/Documentation/user/rhythms.itely
index 3b13b80..210a3b7 100644
--- a/Documentation/user/rhythms.itely
+++ b/Documentation/user/rhythms.itely
@@ -2156,6 +2156,10 @@ c1 c c c

 @funindex barNumberVisibility

address@hidden Uncomment this after next LSR update.
address@hidden @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
address@hidden {printing-the-bar-number-for-the-first-measure.ly}
+
 Bar numbers can be typeset at regular intervals instead of just at
 the beginning of every line.  To do this the default behavior
 must be overridden to permit bar numbers to be printed at places
@@ -2280,19 +2284,6 @@ Bar numbers may collide with the top of the
 this, the @code{padding} property of @rinternals{BarNumber} can
 be used to position the number correctly.

-Bar numbers may only be printed at bar lines; to print a bar
-number at the beginning of a piece, an empty bar line must be
-inserted there, and a value other than @code{1} must be placed
-in @code{currentBarNumber}:
-
address@hidden,quote,relative=1]
-\set Score.currentBarNumber = #50
-\bar ""
-c1 c c c
-c1 c c c
-\break
address@hidden lilypond
-


 @node Bar and bar number checks
diff --git a/input/new/printing-the-bar-number-for-the-first-measure.ly
b/input/new/printing-the-bar-number-for-the-first-measure.ly
new file mode 100644
index 0000000..86cc793
--- /dev/null
+++ b/input/new/printing-the-bar-number-for-the-first-measure.ly
@@ -0,0 +1,23 @@
+\version "2.12.1"
+
+\header {
+  lsrtags = "rhythms"
+
+  texidoc = "
+By default, the first bar number in a score is suppressed if it is
+less than or equal to `1'.  By setting @code{barNumberVisibility}
+to @code{all-bar-numbers-visible}, any bar number can be printed
+for the first measure and all subsequent measures.  Note that an
+empty bar line must be inserted before the first note for this to
+work.
+
+"
+  doctitle = "Printing the bar number for the first measure"
+}
+
+\relative c' {
+  \set Score.barNumberVisibility = #all-bar-numbers-visible
+  \bar ""
+  c1 d e f \break
+  g1 e d c
+}
diff --git a/scm/output-lib.scm b/scm/output-lib.scm
index c33aff0..53a5773 100644
--- a/scm/output-lib.scm
+++ b/scm/output-lib.scm
@@ -202,6 +202,8 @@ centered, X==1 is at the right, X == -1 is at the left."

 (define-public (first-bar-number-invisible barnum) (> barnum 1))

+(define-public (all-bar-numbers-visible barnum) #t)
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; percent repeat counters

--
1.6.1



When I try to apply it with git by typing

git apply Frogs/0001-Docs-Add-new-procedure-for-barNumberVisibility.patch

I get an error message

fatal: git apply: bad git-diff - expected /dev/null on line 61


But line 61 is

--- /dev/null

Any thoughts on what is wrong or how I can get this patch to apply?

Thanks,

Carl





reply via email to

[Prev in Thread] Current Thread [Next in Thread]