Approximating success one failure at a time

Monday, March 30, 2009

Make hideshow behave more like org-mode

I wanted to have hideshow.el work more like org-mode, so I spent a little time to whip up hideshow-org.el. It doesn't integrate hideshow and org-mode. It simply makes TAB do double duty in code, both performing the regular code indentation as normal, and showing and hiding code blocks. If your code needs to be indented, TAB will indent. If no indentation is needed, then TAB will try to toggle the visibility of the block. I put together a screencast to demonstrate what it does. The screencast quickly goes over org-mode, hideshow, and then demonstrates hideshow-org. If you're already familiar with org-mode or hideshow, I'd recommend skipping to the 2:30 mark which shows exactly what hideshow-org does.

The code is available on github here. Here is the agenda to make the links easier to get at. Feedback is most welcome.

61 comments:

  1. Looks pretty cool. What's your color theme?

    ReplyDelete
  2. After flirting with TextMate, I came back to Emacs but not without taking the color theme "pastels on dark." Here's the code for it. And here is the code in my .emacs:

    (load-file "/path/to/pastels-on-dark-theme.el")
    (color-theme-pastels-on-dark)

    ReplyDelete
  3. Looks great! One potential problem would be with languages like python, where indentation is syntax. With the emacs python mode, hitting TAB cycles through the possible legal indentations of the current line, of which there are often several. So I guess your approach wouldn't work there... You could always use "S-TAB" I suppose.

    ReplyDelete
  4. Awesome, I could never remember the folding key bindings, and now it makes it so easy, since I am also an org-mode user.

    Thank you!

    ReplyDelete
  5. Nice job! (I'm catching up on the org-mode mailing list, and found your post about this.) I'll try it, but I wonder, did you make any progress incorporating this into hideshow itself?

    ReplyDelete
  6. I worked to much to do the same thing, but due to my weird method i couldn't, but now after reading this blog no more problem.

    - John Devis
    Magento Themes

    ReplyDelete
  7. Code is little bit difficult for me now, but i hope i will learn it soon.

    - Tanya
    Web Design Firm

    ReplyDelete
  8. How does one enable this extension by default?

    ReplyDelete
  9. Tried your nice color theme, but I get:
    Symbol's function definition is void: color-theme-install
    Any ideas?

    ReplyDelete
  10. Hey a great post for sure, thanks a lot for sharing the information......

    Magento Themes

    ReplyDelete
  11. Thanks a lot for sharing the post, really a splendid piece of information shared.....

    Electric Cigarette

    ReplyDelete
  12. The information posted seems to be great, well done...

    Hair Transplant Pakistan

    ReplyDelete
  13. Awesome, I could never remember the folding key bindings, and now it makes it so easy, since I am also an org-mode user.

    Thank you!

    party poker bonus code

    ReplyDelete
  14. I worked to much to do the same thing, but due to my weird method i couldn't, but now after reading this blog no more problem.
    thank you so much


    Party Casino Bonus

    ReplyDelete
  15. Hi,


    Fantastic theme, Thanks a lot for sharing it.

    ReplyDelete
  16. Hello Dear,


    Super perfect theme& looking so nice. keep it up. Thanks

    ReplyDelete
  17. Hi am!

    This blog is awesome full useful information that i was in dire need of. I will share your blog with my friends. Keep it up Thanks

    ReplyDelete
  18. Wow, it is really fantastic theme. I have used it.It is looking so cute. Love your blog. Best wishes for you future blogging career. Thanks

    ReplyDelete
  19. I am feeling very fresh and comfortable after reading you article.
    Nice work and keep doing well.

    Awesome pictures.They completely refresh my mind.
    Thanks for sharing such a useful information.
    It seems that you did a lot of hard work for this article.

    ReplyDelete
  20. Great information. Thanks for sharing it.

    ReplyDelete
  21. This is very nice information... i like this very much... guide me some thing that I came back to Emacs but not without taking the color theme "pastels on dark." ?????

    ReplyDelete
  22. Very nice information you have shared..... I'm catching up on the org-mode mailing list, and found your post about this is very nice.....

    ReplyDelete
  23. Very nice article and fantastic information as well... this awesome... keep sharing this information... i will use it....

    ReplyDelete
  24. Very nice post, I like your blogging techniques and have bookmarked this blog as found it very informative. Keep it up.... fabulous....

    ReplyDelete
  25. Wow, it is really fantastic. I have used it. It is looking so cute. Love your blog. very nice post..

    ReplyDelete
  26. Wow, seems to be some thing out standing. This stands as being one of the most clever approach to either hide or show the information to users whom you like.

    Promotional Items

    ReplyDelete
  27. I am feeling very fresh and comfortable after reading you article. Nice work and keep doing well
    Party Poker Review

    ReplyDelete
  28. I agree totally.
    Even though the warnings are there, I can guarantee a lot of people have the code on their live box, or people will use it in the future.

    ReplyDelete
  29. Surely a great post, never knew that all was possible. Is this implemented using HTML tags or Java Script.... ???

    ReplyDelete
  30. Great compilation. Thanks for inspiring. Keep it going .

    ReplyDelete
  31. This is very inserting I like this... i will keep my eye on it....... wonderful.....

    ReplyDelete
  32. Even though the warnings are there, I can guarantee a lot of people have the code on their live box, or people will use it in the future.

    ReplyDelete
  33. Lahore janitorial services provides a complete range of cleaning services and painting services for homes and offices. Our services are available in Lahore, islambad, karachi We'll deep clean your home, office, sofa, car, bathroom etc to make them look good as new. Lahore janitorial services provides complete range of Housekeeping services for both Residential and Commercial Establishments. We do Lahore janitorial services of your home, office, sofa, car, washroom etc to make them look good and sparkling. We have experience of more than a decade in housekeeping and cleaning business.
    Lahore janitorial services
    Ac services
    cctv camera dealer

    ReplyDelete
  34. Very Nice Blog!!! Thanks for Sharing Awesome Blog!! People who are suffering from a sleep disorder like insomnia are advised to take Zopiclone 7.5mg pills or similar pills by the doctor. You can order here.
    order Zopiclone without prescription Online
    buy eszopiclone online
    order Modalert 200mg COD
    buy Modafinil online COD

    ReplyDelete
  35. Very Nice Blog!!! Thanks for Sharing Awesome Blog!! People who are suffering from a sleep disorder like insomnia are advised to take Zopiclone 7.5mg pills or similar pills by the doctor. You can order here.
    order Zopiclone without prescription Online
    buy eszopiclone online
    order Modalert 200mg COD
    buy Modafinil online COD

    ReplyDelete
  36. Are you suffering from a sleep disorder? Order Modafinil/Armodafinil to get relief from sleep apnea. Buy Generic Provigil online on Sale at cheap price.
    order Modafinil 200mg online
    order Modalert 200mg online
    Buy Waklert 150mg online
    Buy Modvigil online

    ReplyDelete
  37. Are you suffering from a sleep disorder? Order Modafinil/Armodafinil to get relief from sleep apnea. Buy Generic Provigil online on Sale at cheap price.
    order Modafinil 200mg online
    order Modalert 200mg online
    Buy Waklert 150mg online
    Buy Modvigil online

    ReplyDelete
  38. Are you suffering from a sleep disorder? Order Modafinil/Armodafinil to get relief from sleep apnea. Buy Generic Provigil online on Sale at cheap price.
    order Modafinil 200mg online
    order Modalert 200mg online
    Buy Waklert 150mg online
    Buy Modvigil online

    ReplyDelete
  39. Are you suffering from a sleep disorder? Order Modafinil/Armodafinil to get relief from sleep apnea. Buy Generic Provigil online on Sale at cheap price.
    order Modafinil 200mg online
    order Modalert 200mg online
    Buy Waklert 150mg online
    Buy Modvigil online

    ReplyDelete
  40. You write an amazing article and it's really full of knowledge, i am very fond of writing but i need some tips to write on shopify development services in Pakistan please guide me.

    ReplyDelete
  41. I like your undertakings with respect to this article this blog is valuable. I get a lot of strong information from your article.
    For Best hr software in pakistan Visit Us.

    ReplyDelete

  42. Are you suffering from a sleep disorder? You can Buy Waklert tablets Online

    ReplyDelete
  43. Treatment for various sleep disorders, such as shift work disorder, OSA, and narcolepsy, frequently involves the use of Modalert 200 tablets. Included in the box is modafinil, a drug that encourages wakefulness and combats excessive daytime sleepiness. Modalert 200 increases alertness without causing the jitteriness associated with conventional stimulants by affecting brain neurotransmitters.

    ReplyDelete
  44. Thanks to GetHRPlus, our HR department is more productive and efficient than ever. A fantastic tool!

    ReplyDelete
  45. Thanks to GetHRPlus, our HR department is more productive and efficient than ever. A fantastic tool Visit Now https://gethrplus.com/

    ReplyDelete