Coder Social home page Coder Social logo

org-easy-img-insert's People

Contributors

purcell avatar syohex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

org-easy-img-insert's Issues

org-download?

Hi again,

I almost hate to point this out, seeing as how you've been working more on this package, and even just renamed it... but I just came across this package that I had forgotten about:

https://github.com/abo-abo/org-download

It seems like it does the same things, with a few more features and options. You should probably check it out. :)

Improvements

Hi there, I saw this package in Sacha's review. It looks interesting. Here are a few suggestions for improvements:

  1. The readme/description doesn't make it clear what exactly is inserted. From looking at the code, it appears that the image is downloaded into a newly created directory.
  2. It would be a good idea to allow configuration of the directory and such. Some users might prefer to put the images into the same directory as the org file, while others might want to put them in a subdirectory with a certain name.
  3. I saw a lot of nested let statements. May I recommend let*? ;)
  4. I also recommend the f.el package. It's better than rolling your own filename/directory functions.
  5. It's good that you added docstrings to all the functions. I recommend following the Emacs conventions, meaning to remove the "takes X as args" parts and the parentheses around the arg names.
  6. I think the way you're getting the image extension is not good. Getting it from a URL like that (I looked at the MELPA pull request, where you give an example of a URL with an encoded redirect) is failure-prone: you might get the wrong extension if the URL were messy. A better way would be to simply download the file using the filename returned by the server, and then get the extension from the file on disk. It would be much more reliable.
  7. Another issue is that people might often not want to change the image filename in the first place, so making the user type it in could be a hassle. It would probably be better to simply use the filename given by the server. If the user wants to change the filename, it would be handy to be able to call your function with a prefix arg, and then you could offer the user the chance to rename the file before inserting it.
  8. One other thing, which is probably the most significant: your package doesn't have "org" in the name, so there's no indication that it's related to org-mode. It would be better to call it something like org-easy-insert-image so that people can find it when looking for org-related packages.

let: Wrong type argument: stringp, nil

Hello,

I'm interrested in this function, seen in MELPA.

But so far :

  1. copied the auto-img-link-insert.el in an empty scratch
  2. M-x eval-buffer
  3. in an org-buffer : M-x auto-img-link-insert
  4. at prompt : given this link "https://guides.github.com/activities/hello-world/create-new-repo.png" RET
  5. then : test-name RET test-caption-RET
  6. I get a "let: Wrong type argument: stringp, nil" and nothing happens in my org-buffer

Btw, I have ideas for extending the fonctionnalities, if you are interrested. My coding is too weak ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.