Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added handling of absolute path to vimwiki #811

Closed

Conversation

justrajdeep
Copy link

@justrajdeep justrajdeep commented Jan 27, 2020

Steps for submitting a pull request:

  • ALL pull requests should be made against the dev branch!
  • Take a look at CONTRIBUTING.MD
  • Reference any related issues.
  • Provide a description of the proposed changes.
  • PRs must pass Vint tests and add new Vader tests as applicable.
  • Make sure to update the documentation in doc/vimwiki.txt if applicable,
    including the Changelog and Contributors sections.

…esolved

- add [[//absolute_path]] to handle absolute path
- updated doc to reflect the changes
Copy link
Member

@tinmarino tinmarino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change test path to be docker coherent

Log 'Hello !'

Given vimwiki(some wiki link):
[[//$UVMKIT_HOME/uvm/src/seq/uvm_sequencer_base.svh|uvm_sequencer_base::wait_for_sequences]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This absolute path specific to your machine ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Sorry!! nice catch ... will remove it

@tinmarino
Copy link
Member

Neat ! With doc and test. All in one commit. Seems clean.
I think the test won't work on my machine, the path is specific

@tinmarino
Copy link
Member

It is not working on my machine.
I tried a markdown wiki with:

[test1](//home2/tourneboeuf/Test/Wiki/test.md)

I improved a little bit your Vader test. But itdoes not work as the absolute link is not creating so the filetype is not the one expected.

# TODO mutualize with link_creation

Execute:
  Log 'Hello !'

Given vimwiki(some wiki link):
  [[//home/vimwiki/testmarkdown/absolute_link1.md|absolute link 1]]
  [absolute link](//home/vimwiki/testmarkdown/absolute_link2.md)

Execute (check vimwiki#base#resolve_link functionality):
#  setf pandoc
#  AssertEqual vimwiki#base#resolve_link('/tmp/absolute_link')['filename'], '/tmp/absolute_link'

Do (Enter):
  :file! $HOME/testmarkdown/given.md\<Cr>
  :AssertEqual &ft, 'vimwiki'\<Cr>
  \<Tab>
  \<Tab>
  \<Cr>
  \<Cr>
  \<Cr>
  :AssertEqual @%, 'toto'\<Cr>

@tinmarino tinmarino assigned tinmarino and unassigned tinmarino May 12, 2020
@tinmarino tinmarino added the change-required Pull request need some changes from autor to be accepted label May 12, 2020
tinmarino pushed a commit to tinmarino/vimwiki that referenced this pull request Jul 22, 2020
…ustrajdeep

- update vimwiki link handling so that if using env variables it is resolved
- add [[//absolute_path]] to handle absolute path
- updated doc to reflect the changes
tinmarino pushed a commit that referenced this pull request Jul 22, 2020


- update vimwiki link handling so that if using env variables it is resolved
- add [[//absolute_path]] to handle absolute path
- updated doc to reflect the changes
@tinmarino
Copy link
Member

Hi,

Rebased manually: e3e841f
I add to do some modifications, and kept all in only one commit. I hope you don't feel stolen for that. I left your name and comment in the commit.

Tests are important: For example, the raw inclusion of your modifications broke some : https://travis-ci.com/github/vimwiki/vimwiki/builds/176612972
because let link_text = resolve(expand(link_text)) was breaking local links like [local](#heading)

Anyway good job, it is working.
See You.

@tinmarino tinmarino closed this Jul 22, 2020
@justrajdeep justrajdeep deleted the absolute_path_enhancement_dev branch July 22, 2020 15:32
deepredsky pushed a commit to deepredsky/vimwiki that referenced this pull request Jan 16, 2021
…ustrajdeep

- update vimwiki link handling so that if using env variables it is resolved
- add [[//absolute_path]] to handle absolute path
- updated doc to reflect the changes
jls83 pushed a commit to jls83/vimwiki that referenced this pull request Jan 17, 2023
…ustrajdeep

- update vimwiki link handling so that if using env variables it is resolved
- add [[//absolute_path]] to handle absolute path
- updated doc to reflect the changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change-required Pull request need some changes from autor to be accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants