Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-11-05 Thread stardiviner
Nicolas Goaziou writes: > Hello, > > stardiviner writes: > >> Because the variable `org-src-source-file' is a bridge to pass info >> between two buffers "source buffer" and source block opened "dedicated >> buffer". So this variable must be global. Otherwise the "dedicated >> buffer" can't

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-11-04 Thread Nicolas Goaziou
Hello, stardiviner writes: > Because the variable `org-src-source-file' is a bridge to pass info > between two buffers "source buffer" and source block opened "dedicated > buffer". So this variable must be global. Otherwise the "dedicated > buffer" can't read it. The variable is set in the

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-11-02 Thread stardiviner
Nicolas Goaziou writes: >> --- >> lisp/org-src.el | 9 - >> lisp/org.el | 9 ++--- >> 2 files changed, 14 insertions(+), 4 deletions(-) >> >> diff --git a/lisp/org-src.el b/lisp/org-src.el >> index 42e1225ed..0426ff96a 100644 >> --- a/lisp/org-src.el >> +++ b/lisp/org-src.el >

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-11-01 Thread Nicolas Goaziou
Hello, stardiviner writes: > I regenerated the patch. Thank you. Some more comments. > * org-src.el (org-src-source-file): Add a variable to get the file path >at the beginning of the function `org-src--edit-element'. > * org.el (org-insert-link): support option org-link-file-path-type >

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-10-30 Thread stardiviner
Hi, Nicolas, just a remind that have you reviewed my patch? Is it what you said in `INITIALIZE` argument? Is it fine to merge? -- [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode):

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-10-26 Thread stardiviner
Nicolas Goaziou writes: > Hello, > > stardiviner writes: > >> Thanks for this hint, I added a new entry in org-src--babel-info list to >> pass the original parent file path. > > Thank you. Some comments follow. > >> - (language body arguments switches name start coderef)" >> + (language body

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-10-26 Thread Nicolas Goaziou
Hello, stardiviner writes: > Thanks for this hint, I added a new entry in org-src--babel-info list to > pass the original parent file path. Thank you. Some comments follow. > - (language body arguments switches name start coderef)" > + (language body arguments switches name start coderef

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-10-23 Thread stardiviner
Nicolas Goaziou writes: >> ;; I tried to add this, but failed. because `coderef` is executed in >> `org-edit-src-code` which invokes `org-src--edit-element`, it create a >> dedicated buffer which does not have `buffer-file-name`. I don't know how to >> archive what I want now. >>

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-09-26 Thread Nicolas Goaziou
Hello, stardiviner writes: > I take a look at the org.el code of functions `org-store-link`, > `org-insert-link`, they can't inherit the original buffer file name > `buffer-file-name`. Why can't they? > So can't use `org-link-file-path-type 'adaptive` case. But I found > `org-insert-link`

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-09-23 Thread stardiviner
Nicolas Goaziou writes: > Hello, > > stardiviner writes: > >> `org-insert-link` should be smart on decide whether current buffer is the >> same buffer with `org-store-link` source buffer, if yes, use [[(set the temp >> buffer to unibyte)]]. If no, use: >> >>

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-06-24 Thread stardiviner
I just toke a look at the source code of `org-store-link'. I think it's possible to implement it. I will take a try. Might need to add support in `org-open-at-point` [C-c C-o]. Nicolas Goaziou writes: > Hello, > > stardiviner writes: > >> `org-insert-link` should be smart on decide whether

Re: [O] coderef does not provide file path for org-insert-link when not in original buffre

2018-06-23 Thread Nicolas Goaziou
Hello, stardiviner writes: > `org-insert-link` should be smart on decide whether current buffer is the > same buffer with `org-store-link` source buffer, if yes, use [[(set the temp > buffer to unibyte)]]. If no, use: > >

[O] coderef does not provide file path for org-insert-link when not in original buffre

2018-05-14 Thread stardiviner
Suppose I have a src block: #+begin_src emacs-lisp (let ((case-fold-search nil) (str (prin1-to-string (with-temp-buffer (set-buffer-multibyte nil) ; (ref:set the temp buffer to unibyte) (insert (with-current-buffer