CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/06/08 13:10:21

Modified files:
        .              : ChangeLog 
        scm            : editor.scm framework-gnome.scm lily.scm 
        scripts        : lilypond-invoke-editor.scm 

Log message:
        * scm/editor.scm: add char argument.
        
        * scripts/lilypond-invoke-editor.scm (dissect-uri): add char.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3740&tr2=1.3741&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/editor.scm.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/framework-gnome.scm.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/lily.scm.diff?tr1=1.354&tr2=1.355&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scripts/lilypond-invoke-editor.scm.diff?tr1=1.7&tr2=1.8&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3740 lilypond/ChangeLog:1.3741
--- lilypond/ChangeLog:1.3740   Wed Jun  8 13:07:10 2005
+++ lilypond/ChangeLog  Wed Jun  8 13:10:21 2005
@@ -1,5 +1,9 @@
 2005-06-08  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
+       * scm/editor.scm: add char argument.
+
+       * scripts/lilypond-invoke-editor.scm (dissect-uri): add char. 
+
        * ttftool/util.c (syserror): use errno for better error reporting.
 
        * lily/source-file.cc (get_counts): new function. Calc column,
Index: lilypond/scm/editor.scm
diff -u lilypond/scm/editor.scm:1.11 lilypond/scm/editor.scm:1.12
--- lilypond/scm/editor.scm:1.11        Mon Jun  6 07:57:06 2005
+++ lilypond/scm/editor.scm     Wed Jun  8 13:10:21 2005
@@ -60,7 +60,7 @@
      x
      (re-sub "\\\\" "/" x)))
 
-(define-public (get-editor-command file-name line column)
+(define-public (get-editor-command file-name line char column)
   (let* ((editor (get-editor))
         (template (get-command-template editor-command-template-alist editor))
         (command
Index: lilypond/scm/framework-gnome.scm
diff -u lilypond/scm/framework-gnome.scm:1.45 
lilypond/scm/framework-gnome.scm:1.46
--- lilypond/scm/framework-gnome.scm:1.45       Tue May 10 21:58:45 2005
+++ lilypond/scm/framework-gnome.scm    Wed Jun  8 13:10:21 2005
@@ -177,8 +177,9 @@
 (define (spawn-editor location)
   (let* ((file-name (car location))
         (line (cadr location))
-        (column (caddr location))
-        (command (get-editor-command file line column)))
+        (char (caddr location))
+        (column (cadddr location))
+        (command (get-editor-command file line char column)))
     (debugf "spawning: ~s\n" command)
     (if (= (primitive-fork) 0)
        (let ((command-list (string-split command #\ )));; (get-ifs))))
Index: lilypond/scm/lily.scm
diff -u lilypond/scm/lily.scm:1.354 lilypond/scm/lily.scm:1.355
--- lilypond/scm/lily.scm:1.354 Tue Jun  7 13:34:02 2005
+++ lilypond/scm/lily.scm       Wed Jun  8 13:10:21 2005
@@ -361,7 +361,7 @@
          (begin
            ;; ugh
            (ly:stderr-redirect "foo" "r")
-           (system (get-editor-command log-name 0 0))
+           (system (get-editor-command log-name 0 0 0))
            (ly:error (_ "failed files: ~S") (string-join failed))
            ;; not reached?
            (exit 1))
@@ -371,7 +371,7 @@
   (let* ((ly (string-append (ly:effective-prefix) "/ly/"))
         ;; FIXME: soft-code, localize
         (welcome-ly (string-append ly "Welcome_to_LilyPond.ly"))
-        (cmd (get-editor-command welcome-ly 0 0)))
+        (cmd (get-editor-command welcome-ly 0 0 0)))
     (ly:message (_ "Invoking `~a'...") cmd)
     (system cmd)
     (exit 1)))
Index: lilypond/scripts/lilypond-invoke-editor.scm
diff -u lilypond/scripts/lilypond-invoke-editor.scm:1.7 
lilypond/scripts/lilypond-invoke-editor.scm:1.8
--- lilypond/scripts/lilypond-invoke-editor.scm:1.7     Mon Jun  6 07:57:06 2005
+++ lilypond/scripts/lilypond-invoke-editor.scm Wed Jun  8 13:10:21 2005
@@ -42,7 +42,7 @@
   (format port "~a (GNU LilyPond) ~a \n" PROGRAM-NAME TOPLEVEL-VERSION))
 
 (define (show-help port)
-  (format port (_ "Usage: lilypond-invoke-editor [textedit://]FILE:LINE:COLUMN
+  (format port (_ "Usage: lilypond-invoke-editor 
[textedit://]FILE:LINE:CHAR:COLUMN
 
 Visit a file and position the cursor.
 
@@ -79,19 +79,20 @@
   
 (define (dissect-uri uri)
   (let* ((ri "textedit://")
-        (file-name:line:column (re-sub ri "" uri))
-        (match (string-match "(.*):([^:]+):(.*)$" file-name:line:column)))
+        (file-name:line:char:column (re-sub ri "" uri))
+        (match (string-match "(.*):([^:]+):([^:]+):(.*)$" 
file-name:line:char:column)))
     (if match
        (list (unquote-uri (match:substring match 1))
              (match:substring match 2)
-             (match:substring match 3))
+             (match:substring match 3)
+             (match:substring match 4))
        (begin
          ;; FIXME: why be so strict wrt :LINE:COLUMN,
          ;; esp. considering omitting textedit:// is explicitly
          ;; allowed.
          (format (current-error-port) (_ "invalid URI: ~a") uri)
          (newline (current-error-port))
-         (format (current-error-port) (_ "expect: ~aFILE:LINE:COLUMN") ri)
+         (format (current-error-port) (_ "expect: ~aFILE:LINE:CHAR:COLUMN") ri)
          (newline (current-error-port))
          (exit 1)))))
 


_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to