Closed tumashu closed 8 years ago
Hmm, tricky. The problem is that "-" is not word syntax in org-mode, although the reverse transformation works because it is word syntax in emacs-lisp mode.
Of course, I can just add "-" to the match, but that will only work for "-". Do you have any other characters you want?
Or alternatively, I could try and change the regexp to match anything except for ";" , ":" or space.
Or, I could match spaces also. This would also allow me to match
* Multi Word Lines :with-tags:
Although, I can't think how I can identify the end of the last word here, at least not with a regexp.
Or alternatively, I could try and change the regexp to match anything except for ";" , ":" or space.
I think this is a good idea, but stable and consistent is more important.
Yes, I agree -- and it turns out that multi-word lines is a bit of a pain. I'm am more inclined to just support "-", although for my use of the org -> transformation I just use the "standard" headers "Commentary, Code" and so on.
Shall we leave things as they are for now, till there is a more compelling use case?
if head1 has tags, don't convert its * to ";;;", just add "#". can this approach solve the issue
another approach is: add a custom list, convert its element to head1, then we can add ";;;head;" ";;;commentary;" to this list, this may be a simper way
This would mean that you couldn't call but tags on Code::: headers.
The easiest way to achieve this is to just not use Head 2 which uses this transformation. Or just use the org->el transformation which does not special head 1 transform.
tumashu notifications@github.com writes:
if head1 has tags, don't convert its * to ";;;", just add "#". can this approach solve the issue
Reply to this email directly or view it on GitHub: https://github.com/phillord/lentic/issues/33#issuecomment-102197096
Phillip Lord, Phone: +44 (0) 191 208 7827 Lecturer in Bioinformatics, Email: phillip.lord@newcastle.ac.uk School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord Room 914 Claremont Tower, skype: russet_apples Newcastle University, twitter: phillord NE1 7RU
I'm wary of that one because its even more restrictive than the current "single word header 1" rule.
tumashu notifications@github.com writes:
another approach is: add a custom list, convert its element to head1, then we can add ";;;head;" ";;;commentary;" to this list, this may be a simper way
Reply to this email directly or view it on GitHub: https://github.com/phillord/lentic/issues/33#issuecomment-102198945
I'm wary of that one because its even more restrictive than the current "single word header 1" rule.
Yes, but i think it can be regard as "org->el" enhance, but more comfortable, the reason is that:
;;; Codes:
;;* This is codes head1 :export
;; xxxxxx
output:
* ;;;Code:
* This is codes head1 :export
xxxxxx
If i want to a clean org file, i just export to org file....
This would mean that you couldn't call but tags on Code::: headers.
I don't need to add tags to "Codes:", i just use follow tips and can use a beautiful head1.
;;; Codes:
;; * This is my Codes head :export:
Or just use the org->el transformation which does not special head 1 transform.
org->el has follow issue:
Maybe we can add another transformation method, for example: "org->el++"
Yes, I agree, that "Code:", "Commentary:" and my own "Header" and "Footer" are perhaps the only ones we need. And, as you say, we can add "normal" header one in other ways. I will think on this, but it does seem to be a reasonable solution to the problem. It would probably simplify the code also.
On the first line issue for org->el I am not hugely keen on fixing this. It adds complexity and sort of defeats the point of having the orgel transformation.
Is the status of this ?
Well, we have tags on H1, but only single word H1. You can't put dashes in words.
To be honest, at the moment, I think that this is the best compromise, and I am not planning to restrict H1 to specified words. I'd be willing to take a patch which supports "-".
i want to code and maintain my own version:
but have failed, could you help me?
I am happy to help with any problems that you have, within reason.
Phil
tumashu notifications@github.com writes:
i want to code and maintain my own version:
- base on org-el
- deal with header, Codes, Commentary, and Footer
but have failed, could you help me?
Reply to this email directly or view it on GitHub: https://github.com/phillord/lentic/issues/33#issuecomment-147082298
Phillip Lord, Phone: +44 (0) 191 208 7827 Lecturer in Bioinformatics, Email: phillip.lord@newcastle.ac.uk School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord Room 914 Claremont Tower, skype: russet_apples Newcastle University, twitter: phillord NE1 7RU
Finally, I realized that "el-org" is more convenient than ‘’orgel-org“ with the help of tip,
;;; Codes:
;; * This is my code :code:
I will use "el-org" and hack org-exporter, this seem more easy and stable
;;; chinese-pyim-core.el --- The core of Chinese pinyin input method
As for the above problem, may be i can use "before-save-hook"..
tumashu notifications@github.com writes:
;;; chinese-pyim-core.el --- The core of Chinese pinyin input method
As for the above problem, may be i can use "before-save-hook"..
I've rather lost context here. Is this a question?
now i think el-org is more stable than orgel-org, one problem is that ";;;" will be translate to ";; ;;;", i want to deal with it by before-save-hook ,but fail
i just want "el-org" + ";;, ;;; fix",
tumashu notifications@github.com writes:
now i think el-org is more stable than orgel-org,
Yes, that's undoubtedly true. It's simpler, which makes stability more straight-forward.
one problem is that ";;;" will be translate to ";; ;;;", i want to deal with it by before-save-hook ,but fail
Well, the code to detal with that is in orgel-org. Not sure using before-save-hook will help -- any changes you make there will be percolated by lentic.
Phil
The below is the code current used, any suggestion? thanks!
https://github.com/tumashu/emacs-helper/blob/master/eh-lentic.el
If you are after general suggestions, then I wouldn't nest all of this in a use-package macro. I am not sure what the eh-lentic function is doing -- if there is something about the UI that you don't like, then let me know and I will incorporate. The rest seems okay.
Or is it broken?
tumashu notifications@github.com writes:
The below is the code current used, any suggestion? thanks!
https://github.com/tumashu/emacs-helper/blob/master/eh-lentic.el
Reply to this email directly or view it on GitHub: https://github.com/phillord/lentic/issues/33#issuecomment-149147063
"eh-lentic" is my own quick lentic command, which just "split-below" and "active the below window" maybe "eh-lentic-switch-window" is a good name.
At the moment, my project "Chinese-pyim" is using "lentic-el2org-init", and works well: https://github.com/tumashu/chinese-pyim
This is my custom lentic-doc :-) https://github.com/tumashu/chinese-pyim/blob/master/chinese-pyim-devtools.el
This is the website generated from elisp with the help of lentic and org-webpage http://tumashu.github.io/chinese-pyim/
Thanks for uploading the gif, it's really nice to see lentic in action for someone else. If you have the time, you couldn't do a brief gif using chinese-pyim? I'd love to see lentic working with a non-latin character set.
OK!
gif is too big, suggest download and view.
I have changed my lentic config a little, now i only use a command eh-lenitc-switch-window' to do all my lentic switch work, very easy use, this command is bound to 'C-c j', This behavier is more like
org-edit-special'
I switch views on F1 - although I normally look at one view at a time.
These gifs are really, really nice. Do you mind if I use them from my lentic front page?
Feel free to use these gifs
by the way, my own lentic-el2org-init
is very similar lentic-el-org-init
, is it possible to merge it to
lentic-el-org-init
? if not, I will build a new melpa package to hold `lentic-el2org-init', this package's feature will be like el2markdown.
Not sure how I could merge these to be honest. I could do this...
(defun lentic-org-oset (conf)
(lentic-m-oset
conf
:this-buffer (current-buffer)
:comment ";; "
:comment-stop "#\\\+BEGIN_SRC emacs-lisp.*"
:comment-start "#\\\+END_SRC"
:lentic-file (concat
(file-name-sans-extension
(buffer-file-name))
".el")))
Which would make org-el-init this.
(defun lentic-org-el-init ()
(lentic-org-oset
(lentic-unmatched-uncommented-chunk-configuration
"lb-org-to-el")))
and likewise for el-org-init. This would reduce your own lentic-el2org-init as well.
Phil
tumashu notifications@github.com writes:
by the way, my own
lentic-el2org-init‘ is very similar
lentic-el-org-init’, is it possible to merge it to ·lentic-el-org-init‘? if not, I will build a new melpa package to hold `lentic-el2org-init', this package's feature will be like el2markdown.
Reply to this email directly or view it on GitHub: https://github.com/phillord/lentic/issues/33#issuecomment-150728002
now, i refactor my lentic config, as a module of org-webpage, which only focus write org format comment , simple and useful...
It's nice to see that it is working well for you!
i have refacted my owp-lentic.el file to a new package: easy-lentic. may be you are interesting it too... https://github.com/tumashu/easy-lentic
It's good that this is all working for you. I've been debating adding tools for adding markers, but haven't as I just use yasnippet, or org-mode tools but see you have done this already.
Will close this now, as I don't think it's outstanding, but feel free to re-open.
Ok, thanks for your help!
This get the unexpected results: