From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: refine org-babel-tangle-jump-to-org? Date: Fri, 31 May 2013 09:16:21 -0400 Message-ID: <87wqqfjnmi.fsf@gmail.com> References: <87r4goy0uo.fsf@krugs.de> <87ehcoktsl.fsf@gmail.com> <87fvx3bnzl.fsf@krugs.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiPCb-00049D-PF for emacs-orgmode@gnu.org; Fri, 31 May 2013 09:17:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiPCa-0007Mh-87 for emacs-orgmode@gnu.org; Fri, 31 May 2013 09:17:05 -0400 Received: from mail-ve0-x236.google.com ([2607:f8b0:400c:c01::236]:48246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiPCa-0007Mb-3i for emacs-orgmode@gnu.org; Fri, 31 May 2013 09:17:04 -0400 Received: by mail-ve0-f182.google.com with SMTP id ox1so1116521veb.27 for ; Fri, 31 May 2013 06:17:03 -0700 (PDT) In-Reply-To: <87fvx3bnzl.fsf@krugs.de> (Rainer M. Krug's message of "Fri, 31 May 2013 09:35:42 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Rainer M. Krug" Cc: emacs-orgmode@gnu.org Rainer@krugs.de (Rainer M. Krug) writes: > Eric Schulte writes: > >> Rainer@krugs.de (Rainer M. Krug) writes: >> >>> Hi >>> >>> I am using org-babel-tangle-jump-to-org when debugging code written in >>> org and tangled. I have some longisch code blocks and it is always >>> irritating, as it only jumps to the codde block. Would it be possible to >>> extend the function, that it jumps to the line of the code? >>> That would make this funktion much more user friendly. >>> >> >> I've just pushed up a change which should make this change. I tested >> this against the example.C file tangled from the attached Org-mode file. > > Thanks - works much better now. > Very nice - it jumps even to the location in an indirect buffer - > perfect. > > Without trying to be a perfectionist, it is in most cases between one > and three lines off. > > Is this only in y case? If yes, please let me know and I can send you an > org file privately. > Please do send me a minimal example. In my simple tests it was landing on the same character as in the source code file. > > It would be really nice, if it would be possible to put the cursor on > the same line, preferably same character? But it is definitely usable > like this for debugging. > >> >> * example >> :PROPERTIES: >> :tangle: yes >> :comments: link >> :END: >> >> The required headers. >> #+name: header >> #+begin_src C >> #include >> #+end_src >> >> Here is the auxiliary function. >> #+name: auxiliary >> #+begin_src C >> void aux(char* arg){ >> printf("first argument: %s\n", arg); >> } >> #+end_src >> >> Here is the main function. >> #+name: main >> #+begin_src C >> int main(int argc, char *argv[]) >> { >> aux(argv[1]); >> return 0; >> } >> #+end_src >> >> >> While implementing this change I did notice that this jumping >> functionality only appears to work with linked code blocks, > > linked code blocks? Do you mean the header argument :comments link or, > as I use :comments yes? If I remember correctly, when you announced this > function, you explicitly mentioned that :comments yes is required for it > to work? > I meant to type "named code blocks", but yes you want to use ":comments link", as I use in that example. See the manual page for the comments header argument for more details. Cheers, > > > Thanks a lot, > > Rainer > >>which should >> I believe is a bug. >> >> Best, >> >>> >>> Thanks, >>> >>> Rainer -- Eric Schulte http://cs.unm.edu/~eschulte