* outline-minor-mode and org-mode capabilities for programming languages @ 2021-05-09 8:53 Christopher Dimech 2021-05-09 9:11 ` Jean Louis 2021-05-09 14:02 ` Stefan Monnier via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 35+ messages in thread From: Christopher Dimech @ 2021-05-09 8:53 UTC (permalink / raw) To: Help Gnu Emacs, Help Emacs Orgmode Dear Compeers, I have same elisp code and using outline-minor-mode. The good thing about it is that the language highlighting is preserved. But navigating and moving the code around is much more difficult than actually being in org-mode (I can use tab ate move code with "M-<up>", M-<down>). The downside is that org-mode removes the highlighting for the language. Is there any way out of this. Having flexibility of org-mode with language highlighting preserved? Regards Christopher ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 8:53 outline-minor-mode and org-mode capabilities for programming languages Christopher Dimech @ 2021-05-09 9:11 ` Jean Louis 2021-05-09 12:35 ` Christopher Dimech 2021-05-09 14:02 ` Stefan Monnier via Users list for the GNU Emacs text editor 1 sibling, 1 reply; 35+ messages in thread From: Jean Louis @ 2021-05-09 9:11 UTC (permalink / raw) To: Christopher Dimech; +Cc: Help Gnu Emacs * Christopher Dimech <dimech@gmx.com> [2021-05-09 11:54]: > Dear Compeers, > > I have same elisp code and using outline-minor-mode. The good thing about it is that > the language highlighting is preserved. But navigating and moving the code around is > much more difficult than actually being in org-mode (I can use tab ate move code with > "M-<up>", M-<down>). The downside is that org-mode removes the highlighting for the > language. Is there any way out of this. Having flexibility of org-mode with language > highlighting preserved? That is great for programming. I had difficulties with the key binding like @ if I remember well, so I have changed the prefix to what is closer to C-c, so I have changed it to C-c C-d outline-minor-mode-prefix is a variable defined in ‘outline.el’. Its value is "\x03\x04" Original value was "\x03@" You can customize this variable. Probably introduced at or before Emacs version 19.20. Then instead of C-c Shift-@ C-n I Just do C-c C-d C-n Outline-minor-mode is not related to Org mode -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 9:11 ` Jean Louis @ 2021-05-09 12:35 ` Christopher Dimech 2021-05-09 12:45 ` Jean Louis 0 siblings, 1 reply; 35+ messages in thread From: Christopher Dimech @ 2021-05-09 12:35 UTC (permalink / raw) To: Jean Louis; +Cc: Help Gnu Emacs There are some difficulties using outline-minor-mode and can do with some improvements. As you declared, the key bindings are problematic. Going through "https://www.emacswiki.org/emacs/OutlineMode", the advantages of cycling is discussed, referring to OrgMode and its many features. The text also refers to outline-magic by Carsten Dominik that provides the command "outline-cycle". Would there be any interest in outline-minor-mode in remodeling for cycling using <tab> and moving around with M-up, M-<down>, M-right, M-left, with same effect as OrgMode. These types of functionalities (org mode for programming languages) will make it much easier to navigate and modify the code quite rapidly. > Sent: Sunday, May 09, 2021 at 9:11 PM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org> > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-09 11:54]: > > Dear Compeers, > > > > I have same elisp code and using outline-minor-mode. The good thing about it is that > > the language highlighting is preserved. But navigating and moving the code around is > > much more difficult than actually being in org-mode (I can use tab ate move code with > > "M-<up>", M-<down>). The downside is that org-mode removes the highlighting for the > > language. Is there any way out of this. Having flexibility of org-mode with language > > highlighting preserved? > > That is great for programming. I had difficulties with the key binding > like @ if I remember well, so I have changed the prefix to what is > closer to C-c, so I have changed it to C-c C-d > > outline-minor-mode-prefix is a variable defined in ‘outline.el’. > > Its value is "\x03\x04" > Original value was "\x03@" > > You can customize this variable. > Probably introduced at or before Emacs version 19.20. > > Then instead of C-c Shift-@ C-n I Just do C-c C-d C-n > > Outline-minor-mode is not related to Org mode > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 12:35 ` Christopher Dimech @ 2021-05-09 12:45 ` Jean Louis 2021-05-09 13:00 ` Christopher Dimech 2021-05-09 13:02 ` Christopher Dimech 0 siblings, 2 replies; 35+ messages in thread From: Jean Louis @ 2021-05-09 12:45 UTC (permalink / raw) To: Christopher Dimech; +Cc: Help Gnu Emacs * Christopher Dimech <dimech@gmx.com> [2021-05-09 15:36]: > Would there be any interest in outline-minor-mode in remodeling for cycling using > <tab> and moving around with M-up, M-<down>, M-right, M-left, with same effect as > OrgMode. Just make key bindings to outline-cycle or outline-cycle-buffer functions. > These types of functionalities (org mode for programming languages) will make it much > easier to navigate and modify the code quite rapidly. That is why you can make your own key bindings for that. I would not like for example, when I invoke outline-minor-mode in Emacs Lisp mode to have TAB changed to anything else but what it is now (indent-for-tab-command &optional ARG). For example: C-c TAB can be set for outline-cycle-buffer and there you go. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 12:45 ` Jean Louis @ 2021-05-09 13:00 ` Christopher Dimech 2021-05-09 16:27 ` Jean Louis 2021-05-10 1:25 ` Christopher Dimech 2021-05-09 13:02 ` Christopher Dimech 1 sibling, 2 replies; 35+ messages in thread From: Christopher Dimech @ 2021-05-09 13:00 UTC (permalink / raw) To: Jean Louis; +Cc: Help Gnu Emacs Do you have a list to what commands you find useful for outline-minor-mode? Perhaps me can formalise them and update outline-minor-mode with new keys. Do not like the idea of an additional minor mode of a current minor mode. I would think that many struggle with the long and awkward keybindings provided as default. --------------------- Christopher Dimech General Administrator - Naiad Informatics - GNU Project (Geocomputation) - Geophysical Simulation - Geological Subsurface Mapping - Disaster Preparedness and Mitigation - Natural Resource Exploration and Production - Free Software Advocacy > Sent: Monday, May 10, 2021 at 12:45 AM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org> > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-09 15:36]: > > Would there be any interest in outline-minor-mode in remodeling for cycling using > > <tab> and moving around with M-up, M-<down>, M-right, M-left, with same effect as > > OrgMode. > > Just make key bindings to outline-cycle or outline-cycle-buffer functions. > > > These types of functionalities (org mode for programming languages) will make it much > > easier to navigate and modify the code quite rapidly. > > That is why you can make your own key bindings for that. > > I would not like for example, when I invoke outline-minor-mode in > Emacs Lisp mode to have TAB changed to anything else but what it is > now (indent-for-tab-command &optional ARG). > > For example: C-c TAB can be set for outline-cycle-buffer and there you go. > > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 13:00 ` Christopher Dimech @ 2021-05-09 16:27 ` Jean Louis 2021-05-09 17:35 ` Emanuel Berg via Users list for the GNU Emacs text editor 2021-05-10 1:25 ` Christopher Dimech 1 sibling, 1 reply; 35+ messages in thread From: Jean Louis @ 2021-05-09 16:27 UTC (permalink / raw) To: Christopher Dimech; +Cc: Help Gnu Emacs * Christopher Dimech <dimech@gmx.com> [2021-05-09 16:00]: > Do you have a list to what commands you find useful for > outline-minor-mode? Luckily one can use outline-minor-mode on outline.el to find easier those functions. > Perhaps me can formalise them and update outline-minor-mode with new > keys. I don't think it should be updated, it is enough for users to customize their key bindings. The TAB that you are very much used to has its quite different meaning in different mode like emacs-lisp-mode and it would really disturt to change key bindings all the time when I switch to outline-minor-mode and back. > Do not like the idea of an additional minor mode of a current minor > mode. But you like the outline-minor-mode > I would think that many struggle with the long and awkward > keybindings provided as default. I can think that you barely use TAB in Emacs Lisp, but I use it very frequently to indent the lines, including to indent lines when region is active, and often I may use it on the whole marked buffer. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 16:27 ` Jean Louis @ 2021-05-09 17:35 ` Emanuel Berg via Users list for the GNU Emacs text editor 2021-05-09 17:50 ` Jean Louis 2021-05-10 6:08 ` Christopher Dimech 0 siblings, 2 replies; 35+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-09 17:35 UTC (permalink / raw) To: help-gnu-emacs Jean Louis wrote: > I don't think it should be updated, it is enough for users > to customize their key bindings. The TAB that you are very > much used to has its quite different meaning in different > mode like emacs-lisp-mode and it would really disturt to > change key bindings all the time when I switch to > outline-minor-mode and back. Maybe so (I don't know the modes you refer to) but in general is it very common to switch keys based on mode, most often the modes are major modes but it can and is done for minor modes as well, here is one example https://dataswamp.org/~incal/emacs-init/caps-back.el > I can think that you barely use TAB in Emacs Lisp, but I use > it very frequently to indent the lines, including to indent > lines when region is active, and often I may use it on the > whole marked buffer. You barely use it, but you use it all the time ... and so do I :) -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 17:35 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-09 17:50 ` Jean Louis 2021-05-09 18:02 ` Emanuel Berg via Users list for the GNU Emacs text editor 2021-05-10 1:49 ` Christopher Dimech 2021-05-10 6:08 ` Christopher Dimech 1 sibling, 2 replies; 35+ messages in thread From: Jean Louis @ 2021-05-09 17:50 UTC (permalink / raw) To: help-gnu-emacs * Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-05-09 20:36]> > I can think that you barely use TAB in Emacs Lisp, but I use > > it very frequently to indent the lines, including to indent > > lines when region is active, and often I may use it on the > > whole marked buffer. > > You barely use it, but you use it all the time ... and so do > I :) Correction tip: when outline-minor-mode-cycle is TRUE, as functions are usually anyway on the beginning of the line, the TAB works just well to open and close the function. Try it. It is addictive. It gives clarity when working. Interesting is "Hide others" it hides everything else but the function you are editing, not bad and similar to narrowing. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 17:50 ` Jean Louis @ 2021-05-09 18:02 ` Emanuel Berg via Users list for the GNU Emacs text editor 2021-05-09 19:09 ` Jean Louis 2021-05-10 1:49 ` Christopher Dimech 1 sibling, 1 reply; 35+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-09 18:02 UTC (permalink / raw) To: help-gnu-emacs Jean Louis wrote: >>> it very frequently to indent the lines, including to >>> indent lines when region is active, and often I may use >>> it on the whole marked buffer. >> >> You barely use it, but you use it all the time ... and so do >> I :) > > Correction tip: when outline-minor-mode-cycle is TRUE, as > functions are usually anyway on the beginning of the line, > the TAB works just well to open and close the function. Oh, no! I want everything OPEN and visible just the way it is in the file. So no where to hide 2*A4 functions or ugly code... -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 18:02 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-09 19:09 ` Jean Louis 0 siblings, 0 replies; 35+ messages in thread From: Jean Louis @ 2021-05-09 19:09 UTC (permalink / raw) To: help-gnu-emacs * Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-05-09 21:05]: > Jean Louis wrote: > > Correction tip: when outline-minor-mode-cycle is TRUE, as > > functions are usually anyway on the beginning of the line, > > the TAB works just well to open and close the function. > > Oh, no! I want everything OPEN and visible just the way it is > in the file. > > So no where to hide 2*A4 functions or ugly code... If you don't try it, you will never know it. See here the sample of outline-minor-mode: https://hyperscope.link/3/7/2/5/5/Sample-outline-minor-mode-37255.html -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 17:50 ` Jean Louis 2021-05-09 18:02 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-05-10 1:49 ` Christopher Dimech 2021-05-10 6:22 ` Jean Louis 1 sibling, 1 reply; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 1:49 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs > Sent: Monday, May 10, 2021 at 5:50 AM > From: "Jean Louis" <bugs@gnu.support> > To: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-05-09 20:36]> > I can think that you barely use TAB in Emacs Lisp, but I use > > > it very frequently to indent the lines, including to indent > > > lines when region is active, and often I may use it on the > > > whole marked buffer. > > > > You barely use it, but you use it all the time ... and so do > > I :) > > Correction tip: when outline-minor-mode-cycle is TRUE, as functions > are usually anyway on the beginning of the line, the TAB works just > well to open and close the function. Here you mention a different capability, that of function hide/show. But then there is a different capability most prominent in org-mode, where you hide/show by heading. In programming languages which do not allow multi-line comments, one can use a function so that when you call it you put the asterisk on the first column of the next line, so it can be treated as a heading. Referring back to <tab>, I come from fortran where we used to hit <tab> just as we do with elisp. Fortran managed te get out of using the tab during its development of free-format. Indentation is handled by using the <return> key, it gets you to the correct indent column. you can also use enter at the beginning of the line. fortran-mode also allows you to set different indentations according to any fortran structure you use. For instance: (defcustom f90-do-indent 2 "Extra indentation applied to `do' region." :type 'integer :group 'f90-indent) (defcustom f90-if-indent 2 "Indentation for `if', `select', `where' and `forall' region." :type 'integer :group 'f90-indent) (defcustom f90-type-indent 2 "Indentation for `type', `interface' and `block' region." :type 'integer :group 'f90-indent) I will tell you what I have been doing regarding <tab>. As yourself, I would use <tab> when in emacs-lisp-mode, where I also introduce org type headings. I would then switch to org-mode when I need to. And use <tab> in the context of org-mode, not emacs-lisp-mode. But this switching over has downsides because 1) there is no code highlighting; and 2) there is no function folding. Whilst I agree that programming language modes do their thing well, and org-mode does its things well, the idea of headings and folding could be made to work much better for programming languages. Additionally, there could be org-minor-mode that is specific for programming languages. The people at org-mode would know best about the capabilities and functionalities that would entail. We could also take some information out on their implementation. We can ask what capabilities would be valuable to add, and do some more word on outline-minor-mode and possibly emacs-lisp mode. outline-minor-mode can be made much much better. And we can learn from other languages such as fortran for things like indentation. Regards Christopher > Try it. > > It is addictive. It gives clarity when working. > > Interesting is "Hide others" it hides everything else but the function > you are editing, not bad and similar to narrowing. > > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 1:49 ` Christopher Dimech @ 2021-05-10 6:22 ` Jean Louis 2021-05-10 6:53 ` Christopher Dimech 0 siblings, 1 reply; 35+ messages in thread From: Jean Louis @ 2021-05-10 6:22 UTC (permalink / raw) To: Christopher Dimech; +Cc: help-gnu-emacs * Christopher Dimech <dimech@gmx.com> [2021-05-10 04:49]: > Whilst I agree that programming language modes do their thing well, and org-mode > does its things well, the idea of headings and folding could be made to work much > better for programming languages. Additionally, there could be org-minor-mode > that is specific for programming languages. The people at org-mode would know > best about the capabilities and functionalities that would entail. We could also > take some information out on their implementation. You said org-minor-mode yet you maybe wish to say what features you think could Org mode provide to Emacs Lisp mode? It is unclear. Like should I mark functions with TODO/DONE? Should I be able to open up agenda to know which function is to be executed at which time? Should there be properties? Should I tag functions? Am I able to hyperlink one function to other? While this may sound apparently funny, I do think that type of editing would be useful. One way to implement it could be to use the database backed chunked editing where every function receives its database node and has its attributes which are quickly cycled with TAB. It could show the same what is shown in outline mode. As I am developing system that augments thought processing I could simply define an Emacs Lisp programming node, and enter in such node any chunks I wish. Then each specific function, thus database node, could be verified on the fly if it is correct. A huge program could be written that way and one could see which function is node is written correctly which one not. It could create a file on the fly for final distribution. One could reach any functions by its semantics, tags, properties, describe them fully and thus augment human perception. All the thousands of Emacs packages could be imported in that way which would allow re-using of the code in a new fantastic manner, searchable by semantics and indexes. No more worries on which function was taken from which package, program could tell how it was modified and would create the Commentar or log, and thus solve licensing issues automatically. Creating new specialized packages would be a breeze, just choose those functions needed by its semantics and new narrowed package could be created with its headers, licensing issues, modifications, as nothing of that human need to think of. User is creating function for what? List related stuff? Just choose the function by its semantic, completion or other menu system, even review it, and it is inserted into buffer to create a new function. When attributes and description of the code is well done, and it can be done fast, programmers would be able to tell in human language what they need to do, and algorithm could tell how to do it, and which available parts already exist. As we do not re-use enough. There are thousands of packages and we don't have quite a good database to find what we need. Example of lack of code re-use are various markup modes that in the essence all do the same, like HTML has <strong></strong>, Markdown has its **bold** and Org has *bold*, then there is list of other similar markup that does essentially the same, code is re-written all over again instead of defining the tags or markup as some kind of data, and having it ready for user by some kind of universal mode that would find major mode and type of text and automatically assign the markup. And for each mode I have to use different key bindings, terrible. If I wish to markup something as "strong" or "bold" face, I want to use in every mode same key binding, not different. Importing functions into a database would not impair running program as a file or a distributing it, it could just help its structure better. It would allow the true collaboration: on the multiple functions on the same file several multiple users could work in parallel. On the same function people could work by using crdt.el package, each function and thus the node would have its automatic revision system, not file based revision, rather function or node based revision. It would be the Outline system, but Outline on a meta level. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 6:22 ` Jean Louis @ 2021-05-10 6:53 ` Christopher Dimech 2021-05-10 7:32 ` Jean Louis 0 siblings, 1 reply; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 6:53 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs > Sent: Monday, May 10, 2021 at 6:22 PM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 04:49]: > > Whilst I agree that programming language modes do their thing well, and org-mode > > does its things well, the idea of headings and folding could be made to work much > > better for programming languages. Additionally, there could be org-minor-mode > > that is specific for programming languages. The people at org-mode would know > > best about the capabilities and functionalities that would entail. We could also > > take some information out on their implementation. > > You said org-minor-mode yet you maybe wish to say what features you > think could Org mode provide to Emacs Lisp mode? It is unclear. It could be called orgprog-minor-mode, org capability for programming languages. Mainly catering for highligting, headlines and folding to start with. > Like should I mark functions with TODO/DONE? No > Should I be able to open up agenda to know which function is to be > executed at which time? No > Should there be properties? No > Should I tag functions? No > Am I able to hyperlink one function to other? No > While this may sound apparently funny, I do think that type of editing > would be useful. Could be useful, I cannot deny it. But let,s constrain things for now. > One way to implement it could be to use the database backed chunked > editing where every function receives its database node and has its > attributes which are quickly cycled with TAB. It could show the same > what is shown in outline mode. As I am developing system that augments > thought processing I could simply define an Emacs Lisp programming > node, and enter in such node any chunks I wish. > Then each specific function, thus database node, could be verified on > the fly if it is correct. A huge program could be written that way and > one could see which function is node is written correctly which one > not. It could create a file on the fly for final distribution. One > could reach any functions by its semantics, tags, properties, describe > them fully and thus augment human perception. > All the thousands of Emacs packages could be imported in that way > which would allow re-using of the code in a new fantastic manner, > searchable by semantics and indexes. No more worries on which function > was taken from which package, program could tell how it was modified > and would create the Commentar or log, and thus solve licensing issues > automatically. Reuse of code is currently difficult. > Creating new specialized packages would be a breeze, just choose those > functions needed by its semantics and new narrowed package could be > created with its headers, licensing issues, modifications, as nothing > of that human need to think of. > User is creating function for what? List related stuff? Just choose > the function by its semantic, completion or other menu system, even > review it, and it is inserted into buffer to create a new function. The areas of action I outlined for programming languages would be valuable during code review. > When attributes and description of the code is well done, and it can > be done fast, programmers would be able to tell in human language what > they need to do, and algorithm could tell how to do it, and which > available parts already exist. That could help developers navigate the code without needing too much input from the original author or maintainer. > As we do not re-use enough. There are thousands of packages and we > don't have quite a good database to find what we need. Quite right. Quite right > Example of lack of code re-use are various markup modes that in the > essence all do the same, like HTML has <strong></strong>, Markdown has > its **bold** and Org has *bold*, then there is list of other similar > markup that does essentially the same, code is re-written all over > again instead of defining the tags or markup as some kind of data, and > having it ready for user by some kind of universal mode that would > find major mode and type of text and automatically assign the > markup. > > And for each mode I have to use different key bindings, terrible. If I > wish to markup something as "strong" or "bold" face, I want to use in > every mode same key binding, not different. > > Importing functions into a database would not impair running program > as a file or a distributing it, it could just help its structure > better. > > It would allow the true collaboration: on the multiple functions on > the same file several multiple users could work in parallel. On the > same function people could work by using crdt.el package, each > function and thus the node would have its automatic revision system, > not file based revision, rather function or node based revision. > > It would be the Outline system, but Outline on a meta level. I suggest that outline-minor-mode be also refactored and revamped, as I have seen much additional code on top of it (outline-magic, orgstruct, outshine). > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 6:53 ` Christopher Dimech @ 2021-05-10 7:32 ` Jean Louis 2021-05-10 8:32 ` Christopher Dimech ` (2 more replies) 0 siblings, 3 replies; 35+ messages in thread From: Jean Louis @ 2021-05-10 7:32 UTC (permalink / raw) To: Christopher Dimech; +Cc: help-gnu-emacs * Christopher Dimech <dimech@gmx.com> [2021-05-10 09:53]: > Mainly catering for highligting, headlines and folding to start > with. Isn't that what outline-minor-mode is for? There are already other packages, I have been testing it, and they worked similar to outline-minor-mode and could fold things. How you want to designate headlines? It has to have some key string. Maybe with 5 ;;;;; on beginning? ;;;;; Headline Evaluate this, and you get highlighting of headlines: (highlight-regexp "^;;;;;.*$" 'hi-yellow) But I think you have to first play with: {M-x customize-group RET outline RET} as there is highlighting already included. For headings, I think each mode need different definition on what is heading. So you can define heading with `outline-heading-alist' outline-heading-alist is a variable defined in ‘outline.el’. Its value is nil Automatically becomes buffer-local when set. Alist associating a heading for every possible level. Each entry is of the form (HEADING . LEVEL). This alist is used two ways: to find the heading corresponding to a given level and to find the level of a given heading. If a mode or document needs several sets of outline headings (for example numbered and unnumbered sections), list them set by set and sorted by level within each set. For example in texinfo mode: (setq outline-heading-alist '(("@chapter" . 2) ("@section" . 3) ("@subsection" . 4) ("@subsubsection" . 5) ("@unnumbered" . 2) ("@unnumberedsec" . 3) ("@unnumberedsubsec" . 4) ("@unnumberedsubsubsec" . 5) ("@appendix" . 2) ("@appendixsec" . 3)... ("@appendixsubsec" . 4) ("@appendixsubsubsec" . 5) ..)) Instead of sorting the entries in each set, you can also separate the sets with nil. You asked for: - highligting, - headlines; and - folding And I have demonstrated that more or less, that already exists in outline-minor-mode, play with highlighting options, folding already exists, and headings you may define yourself. Let us say I have this comment and I keep just one space after ;;;; ;;;; ⟦⟦ LIST FUNCTIONS ⟧⟧ Folded text ;;;; ⟦⟦⟦ MORE LIST FUNCTIONS ⟧⟧⟧ (setq outline-heading-alist '((";;;; ⟦" . 1) (";;;; ⟦⟦" . 2) (";;;; ⟦⟦⟦" . 3))) this appears to work on my side in Emacs Lisp mode, but not in fundamental. I can fold those headings and they remain visible. > > Like should I mark functions with TODO/DONE? > > No Those mentioned meta level features can look abstract to you, but they are very real to me so far. It leans to subject of literate programming, similar to programming by using Org Babel and embedded functions that are described and later interpolated into the script. Just that I can do that on the higher level rich attributes and references and relations to other functions. As humans we are so late with literate programming. That would help so many other people. > I suggest that outline-minor-mode be also refactored and revamped, as I have > seen much additional code on top of it (outline-magic, orgstruct, > outshine). For now, those features which you asked for, already exist, you may try customizations, you are just few minutes away from having highlighting, folding is already there, and defining headlines. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 7:32 ` Jean Louis @ 2021-05-10 8:32 ` Christopher Dimech 2021-05-10 9:29 ` Christopher Dimech 2021-05-10 9:31 ` Jean Louis 2021-05-10 8:46 ` Christopher Dimech 2021-05-10 9:15 ` Christopher Dimech 2 siblings, 2 replies; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 8:32 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs > Sent: Monday, May 10, 2021 at 7:32 PM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 09:53]: > > Mainly catering for highligting, headlines and folding to start > > with. > > Isn't that what outline-minor-mode is for? > > There are already other packages, I have been testing it, and they > worked similar to outline-minor-mode and could fold things. Folding of functions is good, folding by headings not so good. > How you want to designate headlines? It has to have some key > string. Maybe with 5 ;;;;; on beginning? > > ;;;;; Headline How about extending it to subheadings like org-mode. It is a good idea to use the comment declaration for defining headings, and also use * for heading levels as in org-mode. For languages with multiline comments I simply used *, then changed to org-mode. In elisp I made a multiline comment function. For texinfo, which has multi-line comment capability I have been doing @ignore * Heading @end ignore @ignore ** Subheading @end ignore > Evaluate this, and you get highlighting of headlines: > (highlight-regexp "^;;;;;.*$" 'hi-yellow) > > But I think you have to first play with: > {M-x customize-group RET outline RET} > > as there is highlighting already included. > > For headings, I think each mode need different definition on what is > heading. They should always go with the comment declaration for the language. Most likely good, but then one cannot easily switch to org-mode. Then again, if the topics of discussion are resolved, there wauld not me much need to change to org-mode for certain org-mode operations. > So you can define heading with `outline-heading-alist' > > outline-heading-alist is a variable defined in ‘outline.el’. > > Its value is nil > > Automatically becomes buffer-local when set. > > Alist associating a heading for every possible level. > Each entry is of the form (HEADING . LEVEL). > This alist is used two ways: to find the heading corresponding to > a given level and to find the level of a given heading. > If a mode or document needs several sets of outline headings (for example > numbered and unnumbered sections), list them set by set and sorted by level > within each set. For example in texinfo mode: > > (setq outline-heading-alist > '(("@chapter" . 2) ("@section" . 3) ("@subsection" . 4) > ("@subsubsection" . 5) > ("@unnumbered" . 2) ("@unnumberedsec" . 3) > ("@unnumberedsubsec" . 4) ("@unnumberedsubsubsec" . 5) > ("@appendix" . 2) ("@appendixsec" . 3)... > ("@appendixsubsec" . 4) ("@appendixsubsubsec" . 5) ..)) > > Instead of sorting the entries in each set, you can also separate the > sets with nil. > > You asked for: > > - highligting, > - headlines; and > - folding > > And I have demonstrated that more or less, that already exists in > outline-minor-mode, play with highlighting options, folding already > exists, and headings you may define yourself. I am suggesting to clean things up and put all the capabilities into a single minor mode. We can keep it to outline-minor-mode. > Let us say I have this comment and I keep just one space after ;;;; > > ;;;; ⟦⟦ LIST FUNCTIONS ⟧⟧ > > Folded text > > ;;;; ⟦⟦⟦ MORE LIST FUNCTIONS ⟧⟧⟧ > > (setq outline-heading-alist > '((";;;; ⟦" . 1) (";;;; ⟦⟦" . 2) (";;;; ⟦⟦⟦" . 3))) > > this appears to work on my side in Emacs Lisp mode, but not in > fundamental. I can fold those headings and they remain visible. > > > > Like should I mark functions with TODO/DONE? > > > > No > > Those mentioned meta level features can look abstract to you, but they > are very real to me so far. It leans to subject of literate > programming, similar to programming by using Org Babel and embedded > functions that are described and later interpolated into the > script. Just that I can do that on the higher level rich attributes > and references and relations to other functions. As humans we are so > late with literate programming. That would help so many other people. I agree with you up to a point. For starters let's just clean things up with the capabilities that are already implemented. Literate schemes are good for organisational purposes, but for programming, literate schemes make everything much more cumbersome, and ultimately yield to total disaster in terms of efficiency in going through the code base. One thing that does help is self documuntation if kept brief within the code file. > > I suggest that outline-minor-mode be also refactored and revamped, as I have > > seen much additional code on top of it (outline-magic, orgstruct, > > outshine). > > For now, those features which you asked for, already exist, you may > try customizations, you are just few minutes away from having > highlighting, folding is already there, and defining headlines. Opening-closing headings with the mouse would be good. Will spend the few minutes and get back to you, as per your advice. Then see what capabilities from the other add-ons are redundant. > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 8:32 ` Christopher Dimech @ 2021-05-10 9:29 ` Christopher Dimech 2021-05-10 9:31 ` Jean Louis 1 sibling, 0 replies; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 9:29 UTC (permalink / raw) To: Christopher Dimech; +Cc: help-gnu-emacs, Jean Louis Ok, I have done (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode) (add-hook 'emacs-lisp-mode-hook (lambda () (outline-minor-mode 1))) > Sent: Monday, May 10, 2021 at 8:32 PM > From: "Christopher Dimech" <dimech@gmx.com> > To: "Jean Louis" <bugs@gnu.support> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > > > Sent: Monday, May 10, 2021 at 7:32 PM > > From: "Jean Louis" <bugs@gnu.support> > > To: "Christopher Dimech" <dimech@gmx.com> > > Cc: help-gnu-emacs@gnu.org > > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 09:53]: > > > Mainly catering for highligting, headlines and folding to start > > > with. > > > > Isn't that what outline-minor-mode is for? > > > > There are already other packages, I have been testing it, and they > > worked similar to outline-minor-mode and could fold things. > > Folding of functions is good, folding by headings not so good. > > > How you want to designate headlines? It has to have some key > > string. Maybe with 5 ;;;;; on beginning? > > > > ;;;;; Headline > > How about extending it to subheadings like org-mode. It is a good idea > to use the comment declaration for defining headings, and also use * for > heading levels as in org-mode. For languages with multiline comments > I simply used *, then changed to org-mode. In elisp I made a multiline > comment function. > > For texinfo, which has multi-line comment capability I have been doing > > @ignore > * Heading > @end ignore > > @ignore > ** Subheading > @end ignore > > > Evaluate this, and you get highlighting of headlines: > > (highlight-regexp "^;;;;;.*$" 'hi-yellow) > > > > But I think you have to first play with: > > {M-x customize-group RET outline RET} > > > > as there is highlighting already included. > > > > For headings, I think each mode need different definition on what is > > heading. > > They should always go with the comment declaration for the language. Most likely > good, but then one cannot easily switch to org-mode. Then again, if the topics > of discussion are resolved, there wauld not me much need to change to org-mode for > certain org-mode operations. > > > So you can define heading with `outline-heading-alist' > > > > outline-heading-alist is a variable defined in ‘outline.el’. > > > > Its value is nil > > > > Automatically becomes buffer-local when set. > > > > Alist associating a heading for every possible level. > > Each entry is of the form (HEADING . LEVEL). > > This alist is used two ways: to find the heading corresponding to > > a given level and to find the level of a given heading. > > If a mode or document needs several sets of outline headings (for example > > numbered and unnumbered sections), list them set by set and sorted by level > > within each set. For example in texinfo mode: > > > > (setq outline-heading-alist > > '(("@chapter" . 2) ("@section" . 3) ("@subsection" . 4) > > ("@subsubsection" . 5) > > ("@unnumbered" . 2) ("@unnumberedsec" . 3) > > ("@unnumberedsubsec" . 4) ("@unnumberedsubsubsec" . 5) > > ("@appendix" . 2) ("@appendixsec" . 3)... > > ("@appendixsubsec" . 4) ("@appendixsubsubsec" . 5) ..)) > > > > Instead of sorting the entries in each set, you can also separate the > > sets with nil. > > > > You asked for: > > > > - highligting, > > - headlines; and > > - folding > > > > And I have demonstrated that more or less, that already exists in > > outline-minor-mode, play with highlighting options, folding already > > exists, and headings you may define yourself. > > I am suggesting to clean things up and put all the capabilities into a single > minor mode. We can keep it to outline-minor-mode. > > > Let us say I have this comment and I keep just one space after ;;;; > > > > ;;;; ⟦⟦ LIST FUNCTIONS ⟧⟧ > > > > Folded text > > > > ;;;; ⟦⟦⟦ MORE LIST FUNCTIONS ⟧⟧⟧ > > > > (setq outline-heading-alist > > '((";;;; ⟦" . 1) (";;;; ⟦⟦" . 2) (";;;; ⟦⟦⟦" . 3))) > > > > this appears to work on my side in Emacs Lisp mode, but not in > > fundamental. I can fold those headings and they remain visible. > > > > > > Like should I mark functions with TODO/DONE? > > > > > > No > > > > Those mentioned meta level features can look abstract to you, but they > > are very real to me so far. It leans to subject of literate > > programming, similar to programming by using Org Babel and embedded > > functions that are described and later interpolated into the > > script. Just that I can do that on the higher level rich attributes > > and references and relations to other functions. As humans we are so > > late with literate programming. That would help so many other people. > > I agree with you up to a point. For starters let's just clean things up > with the capabilities that are already implemented. Literate schemes are > good for organisational purposes, but for programming, literate schemes > make everything much more cumbersome, and ultimately yield to total disaster > in terms of efficiency in going through the code base. One thing that does help > is self documuntation if kept brief within the code file. > > > > I suggest that outline-minor-mode be also refactored and revamped, as I have > > > seen much additional code on top of it (outline-magic, orgstruct, > > > outshine). > > > > For now, those features which you asked for, already exist, you may > > try customizations, you are just few minutes away from having > > highlighting, folding is already there, and defining headlines. > > Opening-closing headings with the mouse would be good. Will spend the few minutes > and get back to you, as per your advice. Then see what capabilities from the other > add-ons are redundant. > > > > -- > > Jean > > > > Take action in Free Software Foundation campaigns: > > https://www.fsf.org/campaigns > > > > Sign an open letter in support of Richard M. Stallman > > https://stallmansupport.org/ > > https://rms-support-letter.github.io/ > > > > > > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 8:32 ` Christopher Dimech 2021-05-10 9:29 ` Christopher Dimech @ 2021-05-10 9:31 ` Jean Louis 2021-05-10 10:01 ` Christopher Dimech 2021-05-10 10:27 ` Christopher Dimech 1 sibling, 2 replies; 35+ messages in thread From: Jean Louis @ 2021-05-10 9:31 UTC (permalink / raw) To: Christopher Dimech; +Cc: help-gnu-emacs * Christopher Dimech <dimech@gmx.com> [2021-05-10 11:32]: > > There are already other packages, I have been testing it, and they > > worked similar to outline-minor-mode and could fold things. > > Folding of functions is good, folding by headings not so good. I still think you have to verify outline-heading-alist as that is where you define headings. I just did it on my side and it works well. ;;;; ↝ THIS IS MY STYLE OF A HEADING in Emacs Lisp I like it that way, and I have only defined one level, as I don't need more in that mode. In that mode it is: outline-heading-alist ⇒ '((";;;; ↝" . 2)) As simple as that. See my video demonstration here below. The Power of Outline Minor Mode for Emacs https://hyperscope.link/3/7/2/7/9/The-Power-of-Outline-Minor-Mode-for-Emacs-37279.html > How about extending it to subheadings like org-mode. It is a good idea > to use the comment declaration for defining headings, and also use * for > heading levels as in org-mode. For languages with multiline comments > I simply used *, then changed to org-mode. In elisp I made a multiline > comment function. > > For texinfo, which has multi-line comment capability I have been doing > > @ignore > * Heading > @end ignore > > @ignore > ** Subheading > @end ignore No need for that, please just see description of variable: outline-heading-alist outline-heading-alist is a variable defined in ‘outline.el’. Its value is nil Automatically becomes buffer-local when set. Alist associating a heading for every possible level. Each entry is of the form (HEADING . LEVEL). This alist is used two ways: to find the heading corresponding to a given level and to find the level of a given heading. If a mode or document needs several sets of outline headings (for example numbered and unnumbered sections), list them set by set and sorted by level within each set. For example in texinfo mode: (setq outline-heading-alist '(("@chapter" . 2) ("@section" . 3) ("@subsection" . 4) ("@subsubsection" . 5) ("@unnumbered" . 2) ("@unnumberedsec" . 3) ("@unnumberedsubsec" . 4) ("@unnumberedsubsubsec" . 5) ("@appendix" . 2) ("@appendixsec" . 3)... ("@appendixsubsec" . 4) ("@appendixsubsubsec" . 5) ..)) Instead of sorting the entries in each set, you can also separate the sets with nil. Also, when I need re-numbering of lists like in Org mode, invoke orgalist-mode when I need that. In general, many Org functions could be useful in other modes, would they be split into separate packages. > They should always go with the comment declaration for the language. > Most likely good, but then one cannot easily switch to org-mode. > Then again, if the topics of discussion are resolved, there wauld > not me much need to change to org-mode for certain org-mode > operations. I don't believe Org mode is solution for everything. In my Hyperscope system and also Website Revision System specific system, I have no limitation on what mode or text processor to use. Org mode IS bloated. It has everything what one needs and much more what I don't need. It is based on Outline mode and thus I like often invoking Outline mode as that satisfies basic needs without fiddling with Org mode keybindings and whatever other additional not necessary functions. Surely I do use Org mode, but when it is needed. When you mention "Org" I think of bloated number of Org packages and functions. That is why I asked, what do you think you need? You said highlighting, headings, folding, so that is about all available in outline-minor-mode > I agree with you up to a point. For starters let's just clean > things up with the capabilities that are already implemented. > Literate schemes are good for organisational purposes, but for > programming, literate schemes make everything much more cumbersome, > and ultimately yield to total disaster in terms of efficiency in > going through the code base. One thing that does help is self > documuntation if kept brief within the code file. Disaster comes with inefficient or non-integrated implementation. How I see Emacs in general, it is a pile of useful stuff, on which pile, more piles are added on top, with more stuff on top of the top, of the top of the piles of piles. We have all function well described, indexed, findable, locatable, usable in programming, we have it all, but IMHO integration is not adequate for my standard. I have expected more of computing in 21st century. I would expect something like, to tell by speech to computer: "...THEN GIVE ME ALL BUFFER AS A STRING..." which would interpolate into necessary functions. "...THEN REPLACE ALL OCCURENCES OF THE FOLLOWING..." (type the string) and computer asks "With what do you want to replace it?" then type the replacement. And then computer would ask for various possible mischievous effects, and would correct programmer, and in the same time find similar functions in other 10000 Emacs packages or for any kind of programming language that could be related to it. It would conduct database queries locally and remotely. How about tag based programming? Just think what you want to do, and other tags appear. Like STRING --- CUT, FIRST PART, LAST PART, FIND ANYWHERE IN THE STRING, SPLIT, CONVERT TO LIST, CHARS, or LIST -- REMOVE DUPLICATES, REVERSE etc. Tags could be shown on screen, user just clicks on it and decides relations, something similar to https://scratch.mit.edu -- where children program animations. More literate, more meanings, just ideas and intentions that result in a program. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 9:31 ` Jean Louis @ 2021-05-10 10:01 ` Christopher Dimech 2021-05-10 11:43 ` Jean Louis 2021-05-10 10:27 ` Christopher Dimech 1 sibling, 1 reply; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 10:01 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs > Sent: Monday, May 10, 2021 at 9:31 PM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 11:32]: > > > There are already other packages, I have been testing it, and they > > > worked similar to outline-minor-mode and could fold things. > > > > Folding of functions is good, folding by headings not so good. > > I still think you have to verify outline-heading-alist as that is > where you define headings. I just did it on my side and it works > well. > > ;;;; ↝ THIS IS MY STYLE OF A HEADING in Emacs Lisp > > I like it that way, and I have only defined one level, as I don't need > more in that mode. > > In that mode it is: > > outline-heading-alist ⇒ '((";;;; ↝" . 2)) > > As simple as that. > > See my video demonstration here below. > > The Power of Outline Minor Mode for Emacs > https://hyperscope.link/3/7/2/7/9/The-Power-of-Outline-Minor-Mode-for-Emacs-37279.html > > > How about extending it to subheadings like org-mode. It is a good idea > > to use the comment declaration for defining headings, and also use * for > > heading levels as in org-mode. For languages with multiline comments > > I simply used *, then changed to org-mode. In elisp I made a multiline > > comment function. > > > > For texinfo, which has multi-line comment capability I have been doing > > > > @ignore > > * Heading > > @end ignore > > > > @ignore > > ** Subheading > > @end ignore > > No need for that, please just see description of variable: > outline-heading-alist > > outline-heading-alist is a variable defined in ‘outline.el’. > > Its value is nil > > Automatically becomes buffer-local when set. > > Alist associating a heading for every possible level. > Each entry is of the form (HEADING . LEVEL). > This alist is used two ways: to find the heading corresponding to > a given level and to find the level of a given heading. > If a mode or document needs several sets of outline headings (for example > numbered and unnumbered sections), list them set by set and sorted by level > within each set. For example in texinfo mode: > > (setq outline-heading-alist > '(("@chapter" . 2) ("@section" . 3) ("@subsection" . 4) > ("@subsubsection" . 5) > ("@unnumbered" . 2) ("@unnumberedsec" . 3) > ("@unnumberedsubsec" . 4) ("@unnumberedsubsubsec" . 5) > ("@appendix" . 2) ("@appendixsec" . 3)... > ("@appendixsubsec" . 4) ("@appendixsubsubsec" . 5) ..)) > > Instead of sorting the entries in each set, you can also separate the > sets with nil. > > Also, when I need re-numbering of lists like in Org mode, invoke > orgalist-mode when I need that. In general, many Org functions could > be useful in other modes, would they be split into separate packages. > > > They should always go with the comment declaration for the language. > > Most likely good, but then one cannot easily switch to org-mode. > > Then again, if the topics of discussion are resolved, there wauld > > not me much need to change to org-mode for certain org-mode > > operations. > > I don't believe Org mode is solution for everything. In my Hyperscope > system and also Website Revision System specific system, I have no > limitation on what mode or text processor to use. No, only when one wants org-like features. The plan should be that outline-minor-mode handles them, which you have outlined. > Org mode IS bloated. It has everything what one needs and much more > what I don't need. It is based on Outline mode and thus I like often > invoking Outline mode as that satisfies basic needs without fiddling > with Org mode keybindings and whatever other additional not necessary > functions. Surely I do use Org mode, but when it is needed. Isee that org-mode should not have handled programming languages. That should have been a new programming major mode for multi-language coding. I much like the original idea of org-mode and keeping close to that. > When you mention "Org" I think of bloated number of Org packages and > functions. That is why I asked, what do you think you need? You said > highlighting, headings, folding, so that is about all available in > outline-minor-mode I found a number of packages that extend outline-mode, making things complicated. > > I agree with you up to a point. For starters let's just clean > > things up with the capabilities that are already implemented. > > Literate schemes are good for organisational purposes, but for > > programming, literate schemes make everything much more cumbersome, > > and ultimately yield to total disaster in terms of efficiency in > > going through the code base. One thing that does help is self > > documuntation if kept brief within the code file. > > Disaster comes with inefficient or non-integrated implementation. How > I see Emacs in general, it is a pile of useful stuff, on which pile, > more piles are added on top, with more stuff on top of the top, of the > top of the piles of piles. > > We have all function well described, indexed, findable, locatable, > usable in programming, we have it all, but IMHO integration is not > adequate for my standard. I have expected more of computing in 21st > century. Welcome to the club of forward thinking. There is so much work to do and so much planning. I have agreed with Eric Raymond when he said that even an idiot can code. > I would expect something like, to tell by speech to computer: > > "...THEN GIVE ME ALL BUFFER AS A STRING..." which would interpolate > into necessary functions. > > "...THEN REPLACE ALL OCCURENCES OF THE FOLLOWING..." (type the string) > and computer asks "With what do you want to replace it?" then type the > replacement. And then computer would ask for various possible > mischievous effects, and would correct programmer, and in the same > time find similar functions in other 10000 Emacs packages or for any > kind of programming language that could be related to it. It would > conduct database queries locally and remotely. > > How about tag based programming? Just think what you want to do, and > other tags appear. Like STRING --- CUT, FIRST PART, LAST PART, FIND > ANYWHERE IN THE STRING, SPLIT, CONVERT TO LIST, CHARS, or LIST -- > REMOVE DUPLICATES, REVERSE etc. Tags could be shown on screen, user > just clicks on it and decides relations, something similar to > https://scratch.mit.edu -- where children program animations. More > literate, more meanings, just ideas and intentions that result in a > program. Too much literate and you loose conciseness. As in mathematics, if things become too literate you would not be able to see a proof you can understand in a few pages. A more mathematical approach to things would help in dramatic ways. > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 10:01 ` Christopher Dimech @ 2021-05-10 11:43 ` Jean Louis 2021-05-10 12:52 ` Christopher Dimech 0 siblings, 1 reply; 35+ messages in thread From: Jean Louis @ 2021-05-10 11:43 UTC (permalink / raw) To: Christopher Dimech; +Cc: help-gnu-emacs * Christopher Dimech <dimech@gmx.com> [2021-05-10 13:01]: > > I don't believe Org mode is solution for everything. In my Hyperscope > > system and also Website Revision System specific system, I have no > > limitation on what mode or text processor to use. > > No, only when one wants org-like features. The plan should be that > outline-minor-mode handles them, which you have outlined. Literate programming is descriptional programming. It is just a matter of marking specific parts of text to be descriptions and specific parts to be program code. https://en.wikipedia.org/wiki/Literate_programming#Example By using text pre-processors one can easily do literate programming. And I would say it is useful especially if other people are to learn from the code. We do that as human too little, and thus benefit too little from each other. How about instead of embedding code in the text, to embed text in the code? In the new GNU Hyperbole package there is simple alias function that creates a button like: (defal 'my-tag 'my-function) then any button in the text shown as: <my-tag some arguments here> would be activated with M-RET and Emacs would jump to the corresponding location. Now if we change the delimiters to be ( and ) we can then define: (defal 'defun 'jump-to-defun-literate-programming-index) Which would then make the first line of the below a button, or hyperlink: (defun something (and more here) more) Emacs has a built-in literate programming features as `C-h f' on the function brings us to the documentation source. But what if we want to elaborate the function and make it somewhat better, like Knuth's work, maybe we want to elaborate it in any markup like TeX or LateX or Markdown, or in special file, database node, or remote URL? That is where embedding text into the code comes in. There need not be visible text in the code, but one could click and get the same function elaborated with the markup source, markup result such as PDF, and one could jump back to the code. > > Org mode IS bloated. It has everything what one needs and much more > > what I don't need. It is based on Outline mode and thus I like often > > invoking Outline mode as that satisfies basic needs without fiddling > > with Org mode keybindings and whatever other additional not necessary > > functions. Surely I do use Org mode, but when it is needed. > > Isee that org-mode should not have handled programming languages. That > should have been a new programming major mode for multi-language coding. > > I much like the original idea of org-mode and keeping close to that. Org mode is derivate from Outline mode. > > We have all function well described, indexed, findable, locatable, > > usable in programming, we have it all, but IMHO integration is not > > adequate for my standard. I have expected more of computing in 21st > > century. > > Welcome to the club of forward thinking. There is so much work to do > and so much planning. I have agreed with Eric Raymond when he said that > even an idiot can code. Hahahhha. You know people laugh when they find some truth... > > How about tag based programming? Just think what you want to do, and > > other tags appear. Like STRING --- CUT, FIRST PART, LAST PART, FIND > > ANYWHERE IN THE STRING, SPLIT, CONVERT TO LIST, CHARS, or LIST -- > > REMOVE DUPLICATES, REVERSE etc. Tags could be shown on screen, user > > just clicks on it and decides relations, something similar to > > https://scratch.mit.edu -- where children program animations. More > > literate, more meanings, just ideas and intentions that result in a > > program. > > Too much literate and you loose conciseness. As in mathematics, if > things become too literate you would not be able to see a proof you > can understand in a few pages. A more mathematical approach to > things would help in dramatic ways. Oh, yes I agree, that is quite different concept. We as humans have the inborn unwillingness to think, though we think all the time, but nobody is forcing us to make analysis and conclusions with some quality. When it comes to making analysis, people will rather tend to skip it, unless they are truly interested in the subject. In other words, don't make it too literate for illiterates. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 11:43 ` Jean Louis @ 2021-05-10 12:52 ` Christopher Dimech 2021-05-10 17:05 ` Jean Louis 0 siblings, 1 reply; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 12:52 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs --------------------- Christopher Dimech General Administrator - Naiad Informatics - GNU Project (Geocomputation) - Geophysical Simulation - Geological Subsurface Mapping - Disaster Preparedness and Mitigation - Natural Resource Exploration and Production - Free Software Advocacy > Sent: Monday, May 10, 2021 at 11:43 PM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 13:01]: > > > I don't believe Org mode is solution for everything. In my Hyperscope > > > system and also Website Revision System specific system, I have no > > > limitation on what mode or text processor to use. > > > > No, only when one wants org-like features. The plan should be that > > outline-minor-mode handles them, which you have outlined. > > Literate programming is descriptional programming. It is just a matter > of marking specific parts of text to be descriptions and specific > parts to be program code. > > https://en.wikipedia.org/wiki/Literate_programming#Example > > By using text pre-processors one can easily do literate > programming. And I would say it is useful especially if other people > are to learn from the code. We do that as human too little, and thus > benefit too little from each other. > > How about instead of embedding code in the text, to embed text in the > code? Originally I had bought in the idea of Knuth and others, but did not buy on their results with literate programming. What I find valuable is the the development of protowriting that communicates limited information. They maybe a parser that goes through the to obtain a more literate translation. > In the new GNU Hyperbole package there is simple alias function that > creates a button like: > > (defal 'my-tag 'my-function) > > then any button in the text shown as: > > <my-tag some arguments here> would be activated with M-RET and Emacs > would jump to the corresponding location. > > Now if we change the delimiters to be ( and ) we can then define: > > (defal 'defun 'jump-to-defun-literate-programming-index) > > Which would then make the first line of the below a button, or hyperlink: > > (defun something (and more here) > more) > > Emacs has a built-in literate programming features as `C-h f' on the > function brings us to the documentation source. But what if we want to > elaborate the function and make it somewhat better, like Knuth's work, > maybe we want to elaborate it in any markup like TeX or LateX or > Markdown, or in special file, database node, or remote URL? > > That is where embedding text into the code comes in. There need not be > visible text in the code, but one could click and get the same > function elaborated with the markup source, markup result such as PDF, > and one could jump back to the code. The strategy of hiding is good. But I promote the idea of having separate files. Documentation in code will be limited, more elaborate schemes for documunetation on a separate file. Most times the code is the place to check things. > > > Org mode IS bloated. It has everything what one needs and much more > > > what I don't need. It is based on Outline mode and thus I like often > > > invoking Outline mode as that satisfies basic needs without fiddling > > > with Org mode keybindings and whatever other additional not necessary > > > functions. Surely I do use Org mode, but when it is needed. > > > > Isee that org-mode should not have handled programming languages. That > > should have been a new programming major mode for multi-language coding. > > > > I much like the original idea of org-mode and keeping close to that. > > Org mode is derivate from Outline mode. > > > > We have all function well described, indexed, findable, locatable, > > > usable in programming, we have it all, but IMHO integration is not > > > adequate for my standard. I have expected more of computing in 21st > > > century. > > > > Welcome to the club of forward thinking. There is so much work to do > > and so much planning. I have agreed with Eric Raymond when he said that > > even an idiot can code. > > Hahahhha. You know people laugh when they find some truth... > > > > How about tag based programming? Just think what you want to do, and > > > other tags appear. Like STRING --- CUT, FIRST PART, LAST PART, FIND > > > ANYWHERE IN THE STRING, SPLIT, CONVERT TO LIST, CHARS, or LIST -- > > > REMOVE DUPLICATES, REVERSE etc. Tags could be shown on screen, user > > > just clicks on it and decides relations, something similar to > > > https://scratch.mit.edu -- where children program animations. More > > > literate, more meanings, just ideas and intentions that result in a > > > program. > > > > Too much literate and you loose conciseness. As in mathematics, if > > things become too literate you would not be able to see a proof you > > can understand in a few pages. A more mathematical approach to > > things would help in dramatic ways. > > Oh, yes I agree, that is quite different concept. We as humans have > the inborn unwillingness to think, though we think all the time, but > nobody is forcing us to make analysis and conclusions with some > quality. When it comes to making analysis, people will rather tend to > skip it, unless they are truly interested in the subject. > > In other words, don't make it too literate for illiterates. There has to be a background and foundation. For instance, magnetism is one of those things that's just too difficult to understand, except through an elaborate education in physics. In computing, we have not arrived at that stage yet. > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 12:52 ` Christopher Dimech @ 2021-05-10 17:05 ` Jean Louis 2021-05-11 2:00 ` Christopher Dimech 0 siblings, 1 reply; 35+ messages in thread From: Jean Louis @ 2021-05-10 17:05 UTC (permalink / raw) To: Christopher Dimech; +Cc: help-gnu-emacs * Christopher Dimech <dimech@gmx.com> [2021-05-10 15:53]: > > How about instead of embedding code in the text, to embed text in the > > code? > > Originally I had bought in the idea of Knuth and others, but did not > buy on their results with literate programming. What I find > valuable is the the development of protowriting that communicates > limited information. They maybe a parser that goes through the to > obtain a more literate translation. Simple Way to Document Code with Markdown, grep, and pandoc | Richard Zach https://people.ucalgary.ca/~rzach/blog/2014/05/simple-way-to-document-code-with-markdown-grep-and-pandoc.html Basically, few shell tools and a workflow may replace all the "literate programming" tools there are. Just write the markup in comments, and pre-process the file with `cut', `grep', etc. to generate output. > > That is where embedding text into the code comes in. There need not be > > visible text in the code, but one could click and get the same > > function elaborated with the markup source, markup result such as PDF, > > and one could jump back to the code. > > The strategy of hiding is good. But I promote the idea of having separate > files. Documentation in code will be limited, more elaborate schemes for > documunetation on a separate file. Most times the code is the place to check > things. That can be done by method using GNU Hyperbole or principle of it, just make each (defun ) or (defvar ) and maybe functions a button that points to something else, editable. Right now if I use M-RET with GNU Hyperbole it brings me to definition of a function, and often it works better than M-. that brings me also to definitions, but it will not find it at all times. > > In other words, don't make it too literate for illiterates. > > There has to be a background and foundation. For instance, > magnetism is one of those things that's just too difficult to > understand, except through an elaborate education in physics. In > computing, we have not arrived at that stage yet. Back in time we were making programs for schools that were very helpful for pupils to learn physics. We don't have much of it today. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 17:05 ` Jean Louis @ 2021-05-11 2:00 ` Christopher Dimech 0 siblings, 0 replies; 35+ messages in thread From: Christopher Dimech @ 2021-05-11 2:00 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs > Sent: Tuesday, May 11, 2021 at 5:05 AM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 15:53]: > > > How about instead of embedding code in the text, to embed text in the > > > code? > > > > Originally I had bought in the idea of Knuth and others, but did not > > buy on their results with literate programming. What I find > > valuable is the the development of protowriting that communicates > > limited information. They maybe a parser that goes through the to > > obtain a more literate translation. > > Simple Way to Document Code with Markdown, grep, and pandoc | Richard Zach > https://people.ucalgary.ca/~rzach/blog/2014/05/simple-way-to-document-code-with-markdown-grep-and-pandoc.html > > Basically, few shell tools and a workflow may replace all the > "literate programming" tools there are. Just write the markup in > comments, and pre-process the file with `cut', `grep', etc. to > generate output. > > > > That is where embedding text into the code comes in. There need not be > > > visible text in the code, but one could click and get the same > > > function elaborated with the markup source, markup result such as PDF, > > > and one could jump back to the code. > > > > The strategy of hiding is good. But I promote the idea of having separate > > files. Documentation in code will be limited, more elaborate schemes for > > documunetation on a separate file. Most times the code is the place to check > > things. > > That can be done by method using GNU Hyperbole or principle of it, > just make each (defun ) or (defvar ) and maybe functions a button that > points to something else, editable. > > Right now if I use M-RET with GNU Hyperbole it brings me to definition > of a function, and often it works better than M-. that brings me also > to definitions, but it will not find it at all times. > > > > In other words, don't make it too literate for illiterates. > > > > There has to be a background and foundation. For instance, > > magnetism is one of those things that's just too difficult to > > understand, except through an elaborate education in physics. In > > computing, we have not arrived at that stage yet. > > Back in time we were making programs for schools that were very > helpful for pupils to learn physics. We don't have much of it today. I remember those - doing electical circuits, linear motion, etc. Were cool stuff. > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 9:31 ` Jean Louis 2021-05-10 10:01 ` Christopher Dimech @ 2021-05-10 10:27 ` Christopher Dimech 2021-05-10 11:53 ` Jean Louis 1 sibling, 1 reply; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 10:27 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs I would like to use ;; * heading ;; ** subheading Have done (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode) (add-hook 'emacs-lisp-mode-hook (lambda () (outline-minor-mode 1))) (highlight-regexp "^;;;;;.*$" 'hi-yellow) (setq outline-heading-alist '((";; * " . 1) (";; ** " . 2) (";; *** " . 3)) ) ((emacs-lisp-mode . ((outline-heading-alist . '( (";; * " . 1) (";; ** " . 2) (";; *** " . 3) ) )))) Still want to ask example code for hon to change the outline-minor-mode keybindings to something else. > Sent: Monday, May 10, 2021 at 9:31 PM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 11:32]: > > > There are already other packages, I have been testing it, and they > > > worked similar to outline-minor-mode and could fold things. > > > > Folding of functions is good, folding by headings not so good. > > I still think you have to verify outline-heading-alist as that is > where you define headings. I just did it on my side and it works > well. > > ;;;; ↝ THIS IS MY STYLE OF A HEADING in Emacs Lisp > > I like it that way, and I have only defined one level, as I don't need > more in that mode. > > In that mode it is: > > outline-heading-alist ⇒ '((";;;; ↝" . 2)) > > As simple as that. > > See my video demonstration here below. > > The Power of Outline Minor Mode for Emacs > https://hyperscope.link/3/7/2/7/9/The-Power-of-Outline-Minor-Mode-for-Emacs-37279.html > > > How about extending it to subheadings like org-mode. It is a good idea > > to use the comment declaration for defining headings, and also use * for > > heading levels as in org-mode. For languages with multiline comments > > I simply used *, then changed to org-mode. In elisp I made a multiline > > comment function. > > > > For texinfo, which has multi-line comment capability I have been doing > > > > @ignore > > * Heading > > @end ignore > > > > @ignore > > ** Subheading > > @end ignore > > No need for that, please just see description of variable: > outline-heading-alist > > outline-heading-alist is a variable defined in ‘outline.el’. > > Its value is nil > > Automatically becomes buffer-local when set. > > Alist associating a heading for every possible level. > Each entry is of the form (HEADING . LEVEL). > This alist is used two ways: to find the heading corresponding to > a given level and to find the level of a given heading. > If a mode or document needs several sets of outline headings (for example > numbered and unnumbered sections), list them set by set and sorted by level > within each set. For example in texinfo mode: > > (setq outline-heading-alist > '(("@chapter" . 2) ("@section" . 3) ("@subsection" . 4) > ("@subsubsection" . 5) > ("@unnumbered" . 2) ("@unnumberedsec" . 3) > ("@unnumberedsubsec" . 4) ("@unnumberedsubsubsec" . 5) > ("@appendix" . 2) ("@appendixsec" . 3)... > ("@appendixsubsec" . 4) ("@appendixsubsubsec" . 5) ..)) > > Instead of sorting the entries in each set, you can also separate the > sets with nil. > > Also, when I need re-numbering of lists like in Org mode, invoke > orgalist-mode when I need that. In general, many Org functions could > be useful in other modes, would they be split into separate packages. > > > They should always go with the comment declaration for the language. > > Most likely good, but then one cannot easily switch to org-mode. > > Then again, if the topics of discussion are resolved, there wauld > > not me much need to change to org-mode for certain org-mode > > operations. > > I don't believe Org mode is solution for everything. In my Hyperscope > system and also Website Revision System specific system, I have no > limitation on what mode or text processor to use. > > Org mode IS bloated. It has everything what one needs and much more > what I don't need. It is based on Outline mode and thus I like often > invoking Outline mode as that satisfies basic needs without fiddling > with Org mode keybindings and whatever other additional not necessary > functions. Surely I do use Org mode, but when it is needed. > > When you mention "Org" I think of bloated number of Org packages and > functions. That is why I asked, what do you think you need? You said > highlighting, headings, folding, so that is about all available in > outline-minor-mode > > > I agree with you up to a point. For starters let's just clean > > things up with the capabilities that are already implemented. > > Literate schemes are good for organisational purposes, but for > > programming, literate schemes make everything much more cumbersome, > > and ultimately yield to total disaster in terms of efficiency in > > going through the code base. One thing that does help is self > > documuntation if kept brief within the code file. > > Disaster comes with inefficient or non-integrated implementation. How > I see Emacs in general, it is a pile of useful stuff, on which pile, > more piles are added on top, with more stuff on top of the top, of the > top of the piles of piles. > > We have all function well described, indexed, findable, locatable, > usable in programming, we have it all, but IMHO integration is not > adequate for my standard. I have expected more of computing in 21st > century. > > I would expect something like, to tell by speech to computer: > > "...THEN GIVE ME ALL BUFFER AS A STRING..." which would interpolate > into necessary functions. > > "...THEN REPLACE ALL OCCURENCES OF THE FOLLOWING..." (type the string) > and computer asks "With what do you want to replace it?" then type the > replacement. And then computer would ask for various possible > mischievous effects, and would correct programmer, and in the same > time find similar functions in other 10000 Emacs packages or for any > kind of programming language that could be related to it. It would > conduct database queries locally and remotely. > > How about tag based programming? Just think what you want to do, and > other tags appear. Like STRING --- CUT, FIRST PART, LAST PART, FIND > ANYWHERE IN THE STRING, SPLIT, CONVERT TO LIST, CHARS, or LIST -- > REMOVE DUPLICATES, REVERSE etc. Tags could be shown on screen, user > just clicks on it and decides relations, something similar to > https://scratch.mit.edu -- where children program animations. More > literate, more meanings, just ideas and intentions that result in a > program. > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 10:27 ` Christopher Dimech @ 2021-05-10 11:53 ` Jean Louis 2021-05-10 12:32 ` Christopher Dimech 0 siblings, 1 reply; 35+ messages in thread From: Jean Louis @ 2021-05-10 11:53 UTC (permalink / raw) To: Christopher Dimech; +Cc: help-gnu-emacs * Christopher Dimech <dimech@gmx.com> [2021-05-10 13:28]: > (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode) > (add-hook 'emacs-lisp-mode-hook > (lambda () > (outline-minor-mode 1))) I am not sure why you need to call 2 times, isn't once just enough? I have tried this: > (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode) and it works. I try that with this function here, could be interesting. It creates new temporary buffers. C-u F5 and I choose the favorite mode, and the above hook worked just well. I think there is no need for second line above. (defvar rcd-temp-buffer-mode-history nil) (defun rcd-temp-buffer (&optional name mode) (interactive "p") (let* ((format "*RCD TEMPORARY BUFFER%s%s*") (buffer (if name (format format ": " name) (format format "" "")))) (switch-to-buffer (generate-new-buffer "*RCD TEMPORARY BUFFER*")) (if current-prefix-arg (let* ((modes '("adoc-mode" "emacs-lisp-mode" "lisp-mode" "markdown-mode" "org-mode" "sql-mode" "fundamental-mode" "html-mode")) (mode (completing-read "Mode: " modes nil t nil 'rcd-temp-buffer-mode-history))) (funcall (intern mode))) (funcall (intern (or mode "fundamental-mode")))))) > (highlight-regexp "^;;;;;.*$" 'hi-yellow) I don't think that is right place to define highlighting. Please first verify options of outline-minor-mode-highlight (I did not yet). > (setq outline-heading-alist > '((";; * " . 1) (";; ** " . 2) (";; *** " . 3)) ) > > ((emacs-lisp-mode . > ((outline-heading-alist . > '( (";; * " . 1) > (";; ** " . 2) > (";; *** " . 3) ) )))) > > Still want to ask example code for hon to change the outline-minor-mode > keybindings to something else. I have tried that, does it work on your side? Not on mine, I don't know why. I have made new prefix: outline-minor-mode-prefix is C-c C-d "\x03\x04" But TAB works automatically when you set headings. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 11:53 ` Jean Louis @ 2021-05-10 12:32 ` Christopher Dimech 2021-05-10 16:07 ` Jean Louis 0 siblings, 1 reply; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 12:32 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs > Sent: Monday, May 10, 2021 at 11:53 PM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 13:28]: > > (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode) > > (add-hook 'emacs-lisp-mode-hook > > (lambda () > > (outline-minor-mode 1))) > > I am not sure why you need to call 2 times, isn't once just enough? > > I have tried this: > > > (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode) > > and it works. I try that with this function here, could be > interesting. It creates new temporary buffers. C-u F5 and I choose the > favorite mode, and the above hook worked just well. > > I think there is no need for second line above. You are right, have removed the second and do get outline-minor-mode for elisp files. > (defvar rcd-temp-buffer-mode-history nil) > > (defun rcd-temp-buffer (&optional name mode) > (interactive "p") > (let* ((format "*RCD TEMPORARY BUFFER%s%s*") > (buffer (if name (format format ": " name) (format format "" "")))) > (switch-to-buffer (generate-new-buffer "*RCD TEMPORARY BUFFER*")) > (if current-prefix-arg > (let* ((modes '("adoc-mode" "emacs-lisp-mode" "lisp-mode" "markdown-mode" > "org-mode" "sql-mode" "fundamental-mode" "html-mode")) > (mode (completing-read "Mode: " modes nil t nil 'rcd-temp-buffer-mode-history))) > (funcall (intern mode))) > (funcall (intern (or mode "fundamental-mode")))))) > > > (highlight-regexp "^;;;;;.*$" 'hi-yellow) > > I don't think that is right place to define highlighting. Please first > verify options of outline-minor-mode-highlight (I did not yet). > > > (setq outline-heading-alist > > '((";; * " . 1) (";; ** " . 2) (";; *** " . 3)) ) > > > > ((emacs-lisp-mode . > > ((outline-heading-alist . > > '( (";; * " . 1) > > (";; ** " . 2) > > (";; *** " . 3) ) )))) > > > > Still want to ask example code for hon to change the outline-minor-mode > > keybindings to something else. > > I have tried that, does it work on your side? Not on mine, I don't > know why. Does not work here either, trying to understand why. > I have made new prefix: outline-minor-mode-prefix is C-c C-d "\x03\x04" > > But TAB works automatically when you set headings. > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 12:32 ` Christopher Dimech @ 2021-05-10 16:07 ` Jean Louis 2021-05-11 2:26 ` Christopher Dimech 0 siblings, 1 reply; 35+ messages in thread From: Jean Louis @ 2021-05-10 16:07 UTC (permalink / raw) To: Christopher Dimech; +Cc: help-gnu-emacs * Christopher Dimech <dimech@gmx.com> [2021-05-10 15:44]: > > I have tried that, does it work on your side? Not on mine, I don't > > know why. > > Does not work here either, trying to understand why. It is probably looking for regular expression ans * has meaning in regular expressions. We have to find working solution. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 16:07 ` Jean Louis @ 2021-05-11 2:26 ` Christopher Dimech 0 siblings, 0 replies; 35+ messages in thread From: Christopher Dimech @ 2021-05-11 2:26 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs > Sent: Tuesday, May 11, 2021 at 4:07 AM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 15:44]: > > > I have tried that, does it work on your side? Not on mine, I don't > > > know why. > > > > Does not work here either, trying to understand why. > > It is probably looking for regular expression ans * has meaning in > regular expressions. We have to find working solution. Agreed. There is the following idea. But it is just everything with top heading, whereas I would like separate ";; *" ";; **" ";; ***" ... The strategy is not taking effect though. (setq hstar '( (";; \\*+ " . 1) )) ((emacs-lisp-mode . ((outline-regexp . hstar )))) > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 7:32 ` Jean Louis 2021-05-10 8:32 ` Christopher Dimech @ 2021-05-10 8:46 ` Christopher Dimech 2021-05-10 9:15 ` Christopher Dimech 2 siblings, 0 replies; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 8:46 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs Do you know the possibilities for outline-minor-mode for texinfo files (.texi)? What is the tag for entering headings? Regards Christopher > Sent: Monday, May 10, 2021 at 7:32 PM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 09:53]: > > Mainly catering for highligting, headlines and folding to start > > with. > > Isn't that what outline-minor-mode is for? > > There are already other packages, I have been testing it, and they > worked similar to outline-minor-mode and could fold things. > > How you want to designate headlines? It has to have some key > string. Maybe with 5 ;;;;; on beginning? > > ;;;;; Headline > > Evaluate this, and you get highlighting of headlines: > (highlight-regexp "^;;;;;.*$" 'hi-yellow) > > But I think you have to first play with: > {M-x customize-group RET outline RET} > > as there is highlighting already included. > > For headings, I think each mode need different definition on what is > heading. > > So you can define heading with `outline-heading-alist' > > outline-heading-alist is a variable defined in ‘outline.el’. > > Its value is nil > > Automatically becomes buffer-local when set. > > Alist associating a heading for every possible level. > Each entry is of the form (HEADING . LEVEL). > This alist is used two ways: to find the heading corresponding to > a given level and to find the level of a given heading. > If a mode or document needs several sets of outline headings (for example > numbered and unnumbered sections), list them set by set and sorted by level > within each set. For example in texinfo mode: > > (setq outline-heading-alist > '(("@chapter" . 2) ("@section" . 3) ("@subsection" . 4) > ("@subsubsection" . 5) > ("@unnumbered" . 2) ("@unnumberedsec" . 3) > ("@unnumberedsubsec" . 4) ("@unnumberedsubsubsec" . 5) > ("@appendix" . 2) ("@appendixsec" . 3)... > ("@appendixsubsec" . 4) ("@appendixsubsubsec" . 5) ..)) > > Instead of sorting the entries in each set, you can also separate the > sets with nil. > > You asked for: > > - highligting, > - headlines; and > - folding > > And I have demonstrated that more or less, that already exists in > outline-minor-mode, play with highlighting options, folding already > exists, and headings you may define yourself. > > Let us say I have this comment and I keep just one space after ;;;; > > ;;;; ⟦⟦ LIST FUNCTIONS ⟧⟧ > > Folded text > > ;;;; ⟦⟦⟦ MORE LIST FUNCTIONS ⟧⟧⟧ > > (setq outline-heading-alist > '((";;;; ⟦" . 1) (";;;; ⟦⟦" . 2) (";;;; ⟦⟦⟦" . 3))) > > this appears to work on my side in Emacs Lisp mode, but not in > fundamental. I can fold those headings and they remain visible. > > > > Like should I mark functions with TODO/DONE? > > > > No > > Those mentioned meta level features can look abstract to you, but they > are very real to me so far. It leans to subject of literate > programming, similar to programming by using Org Babel and embedded > functions that are described and later interpolated into the > script. Just that I can do that on the higher level rich attributes > and references and relations to other functions. As humans we are so > late with literate programming. That would help so many other people. > > > I suggest that outline-minor-mode be also refactored and revamped, as I have > > seen much additional code on top of it (outline-magic, orgstruct, > > outshine). > > For now, those features which you asked for, already exist, you may > try customizations, you are just few minutes away from having > highlighting, folding is already there, and defining headlines. > > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 7:32 ` Jean Louis 2021-05-10 8:32 ` Christopher Dimech 2021-05-10 8:46 ` Christopher Dimech @ 2021-05-10 9:15 ` Christopher Dimech 2021-05-10 9:33 ` Jean Louis 2 siblings, 1 reply; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 9:15 UTC (permalink / raw) To: Jean Louis; +Cc: help-gnu-emacs What does one need to write in emacs init file to have outline-minor-mode for elisp files? > Sent: Monday, May 10, 2021 at 7:32 PM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-10 09:53]: > > Mainly catering for highligting, headlines and folding to start > > with. > > Isn't that what outline-minor-mode is for? > > There are already other packages, I have been testing it, and they > worked similar to outline-minor-mode and could fold things. > > How you want to designate headlines? It has to have some key > string. Maybe with 5 ;;;;; on beginning? > > ;;;;; Headline > > Evaluate this, and you get highlighting of headlines: > (highlight-regexp "^;;;;;.*$" 'hi-yellow) > > But I think you have to first play with: > {M-x customize-group RET outline RET} > > as there is highlighting already included. > > For headings, I think each mode need different definition on what is > heading. > > So you can define heading with `outline-heading-alist' > > outline-heading-alist is a variable defined in ‘outline.el’. > > Its value is nil > > Automatically becomes buffer-local when set. > > Alist associating a heading for every possible level. > Each entry is of the form (HEADING . LEVEL). > This alist is used two ways: to find the heading corresponding to > a given level and to find the level of a given heading. > If a mode or document needs several sets of outline headings (for example > numbered and unnumbered sections), list them set by set and sorted by level > within each set. For example in texinfo mode: > > (setq outline-heading-alist > '(("@chapter" . 2) ("@section" . 3) ("@subsection" . 4) > ("@subsubsection" . 5) > ("@unnumbered" . 2) ("@unnumberedsec" . 3) > ("@unnumberedsubsec" . 4) ("@unnumberedsubsubsec" . 5) > ("@appendix" . 2) ("@appendixsec" . 3)... > ("@appendixsubsec" . 4) ("@appendixsubsubsec" . 5) ..)) > > Instead of sorting the entries in each set, you can also separate the > sets with nil. > > You asked for: > > - highligting, > - headlines; and > - folding > > And I have demonstrated that more or less, that already exists in > outline-minor-mode, play with highlighting options, folding already > exists, and headings you may define yourself. > > Let us say I have this comment and I keep just one space after ;;;; > > ;;;; ⟦⟦ LIST FUNCTIONS ⟧⟧ > > Folded text > > ;;;; ⟦⟦⟦ MORE LIST FUNCTIONS ⟧⟧⟧ > > (setq outline-heading-alist > '((";;;; ⟦" . 1) (";;;; ⟦⟦" . 2) (";;;; ⟦⟦⟦" . 3))) > > this appears to work on my side in Emacs Lisp mode, but not in > fundamental. I can fold those headings and they remain visible. > > > > Like should I mark functions with TODO/DONE? > > > > No > > Those mentioned meta level features can look abstract to you, but they > are very real to me so far. It leans to subject of literate > programming, similar to programming by using Org Babel and embedded > functions that are described and later interpolated into the > script. Just that I can do that on the higher level rich attributes > and references and relations to other functions. As humans we are so > late with literate programming. That would help so many other people. > > > I suggest that outline-minor-mode be also refactored and revamped, as I have > > seen much additional code on top of it (outline-magic, orgstruct, > > outshine). > > For now, those features which you asked for, already exist, you may > try customizations, you are just few minutes away from having > highlighting, folding is already there, and defining headlines. > > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-10 9:15 ` Christopher Dimech @ 2021-05-10 9:33 ` Jean Louis 0 siblings, 0 replies; 35+ messages in thread From: Jean Louis @ 2021-05-10 9:33 UTC (permalink / raw) To: Christopher Dimech; +Cc: help-gnu-emacs * Christopher Dimech <dimech@gmx.com> [2021-05-10 12:15]: > What does one need to write in emacs init file to have > outline-minor-mode for elisp files? I am not sure how outline-minor-mode defines headings in Emacs Lisp Mode. But I know what I am doing, here is my .dir-locals.el: ;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ((emacs-lisp-mode . ((outline-heading-alist . '((";;;; ↝" . 2)))))) And I make headings in this particular way: ;;;; ↝ MY HEADING And that works well, see on video: The Power of Outline Minor Mode for Emacs https://hyperscope.link/3/7/2/7/9/The-Power-of-Outline-Minor-Mode-for-Emacs-37279.html -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 17:35 ` Emanuel Berg via Users list for the GNU Emacs text editor 2021-05-09 17:50 ` Jean Louis @ 2021-05-10 6:08 ` Christopher Dimech 1 sibling, 0 replies; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 6:08 UTC (permalink / raw) To: moasenwood; +Cc: help-gnu-emacs > Sent: Monday, May 10, 2021 at 5:35 AM > From: "Emanuel Berg via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org> > To: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > Jean Louis wrote: > > > I don't think it should be updated, it is enough for users > > to customize their key bindings. The TAB that you are very > > much used to has its quite different meaning in different > > mode like emacs-lisp-mode and it would really disturt to > > change key bindings all the time when I switch to > > outline-minor-mode and back. > > Maybe so (I don't know the modes you refer to) but in general > is it very common to switch keys based on mode, most often the > modes are major modes but it can and is done for minor modes > as well, here is one example That has been my drift, to do things by language, for elisp we can refrain from <tab> if need be. Currently there are a number of convoluted functionalities for outline-mode. But we should remember that all have their origin primarily driven by the development of org-mode. > https://dataswamp.org/~incal/emacs-init/caps-back.el > > > I can think that you barely use TAB in Emacs Lisp, but I use > > it very frequently to indent the lines, including to indent > > lines when region is active, and often I may use it on the > > whole marked buffer. > > You barely use it, but you use it all the time ... and so do > I :) > > -- > underground experts united > https://dataswamp.org/~incal > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 13:00 ` Christopher Dimech 2021-05-09 16:27 ` Jean Louis @ 2021-05-10 1:25 ` Christopher Dimech 1 sibling, 0 replies; 35+ messages in thread From: Christopher Dimech @ 2021-05-10 1:25 UTC (permalink / raw) To: Christopher Dimech; +Cc: Help Gnu Emacs, Jean Louis In "outline-magic.el", Carsten wrote ;; Maybe the maintainers of the modes can be persuaded to set `outline-promotion-headings' ;; already as part of the mode setup. To get outline-minor-mode to be much like org-mode (perhaps org-minor-mode) would be most beneficial. We could also assimilate outline-magic.el in outline-minor-mode. > Sent: Monday, May 10, 2021 at 1:00 AM > From: "Christopher Dimech" <dimech@gmx.com> > To: "Jean Louis" <bugs@gnu.support> > Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org> > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > Do you have a list to what commands you find useful for outline-minor-mode? > Perhaps me can formalise them and update outline-minor-mode with new keys. > > Do not like the idea of an additional minor mode of a current minor mode. > > I would think that many struggle with the long and awkward keybindings > provided as default. > > > > > > --------------------- > Christopher Dimech > General Administrator - Naiad Informatics - GNU Project (Geocomputation) > - Geophysical Simulation > - Geological Subsurface Mapping > - Disaster Preparedness and Mitigation > - Natural Resource Exploration and Production > - Free Software Advocacy > > > > Sent: Monday, May 10, 2021 at 12:45 AM > > From: "Jean Louis" <bugs@gnu.support> > > To: "Christopher Dimech" <dimech@gmx.com> > > Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org> > > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > > > * Christopher Dimech <dimech@gmx.com> [2021-05-09 15:36]: > > > Would there be any interest in outline-minor-mode in remodeling for cycling using > > > <tab> and moving around with M-up, M-<down>, M-right, M-left, with same effect as > > > OrgMode. > > > > Just make key bindings to outline-cycle or outline-cycle-buffer functions. > > > > > These types of functionalities (org mode for programming languages) will make it much > > > easier to navigate and modify the code quite rapidly. > > > > That is why you can make your own key bindings for that. > > > > I would not like for example, when I invoke outline-minor-mode in > > Emacs Lisp mode to have TAB changed to anything else but what it is > > now (indent-for-tab-command &optional ARG). > > > > For example: C-c TAB can be set for outline-cycle-buffer and there you go. > > > > > > -- > > Jean > > > > Take action in Free Software Foundation campaigns: > > https://www.fsf.org/campaigns > > > > Sign an open letter in support of Richard M. Stallman > > https://stallmansupport.org/ > > https://rms-support-letter.github.io/ > > > > > > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 12:45 ` Jean Louis 2021-05-09 13:00 ` Christopher Dimech @ 2021-05-09 13:02 ` Christopher Dimech 2021-05-09 16:34 ` Jean Louis 1 sibling, 1 reply; 35+ messages in thread From: Christopher Dimech @ 2021-05-09 13:02 UTC (permalink / raw) To: Jean Louis; +Cc: Help Gnu Emacs I am not getting outline-cycle. How do you get that? > Sent: Monday, May 10, 2021 at 12:45 AM > From: "Jean Louis" <bugs@gnu.support> > To: "Christopher Dimech" <dimech@gmx.com> > Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org> > Subject: Re: outline-minor-mode and org-mode capabilities for programming languages > > * Christopher Dimech <dimech@gmx.com> [2021-05-09 15:36]: > > Would there be any interest in outline-minor-mode in remodeling for cycling using > > <tab> and moving around with M-up, M-<down>, M-right, M-left, with same effect as > > OrgMode. > > Just make key bindings to outline-cycle or outline-cycle-buffer functions. > > > These types of functionalities (org mode for programming languages) will make it much > > easier to navigate and modify the code quite rapidly. > > That is why you can make your own key bindings for that. > > I would not like for example, when I invoke outline-minor-mode in > Emacs Lisp mode to have TAB changed to anything else but what it is > now (indent-for-tab-command &optional ARG). > > For example: C-c TAB can be set for outline-cycle-buffer and there you go. > > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > > ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 13:02 ` Christopher Dimech @ 2021-05-09 16:34 ` Jean Louis 0 siblings, 0 replies; 35+ messages in thread From: Jean Louis @ 2021-05-09 16:34 UTC (permalink / raw) To: Christopher Dimech; +Cc: Help Gnu Emacs * Christopher Dimech <dimech@gmx.com> [2021-05-09 16:03]: > I am not getting outline-cycle. How do you get that? It closes the single node when open, or closes it when open. That is great. At least in Emacs Lisp that is what it does. Then you can open single node and close it with the TAB, but only if you are in the first line of the function. I also recommend: {M-x customize-variable RET outline-minor-mode-cycle RET} as that may be what you want. Users of Hyperbole package can just quickly activate the above hyperlinke in curly brackets, or just install Hyperbole: {M-x package-install RET hyperbole RET} -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/ ^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: outline-minor-mode and org-mode capabilities for programming languages 2021-05-09 8:53 outline-minor-mode and org-mode capabilities for programming languages Christopher Dimech 2021-05-09 9:11 ` Jean Louis @ 2021-05-09 14:02 ` Stefan Monnier via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 35+ messages in thread From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2021-05-09 14:02 UTC (permalink / raw) To: help-gnu-emacs; +Cc: emacs-orgmode > I have same elisp code and using outline-minor-mode. The good thing about it is that > the language highlighting is preserved. But navigating and moving the code around is > much more difficult than actually being in org-mode (I can use tab ate move code with > "M-<up>", M-<down>). The downside is that org-mode removes the highlighting for the > language. Is there any way out of this. Having flexibility of org-mode with language > highlighting preserved? I think you like to try Orgstruct or Outshine. Stefan ^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2021-05-11 2:26 UTC | newest] Thread overview: 35+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-05-09 8:53 outline-minor-mode and org-mode capabilities for programming languages Christopher Dimech 2021-05-09 9:11 ` Jean Louis 2021-05-09 12:35 ` Christopher Dimech 2021-05-09 12:45 ` Jean Louis 2021-05-09 13:00 ` Christopher Dimech 2021-05-09 16:27 ` Jean Louis 2021-05-09 17:35 ` Emanuel Berg via Users list for the GNU Emacs text editor 2021-05-09 17:50 ` Jean Louis 2021-05-09 18:02 ` Emanuel Berg via Users list for the GNU Emacs text editor 2021-05-09 19:09 ` Jean Louis 2021-05-10 1:49 ` Christopher Dimech 2021-05-10 6:22 ` Jean Louis 2021-05-10 6:53 ` Christopher Dimech 2021-05-10 7:32 ` Jean Louis 2021-05-10 8:32 ` Christopher Dimech 2021-05-10 9:29 ` Christopher Dimech 2021-05-10 9:31 ` Jean Louis 2021-05-10 10:01 ` Christopher Dimech 2021-05-10 11:43 ` Jean Louis 2021-05-10 12:52 ` Christopher Dimech 2021-05-10 17:05 ` Jean Louis 2021-05-11 2:00 ` Christopher Dimech 2021-05-10 10:27 ` Christopher Dimech 2021-05-10 11:53 ` Jean Louis 2021-05-10 12:32 ` Christopher Dimech 2021-05-10 16:07 ` Jean Louis 2021-05-11 2:26 ` Christopher Dimech 2021-05-10 8:46 ` Christopher Dimech 2021-05-10 9:15 ` Christopher Dimech 2021-05-10 9:33 ` Jean Louis 2021-05-10 6:08 ` Christopher Dimech 2021-05-10 1:25 ` Christopher Dimech 2021-05-09 13:02 ` Christopher Dimech 2021-05-09 16:34 ` Jean Louis 2021-05-09 14:02 ` Stefan Monnier via Users list for the GNU Emacs text editor
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).