unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* integration with Apple Xcode
@ 2004-11-25  2:08 Sanghyuk Suh
  0 siblings, 0 replies; 12+ messages in thread
From: Sanghyuk Suh @ 2004-11-25  2:08 UTC (permalink / raw)


Hello.
I changed src/macterm.c, lisp/term/mac-win.el to support Apple Xcode's open document event.
With this changes, automatically goto line or select range specified from Xcode after opening file.
Please review the diff, and if possible, apply this change to current cvs tree.
Sorry about my poor english.

Sanghyuk Suh

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

* Integration with Apple Xcode
@ 2004-11-25  2:20 Sanghyuk Suh
  2004-11-25 10:02 ` Kim F. Storm
  2004-11-26 17:22 ` Richard Stallman
  0 siblings, 2 replies; 12+ messages in thread
From: Sanghyuk Suh @ 2004-11-25  2:20 UTC (permalink / raw)


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

Sorry, I forgot attaching the diff

Sanghyuk Suh

[-- Attachment #2: emacs-xcode.diff --]
[-- Type: application/octet-stream, Size: 3860 bytes --]

Index: lisp/term/mac-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v
retrieving revision 1.25
diff -c -r1.25 mac-win.el
*** lisp/term/mac-win.el	2 Sep 2004 16:59:18 -0000	1.25
--- lisp/term/mac-win.el	23 Nov 2004 15:34:02 -0000
***************
*** 148,154 ****
    "Edit the files listed in the drag-n-drop event.\n\
  Switch to a buffer editing the last file dropped."
    (interactive "e")
!   (save-excursion
      ;; Make sure the drop target has positive co-ords
      ;; before setting the selected frame - otherwise it
      ;; won't work.  <skx@tardis.ed.ac.uk>
--- 148,154 ----
    "Edit the files listed in the drag-n-drop event.\n\
  Switch to a buffer editing the last file dropped."
    (interactive "e")
!   ;(save-excursion
      ;; Make sure the drop target has positive co-ords
      ;; before setting the selected frame - otherwise it
      ;; won't work.  <skx@tardis.ed.ac.uk>
***************
*** 160,173 ****
  	  (set-frame-selected-window nil window))
        (mapcar
         '(lambda (file)
! 	  (find-file
! 	   (decode-coding-string
! 	    file
! 	    (or file-name-coding-system
! 		default-file-name-coding-system))))
         (car (cdr (cdr event)))))
    (raise-frame)
!   (recenter)))
  
  (global-set-key [drag-n-drop] 'mac-drag-n-drop)
  
--- 160,182 ----
  	  (set-frame-selected-window nil window))
        (mapcar
         '(lambda (file)
! 	  (if (listp file)
! 	      (let ((line (car file))
! 		    (start (car (cdr file)))
! 		    (end (car (cdr (cdr file)))))
! 		(if (> line 0)
! 		    (goto-line line)
! 		  (if (and (> start 0) (> end 0))
! 		      (progn (set-mark start)
! 			     (goto-char end)))))
! 	    (find-file
! 	     (decode-coding-string
! 	      file
! 	      (or file-name-coding-system
! 		  default-file-name-coding-system)))))
         (car (cdr (cdr event)))))
    (raise-frame)
