gnu-music-discuss
[Top][All Lists]
Advanced

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

[PATHCH] point-and-click foe xemacs


From: Mark Hindley
Subject: [PATHCH] point-and-click foe xemacs
Date: Thu, 25 Jan 2001 11:50:03 +0000 (GMT)

The patch below provides column positioning point-and-click for
xemacs. The diff is against 21.1.13, but ought to be okay back to
(at least) 21.1.10.

Perhaps you would like to make it available alongside
emacsclient-column? Obviously you will still need to patch xdvi as well.

Hope people find it useful. It certainly speeds up the editing cycle
for me.

Best wishes

Mark



*** ./lib-src/gnuclient.c       2001/01/25 00:14:49     1.1
--- ./lib-src/gnuclient.c       2001/01/25 09:46:51
***************
*** 299,304 ****
--- 299,305 ----
  main (int argc, char *argv[])
  {
    int starting_line = 1;      /* line to start editing at */
+   int starting_column = 0;    /* column to start editing at */
    char command[MAXPATHLEN+50];        /* emacs command buffer */
    char fullpath[MAXPATHLEN+1];        /* full pathname to file */
    char *eval_form = NULL;     /* form to evaluate with `-eval' */
***************
*** 447,456 ****
  #ifdef INTERNET_DOMAIN_SOCKETS
               "usage: %s [-nw] [-display display] [-q] [-v] [-l library]\n"
                 "       [-batch] [-f function] [-eval form]\n"
!              "       [-h host] [-p port] [-r remote-path] [[+line] file] 
...\n",
  #else /* !INTERNET_DOMAIN_SOCKETS */
               "usage: %s [-nw] [-q] [-v] [-l library] [-f function] [-eval 
form] "
!              "[[+line] path] ...\n",
  #endif /* !INTERNET_DOMAIN_SOCKETS */
               progname);
        exit (1);
--- 448,457 ----
  #ifdef INTERNET_DOMAIN_SOCKETS
               "usage: %s [-nw] [-display display] [-q] [-v] [-l library]\n"
                 "       [-batch] [-f function] [-eval form]\n"
!              "       [-h host] [-p port] [-r remote-path] [[+line[:column]] 
file] ...\n",
  #else /* !INTERNET_DOMAIN_SOCKETS */
               "usage: %s [-nw] [-q] [-v] [-l library] [-f function] [-eval 
form] "
!              "[[+line[:column]] path] ...\n",
  #endif /* !INTERNET_DOMAIN_SOCKETS */
               progname);
        exit (1);
***************
*** 643,649 ****
        for (; argv[i]; i++)
        {
          if (i < argc - 1 && *argv[i] == '+')
!           starting_line = atoi (argv[i++]);
          else
            starting_line = 1;
          /* If the last argument is +something, treat it as a file. */
--- 644,655 ----
        for (; argv[i]; i++)
        {
          if (i < argc - 1 && *argv[i] == '+')
!           {
!             char *p =  strchr (argv[i], ':');
!             if (p != NULL )
!               starting_column = atoi( &p[1] );
!             starting_line = atoi (argv[i++]);
!           }
          else
            starting_line = 1;
          /* If the last argument is +something, treat it as a file. */
***************
*** 659,665 ****
  #else
          path = my_strdup (fullpath);
  #endif
!         sprintf (command, "(%d . %s)", starting_line, clean_string (path));
          send_string (s, command);
          free (path);
        } /* for */
--- 665,671 ----
  #else
          path = my_strdup (fullpath);
  #endif
!         sprintf (command, "((%d . %d) . %s)", starting_line, starting_column, 
clean_string (path));
          send_string (s, command);
          free (path);
        } /* for */
*** ./lisp/gnuserv.el   2001/01/25 09:32:42     1.1
--- ./lisp/gnuserv.el   2001/01/25 09:43:10
***************
*** 450,463 ****
           (deiconify-frame frame))
        ;; Visit all the listed files.
        (while list
!       (let ((line (caar list)) (path (cdar list)))
          (select-frame frame)
          ;; Visit the file.
          (funcall (if view
                       gnuserv-view-file-function
                     gnuserv-find-file-function)
                   path)
!         (goto-line line)
          ;; Don't memorize the quick and view buffers.
          (unless (or quick view)
            (pushnew (current-buffer) (gnuclient-buffers client))
--- 450,463 ----
           (deiconify-frame frame))
        ;; Visit all the listed files.
        (while list
!       (let ((line (caaar list)) (column (cdaar list)) (path (cdar list)))
          (select-frame frame)
          ;; Visit the file.
          (funcall (if view
                       gnuserv-view-file-function
                     gnuserv-find-file-function)
                   path)
!         (goto-line line)(move-to-column column)
          ;; Don't memorize the quick and view buffers.
          (unless (or quick view)
            (pushnew (current-buffer) (gnuclient-buffers client))



reply via email to

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