!   (recenter));)
  
  (global-set-key [drag-n-drop] 'mac-drag-n-drop)
  
Index: src/macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.82
diff -c -r1.82 macterm.c
*** src/macterm.c	21 Nov 2004 15:49:12 -0000	1.82
--- src/macterm.c	23 Nov 2004 15:34:03 -0000
***************
*** 7760,7765 ****
--- 7760,7776 ----
  /* Called when we receive an AppleEvent with an ID of
     "kAEOpenDocuments".  This routine gets the direct parameter,
     extracts the FSSpecs in it, and puts their names on a list.  */
+ #pragma options align=mac68k
+ typedef struct SelectionRange {
+   short unused1; // 0 (not used)
+   short lineNum; // line to select (<0 to specify range)
+   long startRange; // start of selection range (if line < 0)
+   long endRange; // end of selection range (if line < 0)
+   long unused2; // 0 (not used)
+   long theDate; // modification date/time
+ } SelectionRange;
+ #pragma options align=reset
+ 
  static pascal OSErr
  do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon)
  {
***************
*** 7768,7778 ****
--- 7779,7797 ----
    AEKeyword keyword;
    DescType actual_type;
    Size actual_size;
+   SelectionRange position;
  
    err = AEGetParamDesc (message, keyDirectObject, typeAEList, &the_desc);
    if (err != noErr)
      goto descriptor_error_exit;
  
+   err = AEGetParamPtr (message, keyAEPosition, typeChar, &actual_type, &position, sizeof(SelectionRange), &actual_size);
+   if (err == noErr)
+     drag_and_drop_file_list = Fcons (list3 (make_number (position.lineNum + 1),
+ 					    make_number (position.startRange + 1),
+ 					    make_number (position.endRange + 1)),
+ 				     drag_and_drop_file_list);
+ 
    /* Check to see that we got all of the required parameters from the
       event descriptor.  For an 'odoc' event this should just be the
       file list.  */

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Integration with Apple Xcode
  2004-11-25  2:20 Integration with Apple Xcode Sanghyuk Suh
@ 2004-11-25 10:02 ` Kim F. Storm
  2004-11-25 13:27   ` Sanghyuk Suh
  2004-11-26 17:22 ` Richard Stallman
  1 sibling, 1 reply; 12+ messages in thread
From: Kim F. Storm @ 2004-11-25 10:02 UTC (permalink / raw)
  Cc: emacs-devel

Sanghyuk Suh <han9kin@mac.com> writes:

> Sorry, I forgot attaching the diff

I cannot comment on the diff itself, but to use your diff (it's more
than 15 lines of new code), we need legal papers from you and your
employer.

If our MAC guys find your patch useful, we need those before
installing the patch.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Integration with Apple Xcode
  2004-11-25 10:02 ` Kim F. Storm
@ 2004-11-25 13:27   ` Sanghyuk Suh
  2004-11-25 17:28     ` Steven Tamm
  0 siblings, 1 reply; 12+ messages in thread
From: Sanghyuk Suh @ 2004-11-25 13:27 UTC (permalink / raw)
  Cc: emacs-devel


Kim F. Storm wrote:

> I cannot comment on the diff itself, but to use your diff (it's more
> than 15 lines of new code), we need legal papers from you and your
> employer.

I am new to your system. What exactly should I do?

> If our MAC guys find your patch useful, we need those before
> installing the patch.

If you do, let me know the instructions.

Sanghyuk Suh

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

* Re: Integration with Apple Xcode
  2004-11-25 13:27   ` Sanghyuk Suh
@ 2004-11-25 17:28     ` Steven Tamm
  2004-11-26  0:56       ` Sanghyuk Suh
  2004-11-26 21:04       ` Richard Stallman
  0 siblings, 2 replies; 12+ messages in thread
From: Steven Tamm @ 2004-11-25 17:28 UTC (permalink / raw)
  Cc: Kim F. Storm, emacs-devel

It is useful.

Most of the diff is boilerplate code from metrowerks documentation:
http://www.codingmonkeys.de/techpubs/externaleditor/ 
pbxexternaleditor.html.

The lisp code I could just as easily rewrite, but it works so it'd be  
easier to send him papers.

-Steven

On Nov 25, 2004, at 5:27 AM, Sanghyuk Suh wrote:

>
> Kim F. Storm wrote:
>
>> I cannot comment on the diff itself, but to use your diff (it's more
>> than 15 lines of new code), we need legal papers from you and your
>> employer.
>
> I am new to your system. What exactly should I do?
>
>> If our MAC guys find your patch useful, we need those before
>> installing the patch.
>
> If you do, let me know the instructions.
>
> Sanghyuk Suh
>
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Integration with Apple Xcode
  2004-11-25 17:28     ` Steven Tamm
@ 2004-11-26  0:56       ` Sanghyuk Suh
  2004-11-26 10:19         ` Kim F. Storm
  2004-11-26 21:04       ` Richard Stallman
  1 sibling, 1 reply; 12+ messages in thread
From: Sanghyuk Suh @ 2004-11-26  0:56 UTC (permalink / raw)
  Cc: Kim F. Storm, emacs-devel

 
On Friday, November 26, 2004, at 02:28AM, Steven Tamm <steventamm@mac.com> wrote:

>Most of the diff is boilerplate code from metrowerks documentation:
>http://www.codingmonkeys.de/techpubs/externaleditor/ 
>pbxexternaleditor.html.

Yes, right.
Strictly speaking, it's not more than 15 lines of new code, i think.
Do you agree?

>
>The lisp code I could just as easily rewrite, but it works so it'd be  
>easier to send him papers.
>
>-Steven
>
>On Nov 25, 2004, at 5:27 AM, Sanghyuk Suh wrote:
>
>>
>> Kim F. Storm wrote:
>>
>>> I cannot comment on the diff itself, but to use your diff (it's more
>>> than 15 lines of new code), we need legal papers from you and your
>>> employer.
>>
>> I am new to your system. What exactly should I do?
>>
>>> If our MAC guys find your patch useful, we need those before
>>> installing the patch.
>>
>> If you do, let me know the instructions.
>>
>> Sanghyuk Suh
>>
>>
>>
>> _______________________________________________
>> Emacs-devel mailing list
>> Emacs-devel@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-devel
>
>
>

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

* Re: Integration with Apple Xcode
  2004-11-26  0:56       ` Sanghyuk Suh
@ 2004-11-26 10:19         ` Kim F. Storm
  2004-11-27 18:51           ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: Kim F. Storm @ 2004-11-26 10:19 UTC (permalink / raw)
  Cc: Steven Tamm, emacs-devel

Sanghyuk Suh <han9kin@mac.com> writes:

>  
> On Friday, November 26, 2004, at 02:28AM, Steven Tamm <steventamm@mac.com> wrote:
>
>>Most of the diff is boilerplate code from metrowerks documentation:
>>http://www.codingmonkeys.de/techpubs/externaleditor/ 
>>pbxexternaleditor.html.
>
> Yes, right.
> Strictly speaking, it's not more than 15 lines of new code, i think.
> Do you agree?

I don't know what RMS says about "boiler plate" code...

In any case, if you intend to contribute other changes to emacs in the
future, you may just as well sign papers now (assigning past and
future changes for Emacs to the FSF), as it is the total size of all
your contributions that must not exceed ~15 lines.


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Integration with Apple Xcode
  2004-11-25  2:20 Integration with Apple Xcode Sanghyuk Suh
  2004-11-25 10:02 ` Kim F. Storm
@ 2004-11-26 17:22 ` Richard Stallman
       [not found]   ` <3E5B2486-443E-11D9-A1B7-000393861220@sage.com>
  1 sibling, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2004-11-26 17:22 UTC (permalink / raw)
  Cc: emacs-devel

This is just long enough that we would need legal papers
to install it.  A disclaimer would suffice.

If the people who work on Mac support decide they want to
use your code, they will tell me, and I'll send you info
about how to do this.

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

* Re: Integration with Apple Xcode
  2004-11-25 17:28     ` Steven Tamm
  2004-11-26  0:56       ` Sanghyuk Suh
@ 2004-11-26 21:04       ` Richard Stallman
  1 sibling, 0 replies; 12+ messages in thread
From: Richard Stallman @ 2004-11-26 21:04 UTC (permalink / raw)
  Cc: han9kin, emacs-devel, storm

    The lisp code I could just as easily rewrite, but it works so it'd be  
    easier to send him papers.

Ok, I will do that now.

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

* Re: Integration with Apple Xcode
  2004-11-26 10:19         ` Kim F. Storm
@ 2004-11-27 18:51           ` Richard Stallman
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Stallman @ 2004-11-27 18:51 UTC (permalink / raw)
  Cc: steventamm, han9kin, emacs-devel

    I don't know what RMS says about "boiler plate" code...

Code that wasn't written by Sanghyuk Suh isn't relevant to his
authorship.  So we really only need to count the size of the code he
wrote.  If that isn't too large, we could install all of this now as a
"tiny change".

    In any case, if you intend to contribute other changes to emacs in the
    future, you may just as well sign papers now (assigning past and
    future changes for Emacs to the FSF), as it is the total size of all
    your contributions that must not exceed ~15 lines.

Yes, that is right.

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

* Re: Integration with Apple Xcode
       [not found]   ` <3E5B2486-443E-11D9-A1B7-000393861220@sage.com>
@ 2004-12-02  8:58     ` Sébastien Kirche
  2004-12-03  3:42     ` Richard Stallman
  1 sibling, 0 replies; 12+ messages in thread
From: Sébastien Kirche @ 2004-12-02  8:58 UTC (permalink / raw)
  Cc: Richard Stallman


Le 26 nov. 2004, à 18:22, Richard Stallman wrote :

> This is just long enough that we would need legal papers
> to install it.  A disclaimer would suffice.

Is there a model of these legal papers available online
somewhere ?

I would like to take a look on them : as I am working for
a software company, I may need such disclaimer one day.

If not online, one could send me a copy ?

Thanks.

[sorry for the first private copy, Richard, i did not pay
  enough attention when i pressed "reply-to" :/]

Sébastien Kirche

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

* Re: Integration with Apple Xcode
       [not found]   ` <3E5B2486-443E-11D9-A1B7-000393861220@sage.com>
  2004-12-02  8:58     ` Sébastien Kirche
@ 2004-12-03  3:42     ` Richard Stallman
  1 sibling, 0 replies; 12+ messages in thread
From: Richard Stallman @ 2004-12-03  3:42 UTC (permalink / raw)


    Is there a model of these legal papers available online somewhere ?
    I would like to take a look on them : as I am working for a software 
    company,
    I may need such disclaimer one day.

We do not publish our legal papers because we do not want volunteers
to try to decide on their own what kind of papers to use.

We don't yet have a model we can recommend to other organizations.
I have been trying to work on one, but it isn't ready yet.
How urgently will you need this?

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

end of thread, other threads:[~2004-12-03  3:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-25  2:20 Integration with Apple Xcode Sanghyuk Suh
2004-11-25 10:02 ` Kim F. Storm
2004-11-25 13:27   ` Sanghyuk Suh
2004-11-25 17:28     ` Steven Tamm
2004-11-26  0:56       ` Sanghyuk Suh
2004-11-26 10:19         ` Kim F. Storm
2004-11-27 18:51           ` Richard Stallman
2004-11-26 21:04       ` Richard Stallman
2004-11-26 17:22 ` Richard Stallman
     [not found]   ` <3E5B2486-443E-11D9-A1B7-000393861220@sage.com>
2004-12-02  8:58     ` Sébastien Kirche
2004-12-03  3:42     ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2004-11-25  2:08 integration " Sanghyuk Suh

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