Re: What is the status of ob-maxima.el? Is this a bug?
Ouch! I'm so used to using Maxima from its REPL that I forgot to test that... thanks and sorry! =/ Eduardo On Tue, 5 Dec 2023 at 07:36, Fraga, Eric wrote: > > I think ob-maxima will only output the actual explicit "output" of the > script, so something like > > #+begin_src maxima > print(2+3); > #+end_src > > should work. > > -- > : Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50
What is the status of ob-maxima.el? Is this a bug?
Hi list, what is the status of ob-maxima.el? Is it considered to be functional? If yes, what am I doing wrong? If no, should I file a bug report about the problem below? If I eval these two sexps and then execute the code block below them with `C-c C-c' - obs: I added some indentation for clarity, (setq org-confirm-babel-evaluate nil) (require 'ob-maxima) #+begin_src maxima 2+3; #+end_src then I get this "#+RESULTS:" block when the first "maxima" found in the $PATH is /usr/local/bin/maxima, that is a script that runs a Maxima compiled from the git sources a few days ago, #+RESULTS: | Adding | 118 | subdirectories | of | /usr/local/share/maxima/branch_5_47_base_312_gd5a35a21b/share | to | search | path. | | Adding | 0 | subdirectories | of | /home/edrx/.maxima| to | search | path. | | Loading | /home/edrx/.maxima/maxima-init.lisp ||| ||| | | Loading | /home/edrx/.maxima/maxima-init.mac ||| ||| | and I get this empty "#+RESULTS:" block #+RESULTS: when the first "maxima" found in the $PATH is /usr/bin/maxima, that is a script that runs the Maxima that comes with Debian 11 ("oldstable")... If I simply run the tests above in a shell the log is: /home/edrx(edrx:sc)# /usr/local/bin/maxima Adding 118 subdirectories of "/usr/local/share/maxima/branch_5_47_base_312_gd5a35a21b/share" to search path. Adding 0 subdirectories of "/home/edrx/.maxima" to search path. Loading /home/edrx/.maxima/maxima-init.lisp Loading /home/edrx/.maxima/maxima-init.mac Maxima branch_5_47_base_312_gd5a35a21b https://maxima.sourceforge.io using Lisp SBCL 2.1.1.debian Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) 2+3; (%o1) 5 (%i2) quit()$ /home/edrx(edrx:sc)# /home/edrx(edrx:sc)# /usr/bin/maxima Maxima 5.44.0 http://maxima.sourceforge.net using Lisp GNU Common Lisp (GCL) GCL 2.6.12 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) 2+3; (%o1) 5 (%i2) quit()$ /home/edrx(edrx:sc)# Thanks in advance, Eduardo Ochs http://anggtwu.net/eepitch.html
Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,
On Thu, 5 Jan 2023 at 12:19, wrote: > > Max Nikulin writes on Thu 5 Jan 2023 22:00: > > > Sometimes I start emacs in a terminal application to copy some > > "special" text (holding [Shift]). > > Great! It worked for the *Org Select* buffer. > > I did not know that trick. Hi Alain, here is what I am doing to try to understand those buffers using eev-isms. I am keeping this in one part of my notes, (org-mode) (debug-on-entry'read-char-exclusive) (eek "C-c C-e") (cancel-debug-on-entry 'read-char-exclusive) (fundamental-mode) and to make the "*Org Export Dispatcher*" appear I run the first three sexps with my favorite variant of `C-e C-x C-e'. Then I did this to pretty-print the buffer-list, (find-eppp (buffer-list)) and this to save the contents of that buffer in a variable: (with-current-buffer "*Org Export Dispatcher*" (setq o (buffer-string))) Cheers, Eduardo Ochs http://angg.twu.net/#eev
Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,
On Thu, 5 Jan 2023 at 08:06, Ihor Radchenko wrote: > > Eduardo Ochs writes: > > > sorry, I thought that that would be something like a 5-line change... =( > > > > A few messages again I mentioned that one of my plans for these holidays > > was to learn several techniques for debugging elisp that I've postponing > > learning for ages. I'll do that and then I'll try solving this problem > > again. > > One way could be M-x debug-on-entry read-char-exclusive and > then running the dispatcher. This will pause Elisp execution and leave > the export menu buffer actionable. > > However, I doubt that you can make much use of the buffer itself - it is > nothing but text. You need to read the source to understand the logic. > You can use the source code links Jean provided. Hi Ihor, thanks, good idea! A few days ago I had a similar idea, but mine was worse... I found, by running this, (find-orggrep "grep --color=auto -nH --null -e read-char-exclusive *.el") that `read-char-exclusive' appears in 29 places in the Org source, and I was thinking of replacing some of them by a `my-read-char-exclusive', and then set a breakpoint in `my-read-char-exclusive'... I have just tried running this in an Org file, (debug-on-entry'read-char-exclusive) (eek "C-c C-e") (cancel-debug-on-entry 'read-char-exclusive) and after running the first two sexps above with my favorite variant of `C-x C-e' the backtrace showed me that this (find-efunction 'org-export--dispatch-action "read-char-exclusive") is the occurrence that matters - the one inside `org-export--dispatch-action'. I'll play more with that soon! Cheers =), Eduardo Ochs http://angg.twu.net/#eev
Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,
On Tue, 3 Jan 2023, 09:23 Max Nikulin, wrote: > On 03/01/2023 17:01, Eduardo Ochs wrote: > > > > Can you send to me - here to the mailing list - a version of > > `org-export-dispatch', and also of other functions if needed, in which > > the parts that call `read-char-exclusive' are replaced by something > > non-blocking? > > Eduardo, I am sorry, but from my opinion it is too much. Perhaps you are > just not realizing that resources of developers are rather limited. > Getting rid of `read-char-exclusive' in Org menus requires significant > amount of work. Nobody argues that it would be a great improvement, but > it is necessary to make changes that are not obvious at first glance. It > would lead to confusing behavior otherwise. > > Jean might be happy with the posted mock-up. Unfortunately that code is > too far from been ready to be used for all users. E.g. it does not use > `org-export-registered-backends', not to mention that all menus in the > package should be consistent. It is OK to have a bunch of repetitive > code for a demo, but it can not be taken as is. > > Ihor dedicates a lot of time for development and maintaining of Org. > Other developers are significantly less active last months. Often > authors of code are not participating in discussions because several > years have been passed since that time and they are busy with other > projects. So your questions may noticeable efforts from other persons > unfamiliar with some code to "read" it for you. Org code is not ideal, > but it is rarely too obscure. Nobody intentionally adds obstacles that > hamper readability. Sometimes it is necessary to make decisions not > realizing actual consequences just to move forward. If you need code > friendly for beginners then find a friend who can rewrite the code in > the style you like (of course, it should be maintainable as well). > > At first I believed that on your own way you are just avoiding reading > comments and docstring in ox.el that are helpful to discover actual > functions in export backends that do the job. E.g. docstring of > `org-export-define-backend' and its usage in other files is rather > informative. > > I am lost what is your actual needs after your request to rewrite the > export dispatcher for you. > > After all, if you can not figure out which function is called by the > dispatcher, instrument for debugging some transcoder function and export > some file. You will get call stack. > > Be realistic, time and experience are limited resources, not all code > deserves blog posts. Source code is a communication channel as well. > Hi Max, sorry, I thought that that would be something like a 5-line change... =( A few messages again I mentioned that one of my plans for these holidays was to learn several techniques for debugging elisp that I've postponing learning for ages. I'll do that and then I'll try solving this problem again. Cheers =/, Eduardo
Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,
On Tue, 3 Jan 2023 at 06:47, Ihor Radchenko wrote: > > Eduardo Ochs writes: > > > (3) _is_ my experience with the Org mailing list. > > > > What I meant by "the developers like your questions" was roughly: > > "recognizing that that person deserves help, and giving him tools that > > would let him solve his problems in hours instead of in months or > > years". > > > > For example, in this thread > > > > https://lists.gnu.org/archive/html/emacs-orgmode/2021-12/msg00674.html > > To be fair, your another message copy got some replies: > https://list.orgmode.org/cads++6j+opnsa8po7_sbctmhog5v_bezkr6vbb1ecfhbprk...@mail.gmail.com/ > > > no one considered that if I was asking that then maybe it would be a > > good idea to make `org-export-dispatch' more hackeable by beginners... > > In any case, we are here now, after the discussion resurfaced. > > > For example, someone could have said "can you try this? Copy that > > function to other file, replace its lines foo and bar by the lines > > plic and bletch, and use the ideas in these two blog posts to debug > > and inspect its data structures"... but no, that didn't happen - I've > > asked lots of technical questions here over the years and never got > > detailed answers like that, only answers whose technical details _were > > kept as short as possible_, and whose explanations were much closer to > > "in English" than to "in Lisp". > > I recommend following up on the replies if you find them incomplete. > > There are no guarantees that exhaustive detailed replies will be given - > they take a lot of time to write and are often not necessary. > > > A few days ago I added subtitles to my video about "Org for > > Non-Users". The links are here, > > > > http://angg.twu.net/2021-org-for-non-users.html > > > > and some people will prefer to just read this: > > > > http://angg.twu.net/eev-videos/2021-org-for-non-users.vtt > > http://angg.twu.net/SUBTITLES/2021-org-for-non-users.lua.html > > > > It explains with examples how a "non-user" thinks, and it shows what I > > mean by "explanations in Lisp". > > I get it, but you cannot force me to reply like this. I simply do not > think this way - when I try to reply to questions on ML, I do it the way > I can. I cannot adapt the explanation style that is foreign to me. > > If you find something in mine (or other's) replies not clear, just ask > to clarify. Ok, let me try something else. Can you send to me - here to the mailing list - a version of `org-export-dispatch', and also of other functions if needed, in which the parts that call `read-char-exclusive' are replaced by something non-blocking? Thanks in advance =), Eduardo Ochs
Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,
On Sun, 1 Jan 2023 at 11:02, Ihor Radchenko wrote: > > Eduardo Ochs writes: > > > My conclusion was that Org is much harder to learn than I thought. > > It's easy to learn if: > > > > 1) you're a "user", or > > 2) you know a lot about debugging Emacs, or > > 3) the developers like your questions. > > I hope that (3) is not your experience with Org ML. If it is, I'd rather > say "developers understand questions". At least from my perspective. > Your approach is rather unusual for me, making it difficult to follow > even after detailed explanations. Hi Ihor, (3) _is_ my experience with the Org mailing list. What I meant by "the developers like your questions" was roughly: "recognizing that that person deserves help, and giving him tools that would let him solve his problems in hours instead of in months or years". For example, in this thread https://lists.gnu.org/archive/html/emacs-orgmode/2021-12/msg00674.html no one considered that if I was asking that then maybe it would be a good idea to make `org-export-dispatch' more hackeable by beginners... For example, someone could have said "can you try this? Copy that function to other file, replace its lines foo and bar by the lines plic and bletch, and use the ideas in these two blog posts to debug and inspect its data structures"... but no, that didn't happen - I've asked lots of technical questions here over the years and never got detailed answers like that, only answers whose technical details _were kept as short as possible_, and whose explanations were much closer to "in English" than to "in Lisp". A few days ago I added subtitles to my video about "Org for Non-Users". The links are here, http://angg.twu.net/2021-org-for-non-users.html and some people will prefer to just read this: http://angg.twu.net/eev-videos/2021-org-for-non-users.vtt http://angg.twu.net/SUBTITLES/2021-org-for-non-users.lua.html It explains with examples how a "non-user" thinks, and it shows what I mean by "explanations in Lisp". Cheers =/, Eduardo
Re: Export Org with Org concept -- Re: Problems with C-c C-e file.org,
On Mon, 19 Dec 2022 at 18:13, Jean Louis wrote: > > * Ihor Radchenko [2022-12-18 17:57]: > > andre duarte bueno writes: > > > > > When I try to export file.org using C-c C-e the window with the list of > > > possibilities appears. But it appears incomplete(visualization), so I try > > > to use the mouse to view the other export options and the system is > > > completely blocked. Every mouse click is captured and displayed in the > > > command window. And it doesn't allow you to do anything else. I am forced > > > to cancel the command without completing it. > > > Apparently C-c C-e is capturing all events and not just keyboard > > > events! > > That is not first complaint, right? I would say it is obvious that > such interface is not user friendly. > > > This is because we use `read-char-exclusive'. > > Don't use what is blocking Emacs. Apart from Org mode I have never > seen a package that blocks Emacs that I cannot even inspect keys. Hi Jean Louis, did you solve your problem? Did you find a way to replace the blocking code by something else? I stumbled on exactly the same problem some months ago, and it drove me nuts: https://lists.gnu.org/archive/html/emacs-orgmode/2021-12/msg00674.html Edrx 1 https://lists.gnu.org/archive/html/emacs-orgmode/2022-02/msg00098.html Ihor 2 https://lists.gnu.org/archive/html/emacs-orgmode/2022-02/msg00106.html Edrx 3 https://lists.gnu.org/archive/html/emacs-orgmode/2022-02/msg00111.html Ihor 4 http://angg.twu.net/e/org.e.html#org-export-dispatch My conclusion was that Org is much harder to learn than I thought. It's easy to learn if: 1) you're a "user", or 2) you know a lot about debugging Emacs, or 3) the developers like your questions. My holidays have just started, and I'm planning to work on (2). Btw, at some point I gave up trying to find the functions that the dispatcher calls, and I just defined this "function with a very short name" that [c]ompiles the current .org file to HTML: (defun c () (interactive) (eek "C-c C-e h h")) Refs: (find-eev-quick-intro "3. Elisp hyperlinks" "eek") (find-eev-quick-intro "7.4. Commands with very short names") http://angg.twu.net/eev-intros/find-eev-quick-intro.html#3 http://angg.twu.net/eev-intros/find-eev-quick-intro.html#7.4 Cheers, Eduardo Ochs http://angg.twu.net/eepitch.html http://angg.twu.net/2021-org-for-non-users.html
Re: Init.el
On Sat, 29 Oct 2022 at 16:08, Renato Pontefice wrote: > (...) Hi Renato, I've uploaded a version with some fixes of your init.el to: https://0x0.st/oYcy.txt I just added comment signs at the beginning of some lines, and I used TAB in most lines to make Emacs indent - i.e., position - them correctly. Here is a screenshot of how my fixed version of your init.el looks in Emacs with the colors that I use: https://i.ibb.co/4J2T6VQ/sshot.png Note that all comments appear in brown. My favorite elisp tutorial is the second link below: http://angg.twu.net/eev-intros/find-eev-quick-intro.html#2 http://angg.twu.net/eev-intros/find-elisp-intro.html Cheers, Eduardo Ochs http://angg.twu.net/eepitch.html
Re: Org, Hyperbole, and eev
On Thu, 29 Sept 2022 at 06:22, Jean Louis wrote: > > I am definitely interested, make prototype please. Just can't answer properly > on travel. Hi Jean Louis, Sorry, I will have to put that on hold until my holidays... I wrote a very primitive prototype, but I never had to write much code that generates text with text properties, my friends are not interested in playing with that together with me, and I don't know where to borrow ideas from, so adding each new small feature by myself is a struggle... and right now writing code "whose inner details don't matter" is exactly the opposite of my notion of fun... =( [[]], Eduardo Ochs http://angg.twu.net/#eev
Re: Org, Hyperbole, and eev
On Wed, 28 Sept 2022 at 03:17, Jean Louis wrote: > (...) Hi Jean Louis, I am not sure how to interpret the tone of your message. Does it mean that you are not interested in a prototype that works in one case? I.e., that you are only interested in something that has all the flexibility that you need? > I would like to have non-Org links so that my function for links > interpolates into a button. It works now in the presentation mode. I > would like to make links descriptive or non descriptive just as in > Org, so that it works in editing mode. You're hiding the technical details, and I don't know how to think in these terms, sorry! =( For me your "non-Org link" is a string composed of a few substrings concatenated, and each of these substrings is either without text properties or is built using "propertize" or "buttonize". In this message https://lists.gnu.org/archive/html/emacs-orgmode/2022-09/msg00725.html I referred to those substrings as "subsegments", but I don't know what is the correct term. I am trying to factor your problem into several small functions in a way that makes each of these small functions easy to test - with one-liners if possible, like I do in the eev source code - and if we do that factoring then the function that builds the "string composed of a few substrings concatenated" that I mentioned above will not call your rcd-template-eval and will not depend on the major mode... I have the impression that the hard part _now_ is to write that function that produces that string with text properties. Once we have that we will have a clearer notion of what are the "non-Org links" that we are dealing with, and it will be easier to think on the other functions. By the way, I mentioned here https://lists.gnu.org/archive/html/emacs-orgmode/2022-09/msg00725.html that the simple Org link that I inspected had about 8 subsegments with different text properties... Org links need all that because they have to handle correctly insertions and deletions at several points, cutting and pasting, "following", conversion to fundamental mode, etc, etc... I have the impression that we can start with a prototype in which our prototype-ish non-Org links have only three subsegments, but you will have to accept that in that prototype the links won't have all the features that you want... Cheers, Eduardo Ochs http://angg.twu.net/#eev
Re: Org, Hyperbole, and eev
On Tue, 27 Sept 2022 at 18:59, Jean Louis wrote: > (...) What did you do to inspect an Org link? Here's what I just tried: I created a file /tmp/foo.org containing " [[http://a/b/][ab]]\n"; - i.e., a space, a link, and a newline - and then I marked the whole buffer and ran `M-1 M-x find-eregionpp' on it to pretty-print the region as a string with properties, with the flag `print-circle' turned on... see: (find-efunction 'find-eregionpp) http://angg.twu.net/eev-current/eev-blinks.el.html#find-eregionpp Apparently Org divided that file into 8 subsegments, each one with different text properties... and they mention all these keywords: face follow-link font-lock-multiline fontified help-echo highlight htmlize-link intangible invisible keymap mouse-2 mouse-3 mouse-face org-find-file-at-mouse org-link org-linked-text org-open-at-mouse rear-nonsticky I _think_ that it should be possible to make this ⟦ (hyperscope-wrap-eev "Hyperbole DEMO file" '(find-hyperbolefile "DEMO")) ⟧ into a kind of button using only three subregions with different text properties: a first invisible region with this, ⟦ (hyperscope-wrap-eev " then a visible region with "button actions", with this, Hyperbole DEMO file and then another invisible region with: " '(find-hyperbolefile "DEMO")) ⟧ Let me play with this idea for a bit - I'll send some code as soon as possible! Cheers =), Eduardo
Re: Org, Hyperbole, and eev
On Tue, 27 Sept 2022 at 12:11, Jean Louis wrote: > (...) Hi Jean Louis, > Instead of: > > > (find-evardescr 'hkey-alist) > > I would like to see visually: > > "Description of Emacs Lisp function `hkey-alist'" In cases like that there would be some key sequence that parses the text and the text properties around point and produces a sexp that goes to the target of the link when executed. Let me call that sexp the "back-end" of the link. I did play with some ways to buttonize back-end sexps, and with some ways to parse the text around point to generate these back-end sexps, but I didn't find those things much fun, and in all the cases I ended up finding nice ways to solve my problems with just explicit sexps, without hiding them behind a title. So I postponed the problem behind your question - and I will deal with it again when someone who wants "back-end sexps hidden behind titles" asks me for help, or asks me to work together on their ideas. > There must be some way of quickly generating above links, do you have > such? > > Let us say you are in buffer A, you go to Emacs Lisp file at line 134, and > you just press there a key, and link is inserted in buffer A, leading > to Emacs Lisp file at line 134, you have that? Yes, and I am working in a way to do that that requires fewer keys. I submitted it to the EmacsConf2022: http://angg.twu.net/emacsconf2022-kla.html and I am asking my friends to test it. I haven't made commented screenshots for it - like these ones: http://angg.twu.net/eepitch.html#test-blocks yet, so right now the best way to understand how it works is to try the "Try:"s in the sections 1 and 8 of its docs: http://angg.twu.net/eev-current/eev-kla.el.html#intro Cheers, Eduardo Ochs http://angg.twu.net/#eev
Re: Org, Hyperbole, and eev
On Mon, 27 Jun 2022 at 01:11, Robert Weiner wrote: > > These are Action buttons run by the action button type defined via > the defib macro in the “hibtypes.el” file. Just search for ‘defib > action’ in there. You can invoke its implicit button type function > from Lisp as (ibtypes::action) if I recall. Hi Robert and other people, I was finally able to understand a significant part of what happens when we type M-RET on an action button like with hyperbole-mode active... my notes are here - for the sake of completeness; I don't expect them to be readable - (code-c-d "hyperbole" "~/.emacs.d/elpa/hyperbole-8.0.0/") (require 'hyperbole) (hyperbole-mode 0) (find-hyperbolefile "DEMO") (find-hyperbolefile "DEMO" "Action Key is {M-RET}") (find-hyperbolegrep "grep -nH --null -e M-RET *") (find-efunction 'hkey-initialize) (find-efunction 'hkey-initialize "Bind the Action Key to {M-RET}") (find-ekeymapdescr hyperbole-mode-map) (find-ekeymapdescr hyperbole-mode-map "M-RET") (find-ekeymapdescr hyperbole-mode-map "M-RET" "hkey-either") (find-efunction 'hkey-either) (find-efunction 'assist-key) (find-efunction 'assist-key-internal) (find-efunction 'action-key) (find-efunction 'action-key-internal) (find-efunction 'hkey-execute) (find-efunction 'hkey-execute "hkey-alist") (find-evardescr 'hkey-alist) (find-eppp hkey-alist) (find-eppp hkey-alist "(hbut:at-p)") (find-evariable 'hkey-alist) (find-evariable 'hkey-alist "If on a Hyperbole button") (find-evariable 'hkey-alist "If on a Hyperbole button" "(hbut:at-p)") (find-efunction 'hbut:at-p) (find-efunction 'hbut:at-p "ebut:at-p") (find-efunction 'hbut:at-p "ibut:at-p") (find-efunction 'ebut:at-p) (find-efunction 'ebut:get) (find-efunction 'ibut:at-p) https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/msg00765.html ^ mentions ibtypes::action and defib action (find-efunction 'defib) (find-hyperbolegrep "grep --color=auto -nH --null -e defib *.el") (find-hyperbolegrep "grep -a -nH --null -e defib hibtypes.el") (find-hyperbolefile "hibtypes.el" "(defib action") (progn (find-hyperbolefile "hibtypes.el" "(defib action") (end-of-defun) (setq ee-defib-defun (ee-last-sexp)) ) (find-estringee-defib-defun) (find-epp (read ee-defib-defun)) (find-eppm (read ee-defib-defun)) (find-efunction 'htype:create) (find-efunction 'htype:symbol) (htype:symbol 'action 'ibtypes) (find-efunction 'ibtypes::action) (find-efunctionpp 'ibtypes::action) (load "hibtypes.elc") (load "hibtypes.el") (find-efunctionpp 'ibtypes::action) (hyperbole-mode 1) (debug-on-entry 'ibtypes::action) (eek "2* C-e ") (eek " C-e M-RET") (hyperbole-mode 0) (find-efunction 'ibut:at-p) (find-efunction 'ibut:at-p "(funcall itype)") (find-eppp (htype:category 'ibtypes)) (find-hyperbolegrep "grep -a -nH --null -e defib hibtypes.el") (find-efunction 'symtable:add) (find-evardescr 'symtable:ibtypes) (find-evariable 'symtable:ibtypes) I still don't understand well the code of ibut:at-p between the beginning and the point in which it calls (funcall itype), and I also don't understand well the code of ibtypes::action... Anyway, we are clearly using different notions of simplicity - see: https://lists.gnu.org/archive/html/hyperbole-users/2020-09/msg00013.html and I find it enviable that you can have that kind of complexity under the hood and still have lots of users that agree that Hyperbole is "simple"... Most people find eev very weird, and I have the impression that I wouldn't have half of my (few) users if I had code like that in eev. If the people who like to look under the hood try to understand how M-e in eev works they will end up trying to understand how (forward-sexp -1) works, and then they will read the comments of scan-sexps in syntax.c... syntax.c is impeccably well-written, and they will probably feel that their time was very well spent, and that their curiosity has lead them to very good places. =\ Exhausted cheers, Eduardo Ochs http://angg.twu.net/#eev
Re: Org, Hyperbole, and eev
On Sun, 26 Jun 2022 at 21:50, Robert Weiner wrote: > > So here is a simple implementation that is not unlike your own > though the functions are a bit simpler and more clearly documented > _without a listing of every possible test case type_ and requires > neither Hyperbole nor Org until you want to activate things as > buttons: Hi Robert, I think that the part in "_..._"s above deserves a detailed answer. I started using GNU/Linux in the mid-90s. Before that my favorite languages were Icon and Forth. In Forth I could do AMAZING things in less than 50 lines of code, but my programs would usually become confusing and unmanageable when they grew bigger than that. There is a famous book by Fred Brooks called "The Mythical Man-Month", and one of its chapters is called "Plan to Throw One Away": https://wiki.c2.com/?PlanToThrowOneAway I took that slogan seriously. Most of the time when I realized that something that I was doing by hand could be automated I would write a first attempt to automate it - _as a prototype_, that I regarded partly a program and partly as a way to help me think how that task could be structured, and that would probably be "thrown away" if I needed a cleaner solution later. In Forth it was very easy to implement both strange interfaces and little languages, in this sense: https://wiki.c2.com/?LittleLanguage In Emacs less so, but I could still do lots of funny things using eval-last-sexp to use sexps as buttons. When we are writing throwaway code "planning to throw one away" then using tests in comments is a very good way to document the code. And when I rewrite my prototypes I usually prefer to document them using text ***AND*** executable examples rather than just text. One of the effects of using this style is that the users of eev see that they can use that style in their notes too - and with that their notes become much closer to being "executable notes", in this sense, http://angg.twu.net/eev-intros/find-here-links-intro.html than they would be if they believed that they had to write the docs of their functions as just text. You are sort of saying that having tests in comments is bad style. Well, it's not. =/ [[]], Eduardo Ochs http://angg.twu.net/#eev
Re: Org, Hyperbole, and eev
On Sun, 26 Jun 2022 at 21:50, Robert Weiner wrote: > > So here is a simple implementation (...) Hi Robert, thanks - but most functions of eev that deal with youtube URLs are clearly marked either as "this is part of a 5-minute hack" or as "this is part of an ex-5-minute hack that grew too much", so people are encouraged to rewrite them... What are the functions of Hyperbole that handle sexp buttons in the <...> syntax? Are they called by an "ebut:..." function, by an "ibut:..." function, or what? Do you remember the names of the lower-level functions that run <...> buttons? [[]], Eduardo Ochs http://angg.twu.net/#eev
Re: Org, Hyperbole, and eev
On Sun, 26 Jun 2022 at 17:24, Robert Weiner wrote: > > That was not the offer. The offer was to show you how to implement a > discrete eev command using another framework, possibly simplifying > its implementation. Hopefully, from seeing the code used to do this, > you could dig in yourself and follow the flow to whatever level you > like. Hyperbole, for example, has been implemented across years of > part-time work. Of course, it has complexities in its implementation > and if the non-abstract parts of that interest you, then use edebug > or trace commands to explore the code flow but I wouldn't expect > anyone to write that out for you. Hi Robert, That's bad news. In the last years I became a specialist on helping people with the "non-abstract parts", usually via chat... we discuss until we find together what are the parts that are not clear to them, them we write tests that show how those parts work, and then we go back to the high-level functions. In eev the two sexp hyperlinks below (find-efunction 'hkey-initialize) (find-efunction 'hkey-initialize "Bind the Action Key to {M-RET}") point to the source code of `hkey-initialize', but the second one is a "refinement" of the first one in this sense: (find-refining-intro) http://angg.twu.net/eev-intros/find-refining-intro.html I often use sequences of sexp hyperlinks, with and without refinements, to record an "explanation" of how something is done. For example, this block (code-c-d "hyperbole" "~/.emacs.d/elpa/hyperbole-8.0.0/") (find-hyperbolefile "DEMO") (find-hyperbolefile "DEMO" "Action Key is {M-RET}") (find-hyperbolegrep "grep -nH --null -e M-RET *") (find-efunction 'hkey-initialize) (find-efunction 'hkey-initialize "Bind the Action Key to {M-RET}") (find-ekeymapdescr hyperbole-mode-map) (find-ekeymapdescr hyperbole-mode-map "M-RET") (find-ekeymapdescr hyperbole-mode-map "M-RET" "hkey-either") (find-efunction 'hkey-either) (find-efunction 'assist-key) (find-efunction 'assist-key-internal) (find-efunction 'action-key) (find-efunction 'action-key-internal) (find-efunction 'hkey-execute) (find-efunction 'hkey-execute "hkey-alist") (find-evardescr 'hkey-alist) (find-eppp hkey-alist) (find-evariable 'hkey-alist) (find-evariable 'hkey-alist "If on a Hyperbole button") (find-efunction 'hbut:at-p) (find-efunction 'hbut:at-p "ebut:at-p") (find-efunction 'hbut:at-p "ibut:at-p") (find-efunction 'ebut:at-p) (find-efunction 'ebut:get) (find-efunction 'ibut:at-p) is an attempt to understand how M-RET treats hkey-alist as a kind of program to be run... How would you rewrite the sexps above as Hyperbole buttons? I downloaded a local copy of (find-hyperbolefile "FAST-DEMO") (find-hyperbolefile "FAST-DEMO" "GNU Hyperbole Videos") (find-hyperbolefile "FAST-DEMO" "Overview and Demo") (find-hyperbolefile "FAST-DEMO" "https://youtu.be/WKwZHSbHmPg";) with (find-youtubedl-links nil nil "WKwZHSbHmPg" nil "hoandd") Docs: (find-efunction 'find-youtubedl-links) and I found - via the transcript - (find-yttranscript-links "hoandd" "WKwZHSbHmPg") Docs: (find-efunction 'find-yttranscript-links) that starting on 5:14 (find-hypoanddvideo "05:14" "and so it's very easy to create these") (find-hypoanddvideo "05:17" "live") (find-hypoanddvideo "05:18" "uh interactive tutorials if you want") you say that you can use Hyperbole buttons to create interactive tutorials... I do that with eev all the time, but my "buttons" are sexps. Imagine for a moment that a group of, say, 42 Emacs users asks you to prepare a video tutorial on how exactly hkey-alist works, because they want to create their own extensions - button types? - and they think that it would be nice, and useful to the world, etc, etc, if you could record a video explaining that... would you still answer something like this, "then use edebug or trace commands to explore the code flow but I wouldn't expect anyone to write that out for you" or would you use Hyperbole to create an interactive tutorial explaining the details, and record a video demo-ing it? [[]] =/, Eduardo Ochs http://angg.twu.net/#eev
Re: Org, Hyperbole, and eev
On Sun, 26 Jun 2022 at 15:23, Robert Weiner wrote: > > Maybe if you could pick a single eev function that you think could > be implemented with Org and Hyperbole and pointed us to the > documentation for that, then we could show you an equivalent one > using these packages and begin to give you a better sense of how you > would go about leveraging what has been built. You document > everything in detail, so this should be pretty simple. I am not sure if I understood your proposal correctly, but let me propose three tasks that would be pretty natural in eev-land... In all cases below "explain" means "explain step by step, with links to the source code and to the docs, and with sexps that inspect the data structures". 1) explain what happens when we type M-RET on this button: "subr.el" 2) explain what happens when we type: C-h h d d 3) suppose that we have a function that plays a local copy of your video "GNU Hyperbole - Overview and Demo". Let's use this fake function instead of a real one: ;; Test: (fake-play-oand "2:34") ;; (defun fake-play-oand (time &rest comments) (move-beginning-of-line 2) (insert (format "[Play Overview and Demo from: %s]\n" time))) Explain how you would implement buttons - choose your favorite syntax for them - that play "GNU Hyperbole - Overview and Demo" starting from a given timemark. Is that a good starting point? Note the unusual meaning for "explain"... how would you use Hyperbole to prepare these "explanations"? > From my perspective, I do really like your idea of replayable > notebooks for training and interaction purposes. And you have > certainly made that easy to use via eev. But your implementation > could use much better organization and abstraction which would > likely greatly reduce the code size as well. You should separate out > computation of what you want to display from how and where you will > display it as one technique. I'm very interested in seeing your suggestions! Can you be more concrete? [[]], Eduardo Ochs http://angg.twu.net/#eev
Re: Org, Hyperbole, and eev
On Sun, 26 Jun 2022 at 13:29, Robert Weiner wrote: > Hi Eduardo: > > I really think that you are confused in saying that Hyperbole and Org are > hacker-unfriendly. Yes, they are targeted at users who don't have to > understand the programming, but if you do understand Lisp programming well, > the interactive features are available as Lisp functions in almost all cases, > so you simply have to dive in, find the functions you want and utilize or > change them. > > In fact, Hyperbole offers 'action implicit buttons' that utilize > angle-bracket syntax to turn any Lisp function (or hyperbole button type call > or variable reference) into a hyperbutton that runs the function with > arguments or displays the variable, e.g. "~/.org/my-org-file.org">. > > With Hyperbole, much of the behavior is factored into class-like libraries > with the 'methods' alphabetized and separated into public and private > groupings. Now some of this code is complex in order to handle many contexts > and make things simple to the user but that is a matter of you understanding > this complexity if you want to hack on it. > > I'm not sure what else you could ask for in packages. Hi Robert, let me see if I can find something useful to say... Most of the people that I know who became active users of eev were "beginner programmers" when they started using eev - by "beginner programmers" I mean that their mental buffers were still quite small, and they couldn't understand well functions that were more than a few lines long. I wanted to make eev more accessible to people like them, and I treated their feedback very seriously. One of the techniques that I used to make eev more accessible to them is described in this video, http://angg.twu.net/find-elisp-intro.html (find-1stclassvideo-links "2022findelispintro") (find-2022findelispintrovideo "14:36") from 14:36 onwards - "put several similar examples close to one another, starting by the most basic ones". I treated that technique as "obvious" for many years - I just used it in many places, and I thought that the users would notice that pattern, and start to use it in their own notes. That didn't work, and I saw that I had to spell out that technique explicitly, and repeat it often. When I asked you questions about how to create eev-style sexps that would behave as hyperbole-style buttons, in some of the e-mails that I point to here, http://angg.twu.net/hyperbole.html I was signaling that my mental buffers were almost full... at that point explanations in English helped me very little, and I was trying to write "several similar examples close to one another, starting by the most basic ones" to factor your code conceptually via tests. I _still_ think that your buttons and menus are hacker-unfriendly. The source code is available, yes, but I spent several evenings trying to understand them in my "non-user" way, and I got a mental buffer overflow instead of enlightenment... and I also spent many hours writing e-mails to the Hyperbole mailing list, but the answers left me very frustrated. Hope that helps, =/ Eduardo Ochs http://angg.twu.net/#eev
Org, Hyperbole, and eev
Hi all, this message is slightly off-topic, and a shameless plug... Eev can do many things that Org and Hyperbole and do, but it makes very little sense to people who can play the role of "users" well, in the sense of people who can "use" Emacs packages without looking at the elisp source and hacking it, i.e.: reading the source of the package, inspecting and understanding its data structures, and creating sexps that call the package's functions directly... Eev still has a couple of parts whose data structures are hard to inspect. I don't regard these parts as "real" bugs, but I do regard them as hugely embarassing - and I have just fixed one of them: `find-here-links', that is explained in this section of the main tutorial, http://angg.twu.net/eev-intros/find-eev-quick-intro.html#4.1 and in this other tutorial: http://angg.twu.net/eev-intros/find-here-links-intro.html The way to run `find-here-links' in debug mode is explained here, http://angg.twu.net/eev-current/eev-hlinks.el.html in the second part of the " Commentary:" at the top - look for "Debug mode". As I mentioned in the other thread https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/msg00524.html https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/threads.html#00524 and in these pages, http://angg.twu.net/2021-org-for-non-users.html http://angg.twu.net/find-elisp-intro.html http://angg.twu.net/eev-wconfig.html http://angg.twu.net/hyperbole.html I find Org and Hyperbole difficult mainly because they are hacker-unfriendly. It _may be_ that some of the people who said that they find Org very hard in this thread https://lists.gnu.org/archive/html/emacs-devel/2022-06/threads.html#00186 would also benefit from a bit more of hacker-friendliness... and so it would be great if more ideas could flow between Org, eev, and Hyperbole. Cheers and sorry the noise =P, Eduardo Ochs http://angg.twu.net/#eev
Re: Org and Hyperbole
On Thu, 23 Jun 2022 at 22:47, Robert Weiner wrote: > > I am the author of Hyperbole and would be happy to answer questions > concerning Hyperbole today (so you don't have to answer based on > experience from the 1990s). Hyperbole has been modernized for use > with Org mode and Emacs 28 and continues to develop. There are videos > that demonstrate some of its features in simple, understandable ways. > Hyperbole is a single Emacs package that can be installed and > uninstalled quickly for testing. It is largely a global minor mode, > so you can also disable it quickly if you ever care to. In 20 minutes > you can get through the builtin, interactive demo and be on your way > to basic yet powerful usage. We have listened to much feedback in the > last few years and made it much more approachable. Hi Robert, can you show us a sexp that will disable Hyperbole completely, and that we can execute with our favorite variants of `C-x C-e'? I know that this page (info "(hyperbole)Default Hyperbole Bindings") has this paragraph, {C-h h} {C-h h X} Hyperbole Mini Menu: Enable Hyperbole minor mode and invoke the Hyperbole minibuffer menu, giving access to many Hyperbole commands. This is bound globally. Use {C-h h X} to close the Hyperbole minibuffer menu and disable Hyperbole minor mode. and apparently these sexps toggle Hyperbole minor mode, (hyperbole-mode 1) (hyperbole-mode 0) but even when I toggle it off the global binding for `C-h h' remains active... Thanks in advance. My notes on Hyperbole are here, http://angg.twu.net/hyperbole.html and there is some material on why I find Hyperbole too "magic" in these two links: http://angg.twu.net/2021-org-for-non-users.html http://angg.twu.net/eev-wconfig.html [[]], Eduardo Ochs http://angg.twu.net/#eev
Re: Org and Hyperbole
On Wed, 22 Jun 2022 at 11:36, Bill Burdick wrote: > > Here's a hyperbole-org integration that lets you use org-mode tables outside > of org-mode files. Shift-middle-click a "recalc" button and it will > recalculate the table right under it (this idea is from an old version of the > Oberon environment I wrote in Java, by the way). > > Here's the code: > > (defun bill/calc (end) > (goto-char end) > (re-search-forward "\n") > (when (org-at-table-p) > (org-table-analyze) > (let* ((table-start (point)) >(rows (1- (length org-table-dlines))) >(table-end (re-search-forward "\n" nil t rows)) >(inside (<= table-start action-key-depress-prev-point table-end))) > (when inside > (goto-char action-key-depress-prev-point) > (org-table-maybe-eval-formula)) > (goto-char table-start) > (call-interactively 'org-table-recalculate) > (org-table-align > > (defib recalc () > "recalculate a table" > (save-excursion > (let* ((pos (point)) >(eol (progn (re-search-forward "\n") (point))) >(bol (progn (re-search-backward "\n" nil t 2) (1+ (point >(start (progn (goto-char pos) (re-search-backward "<" bol t))) >(end (progn (goto-char pos) (re-search-forward ">" eol t > ;;(message "pos: %s, prev: %s" (point) action-key-depress-prev-point) > (and start end (string-match " ].*" (buffer-substring start > end)) >(hact 'bill/calc end) > > Here's an example table you can put anywhere. Just shift-middle-click on it > to recalculate the org-mode table. Also, if you type a formula (and keep the > cursor on the same line) and then shift-click recalc, it'll handle the > formula: > > > | a | 12 | > | a | 5 | > #+TBLFM: @1$2=3*4::@2$2=2+3 Hi Bill, can I ask you for help on something that looks easy but that I'm not being able to do (due to temporary braindeadness)? How do we reimplement your button as a sexp that can be run with C-e C-x C-e? In eev all "buttons" are simply sexps that can executed by variants of eval-last-sexp - as explained here: http://angg.twu.net/eev-intros/find-eev-quick-intro.html#3 I'm trying to translate your to "eev style", but I'm failing... Thanks in advance! Eduardo Ochs http://angg.twu.net/#eev
Re: Org and Hyperbole
On Mon, 20 Jun 2022 at 12:28, Russell Adams wrote: > Juan, > > I've often wondered the same thing. I've looked at Hyperbole several > times. They have been great at advertising when a new release > occurs. Yet I find that I can't really find a useful feature in it > that I don't get from Org-mode. > > Is there some keen feature I'm missing? What's the use case for > Hyperbole if you're already an Org-mode user? Hi Russell, Some years ago I tried to integrate Hyperbole and eev and 1) I failed miserably, and 2) I ended up with the impression that Hyperbole is meant to be "used", not to be "hacked"... for example, in Hyperbole the action of a button like this, {C-h h d a} is to emulate what happens when the user types `C-h h d a'. This button works exactly as expected; eev implements something similar, but in a very simplistic, and slightly buggy, way: when we run this in eev (eek "C-h h d a") it simply runs this, (execute-kbd-macro (read-kbd-macro "C-h h d a")) that just inserts an "a". The details are here, in the second part, after the blank lines: https://lists.gnu.org/archive/html/hyperbole-users/2020-09/msg00013.html Hyperbole has some amazing features, but its code needs to be refactored to make more parts of it easier to use from Lisp... someone needs to do that, and this someone won't be me, as I'm burnt out. =( My links about my attempts to learn Hyperbole are here: http://angg.twu.net/hyperbole.html [[]], Eduardo Ochs http://angg.twu.net/2021-org-for-non-users.html
Re: Eev-wconfig.el etc etc, or: "Exercise: Learn Org!"
On Mon, 30 May 2022 at 00:20, Ihor Radchenko wrote: > It would be interesting to hear about the outcome and the student > feedback. > > Best, > Ihor The workshop was by chat (Telegram), and only one student came. He installed Emacs, Mpv, downloaded a copy with subtitles of the eev-wconfig video, and then followed the first sections of these two tutorials, http://angg.twu.net/eev-intros/find-eev-quick-intro.html http://angg.twu.net/eev-intros/find-elisp-intro.html and this video until 48:30, http://angg.twu.net/.emacs.videos.html#2022eevwconfig doing practically all the exercises. He told me that two of the five tests of `find-wget' didn't work as a described in the video... I need to debug that - my guess is that I need to add a line to the configs to make the output of wget.exe be interpreted as UTF-8 by default - and at one point he called an external program from Emacs and Emacs crashed. He started Emacs again and recovered some backup files, but then he had to leave. He asked me if we could continue on Wednesday. We haven't yet reached the part in which he learns how to index local videos, but we will probably do that on Wednesday. I think that that was quite good for three hours. =) Cheers, E.
Re: Eev-wconfig.el etc etc, or: "Exercise: Learn Org!"
On Sat, 28 May 2022 at 01:52, Ihor Radchenko wrote: > (...) Hi Ihor, I think that you are underestimating how alien eev is for most people. Let me suppose that what you mean by your comments is this: "I've spent N minutes watching this video - for N big - and I feel that I've learned very little! What is the best way to learn a lot of eev in M minutes, for M very small?" then the answer is: follow the main tutorial, that is here: http://angg.twu.net/eev-intros/find-eev-quick-intro.html Let me just stress some points that are not obvious at all. 0) You can turn eev-mode on and off with M-x eev-mode. The technical details are here: http://angg.twu.net/eev-intros/find-eev-intro.html#1 (find-eev-intro "1. `eev-mode'") 1) Following a link to a video for which we have a local copy usually takes about three seconds. _For me_ this means that I can use links to videos as links to _images_. You complained that this entry in an index makes no sense: (find-2022eevwconfigvideo "15:50" "6.1, 6.2, 6.3, 6.4") When I execute it with `M-e' it shows - in just three seconds - a page of text with lots of things, and the comment "6.1, 6.2, 6.3, 6.4" in the sexp hyperlink indicates that the most important things in that page of text are the items 6.1 to 6.4. 2) The main principle of eev is "take executable notes of everything that you do". The easiest part of "take executable notes" is "copy to your notes all the links that you find interesting". So, if you stumble on a link to a position in a video that looks slightly interesting, copy it to your notes; if you find a link in, say, this tutorial, (find-emacs-keys-intro) (eek "M-2 M-j") that looks interesting, copy it to your notes. 3) There are ways to create index to videos in Org, but few people use them. Years ago I tried to learn this, but I gave up after a while: https://lists.gnu.org/archive/html/emacs-orgmode/2020-01/msg7.html Also, the organizers of the last EmacsConf were using some tools - that i also didn't learn - the create indexes and transcripts for the videos of the conference. Anyway, tomorrow I will meet with a group of three or four students that are interested in learning Emacs and eev. They use Windows and they have never used Emacs before, so we probably won't be able to do much of this exercise: http://angg.twu.net/eev-wconfig.html#learn-org ...which means: sorry for the off-topic-ish e-mails that were about eev and not about Org, but I hope that we will reach the part in which they'll start to index Rainer Koenig's videos in a few days... Cheers, Eduardo Ochs http://angg.twu.net/#eev
Re: Eev-wconfig.el etc etc, or: "Exercise: Learn Org!"
ask > you perform using eev. No need to side track explaining Elisp syntax. No > need to show troubleshooting. No need to show things users "are not > supposed to understand". No need to show initial configuration with all > possible caveats. There are lots of short demos scattered through the videos... here's one that has subtitles. If you run this # Index: http://angg.twu.net/.emacs.videos.html#2022pict2elua # Info: (find-1stclassvideo-links "2022pict2elua") exportS=$HOME/snarf mkdir -p $S/http/angg.twu.net/eev-videos/ cd $S/http/angg.twu.net/eev-videos/ wget -nc http://angg.twu.net/eev-videos/2022-pict2e-lua.mp4 wget -nc http://angg.twu.net/eev-videos/2022-pict2e-lua.vtt mpv $S/http/angg.twu.net/eev-videos/2022-pict2e-lua.mp4 then you can use the keys [ and ] to make mpv change the playing speed, and you can watch the full 8-minute video in just one or two minutes. If you prefer to watch it on Youtube the link is this one: http://www.youtube.com/watch?v=hiHsUhGVLGM > No need to side track explaining Elisp syntax. No > need to show troubleshooting. No need to show things users "are not > supposed to understand". No need to show initial configuration with all > possible caveats. Can you explain these "no need"s? Except for the red stars and anchors _all_ the "markup language" of eev consists of explicit sexps... > You argue that Org is a "black box", but your code is also a black box > in a sense that one needs to read the "wconfig" files (AFAIU). How is it > different compared to Org written in Elisp following the usual > documentation conventions described in the Elisp manual? Eev-wconfig is only needed for configuring things on Windows. On, say, Debian, people only need to install google-chrome (obs: it's easy to use other browsers instead), and do this: sudo apt-get install wget xpdf pdftotext mpv after that all the features will work. Here are two examples of cases in which I stumbled on black boxes that I never managed to open properly, one in Org and one in Hyperbole: https://lists.gnu.org/archive/html/emacs-orgmode/2021-12/msg00674.html https://lists.gnu.org/archive/html/emacs-orgmode/2022-02/threads.html#00098 https://lists.gnu.org/archive/html/hyperbole-users/2020-09/msg00012.html Cheers, Eduardo Ochs http://angg.twu.net/#eev http://angg.twu.net/#eev-blogposts
Eev-wconfig.el etc etc, or: "Exercise: Learn Org!"
Hi all, I made a video that is mainly for people who are new to Emacs and who are using M$ Windows, and it ends with an exercise that is roughly this: "...now download a .zip file with Rainer Koenig's videos from <http://angg.twu.net/eev-wconfig.html#learn-org>, unpack it somewhere, and use eev to create an index of the video that you've watched, with pointers to the parts that you will need to re-watch many times"... The best way to watch the video is to download it and its subtitles by doing this: wget http://angg.twu.net/eev-videos/2022-eev-wconfig.mp4 wget http://angg.twu.net/eev-videos/2022-eev-wconfig.vtt and then watch the local copy with a video player. The second best way to watch it is to access its index, here, http://angg.twu.net/.emacs.videos.html#2022eevwconfig and click on the timestamps of the parts that look interesting to play the video on Youtube starting from that position. The page about the video and all the ideas behind it is this one: http://angg.twu.net/eev-wconfig.html All feedback welcome! Cheers, Eduardo Ochs http://angg.twu.net/#eev
Re: Org for non-users, part 2: `C-c C-e', a.k.a. `org-export-dispatch'
On Mon, 7 Feb 2022 at 10:55, Ihor Radchenko wrote: > > What are the recommended ways to abort org-export-dispatch without > > letting it destroy the "*Org Export Dispatcher*" window and its > > buffer? > > You cannot. That window acts similarly to transient, but simpler. You > can think of *Org Export Disipatcher* as an extended help for > read-char-exclusive. > > Best, > Ihor > Hi Ihor, What do you mean by "you cannot"? I was expecting an answer like this: That's difficult to do, but the temporary buffer is generated by the function `org-foo-bar'... you can try to make a copy of `org-foo-bar' called `org-foo-bar-hacked-version', add your own debugging functions to that copy - suggestion: the lines 42 and 99 are good places for that - and then you can change the function `org-plic-ploc', that is called by `org-export-dispatch', to make it call `org-foo-bar-hacked-version' instead of `org-foo-bar'... One possible meaning of "you cannot" is: Org is NOT MEANT to be explored in that way, and this "is not meant to" is in a very strong sense. The last time that a person gave technical information of that kind in the mailing list was 4 or 5 years ago, and we banished her from the community and excommunicated her. Her name shall not be mentioned. Frustrated cheers =(, Eduardo Ochs http://angg.twu.net/#eev
Org for non-users, part 2: `C-c C-e', a.k.a. `org-export-dispatch'
Hi all, a few weeks ago I recorded a video called "Org for non-users" - link: http://angg.twu.net/2021-org-for-non-users.html that was about a way to understand some of the data structures that are used in the support for code blocks. Now I would like to do something similar with the exporter, but I am stuck at the first step... When I run `M-x org-export-dispatch' or `C-c C-e' it creates a second window whose mode line says "*Org Export Dispatcher*" - My first question is: What are the recommended ways to abort org-export-dispatch without letting it destroy the "*Org Export Dispatcher*" window and its buffer? I will probably get stuck at other points later, but I think that I'll be able to get quite far by myself if I can inspect that buffer with the tools that I know. All suggestions are welcome, including suggestions related to questions that you guess that I will have later. =) Thanks in advance! Eduardo Ochs http://angg.twu.net/#eev http://angg.twu.net/emacsconf2021.html
Re: Video: Org for Non-Users
Hi Samuel, I know Rainer König's videos! They are fantastic, and I have even indexed a few of the ones that I've watched several times... see: http://angg.twu.net/e/org.e.html#rainer-koenig The indexing above was done with eev's tricks. I have tried to learn how to do links to positions in videos with Org, but all my attempts have failed miserably... Cheers =/, Eduardo Ochs http://angg.twu.net/#eev On Mon, 13 Dec 2021 at 11:23, Samuel Banya wrote: > > Good point about the docs. > > I actually wish it were more like a giant wiki page instead of a page menu > system where you have to keep clicking next on similar topics. Might be > difficult to implement without a huge loading time. > > To be fair though Eduardo, have you checked out Rainer's videos on Org Mode > on YouTube? > https://www.youtube.com/playlist?list=PLVtKhBrRV_ZkPnBtt_TD1Cs9PJlU0IIdE > > I feel that anyone who doesn't know Org Mode should go through these first, > and THEN check out the documentation / built-in manual page in Emacs. > > Worth a try :) > > Sam > > On Mon, Dec 13, 2021, at 7:33 AM, Byung-Hee HWANG wrote: > > Eduardo Ochs writes: > > > Hi all, > > > > A few months ago I finally understood why I have always found Org so > > difficult to learn, and I started to work on a way to use eev - a > > package that I wrote - to create notes on Org that would complement > > the official docs "exactly in the way that I needed". I recorded a > > video about that, and it is here: > > > > http://angg.twu.net/2021-org-for-non-users.html > > > > TL;DR: I discovered that I am a "non-user" and recorded a video on how > > I am now documenting Org for "non-users" like me. Initially I am > > writing the docs in that format for myself, but I hope that they will > > inspire other people... > > Thanks, i did enter at org mode two days ago. > > Sincerely, Gnus fan Byung-Hee > > -- > ^고맙습니다 _布德天下_ 감사합니다_^))// > > >
Video: Org for Non-Users
Hi all, A few months ago I finally understood why I have always found Org so difficult to learn, and I started to work on a way to use eev - a package that I wrote - to create notes on Org that would complement the official docs "exactly in the way that I needed". I recorded a video about that, and it is here: http://angg.twu.net/2021-org-for-non-users.html TL;DR: I discovered that I am a "non-user" and recorded a video on how I am now documenting Org for "non-users" like me. Initially I am writing the docs in that format for myself, but I hope that they will inspire other people... Cheers, Eduardo Ochs http://angg.twu.net/#eev
Re: From macros to elisp programming?
Hi Ypo! You may find this useful too. I often use it when I want to put editing commands in my functions and I'm in a hurry and not in a mood to find their names - so for example I use (eek "C-l") instead of (recenter-top-bottom), or (eek " C-a C-SPC M-w C-y") to duplicate the line above the point... Cheers & happy hacking =), E. http://angg.twu.net/#eev ;; See: ;; http://angg.twu.net/eev-intros/find-eev-quick-intro.html#3 ;; (find-eev-quick-intro "3. Elisp hyperlinks") ;; (defun eek (str) "Execute STR as a keyboard macro. See `edmacro-mode' for the exact format.\n An example: (eek \"C-x 4 C-h\")" (interactive "sKeys: ") (execute-kbd-macro (read-kbd-macro str))) On Tue, 7 Dec 2021 at 09:55, Ypo wrote: > > Obrigado, Eduardo! > > I didn't know that command: "setq last-kbd-macro" and probably it will be > useful with elmacro too. > > (outline-next-visible-heading) ;; C-c C-n > > I save your instructions to my notes to use them :-) > > Saúde! > > > El 07/12/2021 a las 3:11, Eduardo Ochs escribió: > > On Mon, 6 Dec 2021 at 10:43, Ypo wrote: > > Hi > > I am able to make macros, but I think I am far away from Lisp programming. > > Is there a path to go from macros to elisp programming? For example, the last > macro I've made is for transforming the name of some headlines, adding in > front of them a part from the previous headline. This is the elisp code of > the macro: > > #+BEGIN_SRC > (fset 'SanzTema5 >(kmacro-lambda-form [?\C-a ?\M-f ?\M-b ?\C- ?\M-f ?\M-f ?\M-f ?\M-f ?\M-f > ?\M-f ?\M-f ?\M-f ?\M-f ?\M-w ?\C-c ?\C-n ?\C-a ?\M-f ?\M-b ?\C-y ? ?- ? > ?\C-e ?\M-b ?\M-f ?\"] 0 "%d")) > #+END_SRC > > > Using that code, from these headlines: > > *** Sanz Aparicio et al. (2019) "5 Los Motivos Adquiridos, Menéndez Balaña" > (pp. 95-118) > INTRODUCCIÓN > > I get modified the second headline: > > *** Sanz Aparicio et al. (2019) "5 Los Motivos Adquiridos, Menéndez Balaña" > (pp. 95-118) > Sanz Aparicio et al. (2019) "5 Los Motivos Adquiridos - INTRODUCCIÓN" > > > Are macros near to elisp programming or they are two different worlds? > > Ypo > > Hi Ypo, > > here's a suggestion. If you run this > > (setq last-kbd-macro [?\C-a ?\M-f ?\M-b ?\C- ?\M-f ?\M-f ?\M-f ?\M-f > ?\M-f ?\M-f ?\M-f ?\M-f ?\M-f ?\M-w ?\C-c ?\C-n ?\C-a ?\M-f ?\M-b > ?\C-y ? ?- ? ?\C-e ?\M-b ?\M-f ?\"]) > > and then type `C-x C-k C-e' (`kmacro-edit-macro-repeat') you will get > a temporary buffer that contains this: > > C-a ;; move-beginning-of-line > M-f ;; forward-word > M-b ;; backward-word > C-SPC ;; set-mark-command > 9*M-f ;; forward-word > M-w ;; kill-ring-save > C-c C-n > C-a ;; move-beginning-of-line > M-f ;; forward-word > M-b ;; backward-word > C-y ;; yank > SPC ;; self-insert-command > - ;; self-insert-command > SPC ;; self-insert-command > C-e ;; move-end-of-line > M-b ;; backward-word > M-f ;; forward-word > " ;; self-insert-command > > If you convert that by hand - suggestion: use keyboard macros for > that! =) - to a defun like this one, > > (defun SanzTema5 () > (interactive) > (move-beginning-of-line) ; C-a > (forward-word) ; M-f > (backward-word); M-b > (set-mark-command) ; C-SPC > (dotimes 9 (forward-word)) ; 9*M-f > ;; ^ or: (forward-word 9) > (kill-ring-save) ; M-w > ;; What here? I don' have a: ; C-c C-n > (move-beginning-of-line) ; C-a > (forward-word) ; M-f > (backward-word); M-b > (yank) ; C-y > (insert " - ") ; SPC - SPC > (move-end-of-line) ; C-e > (backward-word); M-b > (forward-word) ; M-f > (insert "\"") ; " > ) > > Then you will get a defun that does something that is clearly useful > to you... you can start by creating and debugging a handful of defuns > like that one and then learn what most people consider as "real > Elisp"... > > Cheers =), > Eduardo Ochs > http://angg.twu.net/#eev
Re: Looking for extensions of [[file:~/xx.org::My Target]]
...also here: https://github.com/jkitchin/scimax/blob/master/scimax-notebook.org#example-links Very good, thanks! =) E. On Mon, 6 Dec 2021 at 23:45, John Kitchin wrote: > > You might find the scimax-notebook project > (https://github.com/jkitchin/scimax/blob/master/scimax-notebook.org) > interesting for this. It builds on projectile and defines a link > (https://github.com/jkitchin/scimax/blob/master/scimax-notebook.org#notebookproject-links) > similar to what you describe. You can learn more about it here: > > https://www.youtube.com/watch?v=H4sK5ld6Bw0 > > > John > > --- > Professor John Kitchin (he/him/his) > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > http://kitchingroup.cheme.cmu.edu > > > > On Mon, Dec 6, 2021 at 8:44 PM Eduardo Ochs wrote: >> >> Hi people, >> >> this node of the Org manual >> >> (info "(org)Search Options") >> http://www.gnu.org/software/emacs/manual/html_node/org/Search-Options.html >> >> explains that we can use links like this one >> >> [[file:~/xx.org::My Target]] >> >> to point to a string like "<>" in the file ~/xx.org. >> >> Where can I find extensions of that syntax that allow using several >> "projects"? I am thinking of something like this: after telling the >> extension that in the local filesystem >> >> the project "dn6" is at ~/LATEX/dednat6/, and >> the project "edrxrepl" is at ~/edrxrepl/ >> >> then the links >> >> [[file:dn6/stacks.lua:Stack-tests]] and >> [[file:edrxrepl/edrxpcall.lua:Class]] >> >> would point to: >> >> the string "<>" in ~/LATEX/dednat6/stacks.lua and >> the string "<>" in ~/edrxrepl/edrxpcall.lua, >> >> and I imagine that every such extension would also allow telling the >> HTML exporter where these "projects" are in the web... >> >> Thanks in advance! >> Eduardo Ochs >> http://angg.twu.net/#eev >> >> >> >> P.S.: I still know far less Org than I should, but I am trying to >> remedy this... >> >> P.P.S.: eev uses this trick to point to anchors in "projects": >> http://angg.twu.net/eev-intros/find-eev-quick-intro.html#8.5 >> http://angg.twu.net/eev-intros/find-eev-quick-intro.html#9.2 >> I need to add to its docs references to how other packages do >> similar things. >>
Re: From macros to elisp programming?
On Mon, 6 Dec 2021 at 10:43, Ypo wrote: > > Hi > > I am able to make macros, but I think I am far away from Lisp programming. > > Is there a path to go from macros to elisp programming? For example, the last > macro I've made is for transforming the name of some headlines, adding in > front of them a part from the previous headline. This is the elisp code of > the macro: > > #+BEGIN_SRC > (fset 'SanzTema5 >(kmacro-lambda-form [?\C-a ?\M-f ?\M-b ?\C- ?\M-f ?\M-f ?\M-f ?\M-f ?\M-f > ?\M-f ?\M-f ?\M-f ?\M-f ?\M-w ?\C-c ?\C-n ?\C-a ?\M-f ?\M-b ?\C-y ? ?- ? > ?\C-e ?\M-b ?\M-f ?\"] 0 "%d")) > #+END_SRC > > > Using that code, from these headlines: > > *** Sanz Aparicio et al. (2019) "5 Los Motivos Adquiridos, Menéndez Balaña" > (pp. 95-118) > INTRODUCCIÓN > > I get modified the second headline: > > *** Sanz Aparicio et al. (2019) "5 Los Motivos Adquiridos, Menéndez Balaña" > (pp. 95-118) > Sanz Aparicio et al. (2019) "5 Los Motivos Adquiridos - INTRODUCCIÓN" > > > Are macros near to elisp programming or they are two different worlds? > > Ypo Hi Ypo, here's a suggestion. If you run this (setq last-kbd-macro [?\C-a ?\M-f ?\M-b ?\C- ?\M-f ?\M-f ?\M-f ?\M-f ?\M-f ?\M-f ?\M-f ?\M-f ?\M-f ?\M-w ?\C-c ?\C-n ?\C-a ?\M-f ?\M-b ?\C-y ? ?- ? ?\C-e ?\M-b ?\M-f ?\"]) and then type `C-x C-k C-e' (`kmacro-edit-macro-repeat') you will get a temporary buffer that contains this: C-a ;; move-beginning-of-line M-f ;; forward-word M-b ;; backward-word C-SPC ;; set-mark-command 9*M-f ;; forward-word M-w ;; kill-ring-save C-c C-n C-a ;; move-beginning-of-line M-f ;; forward-word M-b ;; backward-word C-y ;; yank SPC ;; self-insert-command - ;; self-insert-command SPC ;; self-insert-command C-e ;; move-end-of-line M-b ;; backward-word M-f ;; forward-word " ;; self-insert-command If you convert that by hand - suggestion: use keyboard macros for that! =) - to a defun like this one, (defun SanzTema5 () (interactive) (move-beginning-of-line) ; C-a (forward-word) ; M-f (backward-word); M-b (set-mark-command) ; C-SPC (dotimes 9 (forward-word)) ; 9*M-f ;; ^ or: (forward-word 9) (kill-ring-save) ; M-w ;; What here? I don' have a: ; C-c C-n (move-beginning-of-line) ; C-a (forward-word) ; M-f (backward-word); M-b (yank) ; C-y (insert " - ") ; SPC - SPC (move-end-of-line) ; C-e (backward-word); M-b (forward-word) ; M-f (insert "\"") ; " ) Then you will get a defun that does something that is clearly useful to you... you can start by creating and debugging a handful of defuns like that one and then learn what most people consider as "real Elisp"... Cheers =), Eduardo Ochs http://angg.twu.net/#eev
Looking for extensions of [[file:~/xx.org::My Target]]
Hi people, this node of the Org manual (info "(org)Search Options") http://www.gnu.org/software/emacs/manual/html_node/org/Search-Options.html explains that we can use links like this one [[file:~/xx.org::My Target]] to point to a string like "<>" in the file ~/xx.org. Where can I find extensions of that syntax that allow using several "projects"? I am thinking of something like this: after telling the extension that in the local filesystem the project "dn6" is at ~/LATEX/dednat6/, and the project "edrxrepl" is at ~/edrxrepl/ then the links [[file:dn6/stacks.lua:Stack-tests]] and [[file:edrxrepl/edrxpcall.lua:Class]] would point to: the string "<>" in ~/LATEX/dednat6/stacks.lua and the string "<>" in ~/edrxrepl/edrxpcall.lua, and I imagine that every such extension would also allow telling the HTML exporter where these "projects" are in the web... Thanks in advance! Eduardo Ochs http://angg.twu.net/#eev P.S.: I still know far less Org than I should, but I am trying to remedy this... P.P.S.: eev uses this trick to point to anchors in "projects": http://angg.twu.net/eev-intros/find-eev-quick-intro.html#8.5 http://angg.twu.net/eev-intros/find-eev-quick-intro.html#9.2 I need to add to its docs references to how other packages do similar things.
Re: Orgdown: negative feedback & attempt of a root-cause analysis (was: "Orgdown", the new name for the syntax of Org-mode)
On Tue, 30 Nov 2021 at 17:46, Karl Voit wrote: > > I chose an in-between approach: defining only a minimal set (name, > common structure/idea/documentation, Orgdown1, providing a > collaborative home on GitLab) and hope for a project community that > will take over (or at least support) from there, discussing syntax > elements for Orgdown2 and taking the project to its next logical > steps. > > In hindsight, this decision was wrong. > > Quite frankly, I don't have the energy to throw away everything and > start from zero with a different name. > > People do not seem to realize what it took to get there - which is > partly understandingly because I had to learn by doing what it takes > to get the idea into a coherent and consistent form. > > Simply switching to a different name is not just search&replace. It > would reset the project almost to its very start again, losing the > go-live effect of previous weekend (whose effect might be > questionable considering the name discussion), its project URL that > is now out there, the motivation video which aims to explain the > motivation to users of Emacs, the EmacsConf21 talk publicity, and it > would require much effort to reach the status where Orgdown is now. Hi Karl, I was at the EmacsConf2021, but I was totally exhausted due to other chores and spoke to very few people there... I think that your work is VERY important. I am one of the people who have tried to learn Org lots of times and got stuck the same number of times, and any initiative that splits the features - either syntactic or semantics - into layers of different complexity and importance will help me very much. My suggestion about the name is: it's your project, changing its name is not a trivial task, and the people who complained about the name did not offer help. If I were you would simply put "find a better name for the project and change its name to it" in my TODO list as a low-priority task. Cheers =), Eduardo Ochs http://angg.twu.net/#eev https://emacsconf.org/2021/talks/test/
Short videos about workflows - and how to upload them
Hi list, this is slightly off-topic - but only slightly, I think. Yesterday I attended (as a lurker...) this meeting of the EmacsNYC group: https://emacsnyc.org/2020/12/28/online-meetup-discussionhow-do-we-improve-emacs.html In it Sacha Chua said that she feels that most people, especially newbies, have a hard time figuring out other people's workflows, and that we should try to make short videos about our workflows and share them... Long story short: I have a nice workflow for recording and uploading short videos to my home page, and I made a 5-minute video about it. It is here: http://angg.twu.net/eev-videos/2020-short-find-ssr-links-2.mp4 It uses eev, that can be used in conjunction with Org, but that is based on design decisions that are very different from the ones in Org. I gave a presentation about these design decisions at the last EmacsConf: http://angg.twu.net/emacsconf2020.html I know only a handful of features of Org at the moment, and I don't know (yet) how to translate the ideas of this method for uploading videos to "pure Org", i.e., to Org without eev... I hope that someone would find a way, and would share it with everybody. Also, I think that it would be really, really, really great if more people start to make their videos downloadable from places that are not Youtube; eev has some functions that help downloading videos from Youtube with youtube-dl - see: http://angg.twu.net/2020-some-template-based.html http://www.youtube.com/watch?v=91-9YfRPsuk#t=19m23s (intro) http://www.youtube.com/watch?v=91-9YfRPsuk#t=22m48s (demo) but they're a bit clumsy... eev also has functions for accessing videos at <http://angg.twu.net/eev-videos/>, and, far more important than that, it has this comment in its source: ;; The definitions of `find-eevvideo-links' and `code-eevvideo' above ;; have strings like "eev" and "http://angg.twu.net/eev-videos/"; ;; hardcoded in several places... it is easy, but not entirely ;; trivial, to create variants of them that point to other sites that ;; stores video tutorials and presentations in ways that are easy to ;; download. If you are aware of sites like that, please get in touch ;; and I'll create functions pointing to them! So: let's create videos about workflows and videos about creating videos about workflows, and let's share ideas and links Cheers =) =) =), Eduardo Ochs http://angg.twu.net/#eev https://github.com/edrx/eev#introduction
Re: Long links
Hi Steven, On Sun, 5 Jan 2020 at 11:03, Steven Penny wrote: > > So you can understand why I was annoyed when Trey started his off > topic discussion about hard versus soft wrapping. We understand, but now lots of people are annoyed with you. Trey wrote his e-mails very carefully, and even if his suggestions weren't exactly what you were looking for they were given in good faith and they were useful to other people - for example to me. Most people here read e-mails paying attention both to their technical contents and to the "social contents" of them... in terms of social contents Trey's e-mails were impeccable, and this one was especially brilliant: https://lists.gnu.org/archive/html/emacs-orgmode/2020-01/msg00029.html I want to be like him when I grow up. Cheers, Eduardo Ochs http://angg.twu.net/#eev http://angg.twu.net/emacsconf2019.html
Re: Add a new link type for video files
Hi Stardiviner, just some quick comments on org-video-link-open... Eev also has functions for opening audio/video files at certain time offsets. They are called like this (with `C-e C-x C-e' or something equivalent), (find-video "~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4") (find-video "~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4" "1:17") and the sexps above pass these lists to start-process: ("mpv" "~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4" "--fs" "--osd-level=2") ("mpv" "~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4" "--start" "1:17" "--fs" "--osd-level=2") I use mpv instead of mplayer because this page at the Wikipedia convinced me to: https://en.wikipedia.org/wiki/Mpv_(media_player) "--fs" means "full screen" and "--osd-level=2" shows the current time. If you know other emacs packages that implement opening audio or video files and skipping to a certain position please tell me - I would like to mention them in the comments of eev-audiovideo.el. I mentioned your previous message there, by the way! See: https://github.com/edrx/eev/blob/UTF-8/eev-audiovideo.el#L55 http://angg.twu.net/eev-current/eev-audiovideo.el.html http://angg.twu.net/eev-current/eev-audiovideo.el Cheers, Eduardo Ochs http://angg.twu.net/#eev http://angg.twu.net/emacsconf2019.html On Fri, 3 Jan 2020 at 06:15, stardiviner wrote: > > > I write a patch to add new link type: > > #+begin_example > [[video:/path/to/file.mp4::00:13:20]] > #+end_example > > This will open video file in specific timestamp. And it is possible to add > more > options in link. Like video player arguments. > > I want to ask should I add this patch to Org Mode built-in? > > Here is my patch source code: > > #+begin_src emacs-lisp :file "ol-video.el" > ;;; [[video:/path/to/file.mp4::00:13:20]] > (defcustom org-video-link-open-command "mplayer" > "Specify the program for openning video: link." > :type 'string) > > (defvar org-video-link-extension-list '("avi" "rmvb" "ogg" "mp4" "mkv")) > > (defun org-video-link-open (uri) > "Open video file `URI' with video player." > (let* ((list (split-string uri "::")) > (path (car list)) > (start-timstamp (cadr list))) > (make-process > :command (list org-video-link-open-command > "-ss" start-timstamp > (expand-file-name (org-link-unescape path))) > :name "org-video-link"))) > > (defun org-video-complete-link (&optional arg) > "Create a video link using completion." > (let ((file (read-file-name "Video: " nil nil nil nil > #'(lambda (file) > (seq-contains-p >org-video-link-extension-list >(file-name-extension file) > (pwd (file-name-as-directory (expand-file-name "."))) > (pwd1 (file-name-as-directory (abbreviate-file-name >(expand-file-name ".") > (cond ((equal arg '(16)) >(concat "video:" >(abbreviate-file-name (expand-file-name file > ((string-match > (concat "^" (regexp-quote pwd1) "\\(.+\\)") file) >(concat "video:" (match-string 1 file))) > ((string-match > (concat "^" (regexp-quote pwd) "\\(.+\\)") > (expand-file-name file)) >(concat "video:" >(match-string 1 (expand-file-name file > (t (concat "video:" file) > > (org-link-set-parameters "video" > :follow #'org-video-link-open > :complete #'org-video-complete-link) > #+end_src > > -- > [ stardiviner ] >I try to make every word tell the meaning what I want to express. > >Blog: https://stardiviner.github.io/ >IRC(freenode): stardiviner, Matrix: stardiviner >GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 > >
Re: Using Org and eev together - problem with source blocks
Perfect! I've added several mentions to ":results output" to the tutorial: http://angg.twu.net/eev-intros/find-org-intro.html Thanks a lot! =) Eduardo http://angg.twu.net/#eev On Sun, 10 Nov 2019 at 14:13, Ken Mankoff wrote: > > On 2019-11-10 at 15:36 +01, Eduardo Ochs wrote... > > Changing the Python source block to > > > > #+BEGIN_SRC python :output results > > > > Are you sure that you wrote it correctly? > > I'm pretty sure I did not. Try ":results output" > > -k. > >
Re: Using Org and eev together - problem with source blocks
Changing the Python source block to #+BEGIN_SRC python :output results def square (x): return x*x print(square(5)) #+END_SRC didn't change anything here, neither with emacs24 nor with git emacs, and I grepped (recursively) for ":output" in the directory where I cloned https://code.orgmode.org/bzg/org-mode.git and only found references to ":output-dir" - except for a single occurrence of ":output" in contrib/lisp/ob-sclang.el... Are you sure that you wrote it correctly? Cheers, E. =) http://angg.twu.net/#eev On Sun, 10 Nov 2019 at 08:39, Ken Mankoff wrote: > > On 2019-11-10 at 02:54 +01, Eduardo Ochs wrote... > > #+BEGIN_SRC python > > def square (x): > > return x*x > > > > print(square(5)) > > #+END_SRC > > > > [...] when I run the Python block with C-c C-c I always get a results > > block like this (without the indentation): > > > > #+RESULTS: > > : None > > > > What am I doing wrong? I expected an output of "25"... =( > > Adding ":output results" makes this work for me, but I'm not using emacs24. > > -k. >
Using Org and eev together - problem with source blocks
Hi list, I gave a presentation about eev at the EmacsConf a few days ago, and after the conference I started to work on a tutorial to explain how to use Org and eev together... links: http://angg.twu.net/emacsconf2019.html http://angg.twu.net/LATEX/2019emacsconf-long.pdf (slides) http://www.youtube.com/watch?v=86yiRG8YJD0&t=774 (demo) http://www.youtube.com/watch?v=86yiRG8YJD0&t=956 (demo: eepitch) http://angg.twu.net/eev-intros/find-org-intro.html (eev+Org, html) http://angg.twu.net/eev-intros/find-org-intro (eev+Org, src) https://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00124.html I am longtime Org user that only uses a few features of Org - mainly the ones here, (info "(org)Document Structure") and when I tried to explain in my tutorial how to execute org source blocks I stumbled on a behavior that I found very puzzling... I will copy the relevant code here. The section on preparation says to run these sexps, (require 'org) (require 'ob-sh) ;; or: (require 'ob-shell) (require 'ob-python) and then a bit later the tutorial has this: # (info "(org)Working With Source Code") # (info "(org)Evaluating code blocks") #+BEGIN_SRC sh seq 200 204 #+END_SRC #+BEGIN_SRC python def square (x): return x*x print(square(5)) #+END_SRC but when I run the shell block with C-c C-c I get these errors Error reading results: (user-error No table at point) Code block produced no output. and an empty "#+RESULTS:" block in Emacs24, and the right results block in some later versions of Emacs, and when I run the Python block with C-c C-c I always get a results block like this (without the indentation): #+RESULTS: : None What am I doing wrong? I expected an output of "25"... =( Thanks in advance! Eduardo Ochs http://angg.twu.net/#eev
Re: [O] How to execute org babel src block line by line?
Hi Xor3, Maybe you should take a look at eev - more specifically, at eepitch, which is one of its modules... there's a demo here, starting at 0:16, http://angg.twu.net/eev-videos/video4-eepitch.mp4 http://www.youtube.com/watch?v=Lj_zKC5BR64 and there's a tutorial here: http://angg.twu.net/eev-intros/find-eev-quick-intro.html I am not sure if it is already as compatible with Org as it should - I use Org all the time, but just a few basic features... if you want to try it and stumble on any problems please let me know and I will fix everything ASAP - I am in the middle of my holidays. =) Cheers! Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/ P.S.: I am trying isend-mode now. On Mon, Apr 18, 2016 at 5:44 AM, Xor3 wrote: > Hi community, >I want to execute org babel src block one line a time. >Here is what I have tried. >I use `isend' to send things to REPL buffer. When "C-" is pressed > at first time, a REPL buffer which is decided by `lang' params is startd. > Then everything send to that buffer. An additional param `:dir' is configured > to decide the starting `default-directry' of the REPL command. > > = > (eval-after-load "org" > '(progn > ;; ;; (org-defkey org-mode-map (kbd "C-") 'org-isend-send) > (define-key org-mode-map (kbd "C-") 'org-isend-send) > > (defun org-isend-send() > (interactive) > (let* ((oldbuf (current-buffer)) > (info (org-babel-get-src-block-info)) > (lang (nth 0 info)) > (body (nth 1 info)) > (params (nth 2 info)) > (session (cdr (assoc :session params))) > (dir (cdr (assoc :dir params))) > (isend--command-buffer (concat "*" session "*")) > (working-directory > (or (and dir (file-name-as-directory dir)) > default-directory))) > (when (not (get-buffer isend--command-buffer)) > (cond >((string-equal lang "python") (save-current-buffer >(let ((default-directory > working-directory)) > (call-interactively > 'run-python) > (with-current-buffer > "*Python*" >(rename-buffer > isend--command-buffer) >((string-equal lang "sh") (save-current-buffer >(let ((default-directory > working-directory)) > (if (string-equal session > "eshell") > (eshell) >(progn > (shell) > (with-current-buffer > "*shell*" >(rename-buffer > isend--command-buffer))) >(t (error "session?"))) > (require 'isend) > (require 'isend-mode) > (when (not isend-mode) > (isend-mode 1) > (make-local-variable 'isend-mode-map) > (define-key isend-mode-map (kbd "C-") nil) > (local-set-key (kbd "C-") 'org-isend-send)) > (cond >((string-equal lang "python") (isend-ipython-setup)) >(t (isend-shell-setup))) > ) > ;; (display-buffer isend--command-buffer) > (isend-display-buffer) > (call-interactively 'isend-send) > ;; (with-current-buffer isend--command-buffer > ;; (goto-char (point-max)) > ;; (comint-send-input) > ;; (funcall (key-binding (kbd "RET"))) > ;; ) > > > > I want to execute my shells/python/ruby scirpts this way by writing out > them first, then `C-' doing the rest. > > Does anyone know a better or more native `org' way to do this? > Thank you for your help.
Re: [O] Embedding diagrams in Org
On Wed, Feb 18, 2015 at 12:19 PM, Eric S Fraga wrote: > On Wednesday, 18 Feb 2015 at 13:34, Marcin Borkowski wrote: >> Hello all, >> >> I need to embed some diagrams (graphs of functions, for instance, or >> trees) in an Org file. Any suggestions on how to do it? In case of >> ditaa, I can use a source block and the "results" line, and see the >> image with C-c C-x C-v. Can I do a similar thing with Asymptote? How >> hard/time-consuming would it be to add support e.g. for tikz or other >> such tools? > > Support for tikz is there implicitly in that there is support for > LaTeX. I use tikz all the time. > > Simple example attached. > > I do believe others have used asymptote in the past. > > HTH, > eric > -- > : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org > release_8.3beta-843-ga5f1a3.dirty Hi Eric, I tested your example - with `C-c C-e l o' to export to LaTeX and open the PDF file -, and the ellipse in the middle of the sentence appeared, but the block #+begin_src latex :results latex raw :exports results \begin{tikzpicture} \node[red!50!black] (a) {A}; \node (b) [right of=a] {B}; \draw[->] (a) -- (b); \end{tikzpicture} #+end_src did not make its way to the t.tex file... I asked for help in the #org-mode channel at freenode, as I am an Org newbie, and found a fix. Your example is one of the best one I've seen so far of diagrams- in-Org-for-newbies, but it seems to be at least one micro-bug from perfect, as it supposes that the person trying it has already enabled latex support in babel! Here is an idea to make your example more newbie-friendly: add the comments below to it. # Note that you may have to add latex support to babel # to make the tikzpicture block work... # see: (info "(org)Languages") # try: (org-babel-do-load-languages 'org-babel-load-languages '((latex . t))) # # To disable to question "Evaluate this latex code block on your system?", # see: (info "(org)Code evaluation security") # try: (setq org-confirm-babel-evaluate nil) Cheers =), Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/ http://angg.twu.net/eev-intros/find-eval-intro.html
Re: [O] Moving my init.el to Org
Hi all, I hope you don't mind me jumping into this thread to ask an org-beginner question... My .emacs is about 15000 lines long, and that's fine for me because I have "anchors" at some points of it, and an index at the top, and convenient ways to jump quickly to any anchors. If anyone is curious, here are some links - my package that implements those things is called eev. http://angg.twu.net/.emacs.html http://angg.twu.net/eev-intros/find-eval-intro.html http://angg.twu.net/eev-intros/find-anchors-intro.html http://angg.twu.net/#eev I know that Org implements something similar to that, but I don't know how to use it. This sexp, when executed, (find-angg ".emacs" "unquote-printable") Jumps to the first occurrence of the string "<>" in my ~/.emacs - in the htmlized version, the target of that sexp is: http://angg.twu.net/.emacs.html#unquote-printable So, questions: 1) what is the user-ish way to create a link in Org to the first occurrence of the string "<>" in ~/.emacs? 2) I know that Org lets users implement new kinds of hyperlinks. If the syntax for doing what I asked in (1) is too clumsy, how do we implement a better syntax? 3) The (find-angg ".emacs" "unquote-printable") calls my functions to visit a file and jump to a position. How can I jump to that position using Org's functions *from Lisp*? Or, better, how do we write sexps to expose what Org does? My guess is that that would be done be several sexps, more or less like this pseudocode: (org-hyperlink-method-and-args "file:///~/.emacs#<>") ;; --> (file-and-anchor "~/.emacs" "<>") (org-hyperlink-do 'file-and-anchor "~/.emacs" "<>") Thanks in advance! =) Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/#eev On Fri, Sep 5, 2014 at 11:49 PM, Thorsten Jolitz wrote: > Marcin Borkowski writes: > >> Hi, >> >> and thanks for all the great replies! >> >> I ended up using orgstruct mode, which is probably the simplest one, >> and (AFAIU) it will enable me to switch easily to outshine if (when?) >> orgstruct is not enough for me. >> >> And now there's another problem: I'd like to have my init file >> collapsed to only headlines on opening. Since I visit my init file >> through a custom command (which finds it and turns on orgstruct), I >> don't need to use file local variables for that - I just need a >> command to do it. So: >> >> how do I (programmatically, in elisp) collapse the view of >> an orgstruct .el file? > > Try 'org-overview'. Both, 'org-overview' and 'show-all' work > with outshine too, so they should work with org-struct. > > -- > cheers, > Thorsten > >
Re: [O] org mode and eev
On Fri, Nov 8, 2013 at 6:29 AM, Alan Schmitt wrote: > Hi Eduardo, > > eduardoo...@gmail.com writes: > > > I am the author of eev... > > Nice! I knew I had seen you around here ;-) > > > How can I help? > > Your message already answered one question I had, but I have still one > pending. > > > I still know far less about org-mode than I would like to - maybe > > because I have been using Emacs in a very idiosyncratic way for ages > > 8-\ - but it seems trivial to create code blocks that can be executed > > by both org and eev. Here is a example - just replace each "*" > > below with a real char 15. > > This was my first question: '*' are not '*' so they won't interfere with > org-mode. This is great. (Quick question: how do I enter such a char 15 > star?) > > > ;; 3. Now the "char 15"s will be displayed as red star glyphs, and the > > ;; code block above can be executed both with org's `C-c C-c' and with > > ;; eev's . Try to type on each line below, starting on the > > ;; first one with the "(eepitch-shell)": > > > > * (eepitch-shell) > > * (eepitch-kill) > > * (eepitch-shell) > > #+begin_src sh > > rm -Rv /tmp/eev/ > > mkdir /tmp/eev/ > > cd /tmp/eev/ > > wget http://angg.twu.net/eev-current/eev2.tgz > > tar -xvzf eev2.tgz > > #+end_src > > This works great because '#' is a comment prefix for shell, so the > begin_src lines won't be processed. I want to use eev with other > toplevels, and so I cannot rely on this. Is it possible to tweak eepitch > so that lines starting with #+begin_src and #+end_src are not sent at > all? > > Thanks, > > Alan > About the char 15s / red stars: I spent many years inserting them all "by hand" with C-q C-o... Now there is an easier way to create what I call "eepitch blocks", which are the things like these: * (eepitch-foobar) * (eepitch-kill) * (eepitch-foobar) The "easier way" is to create an eepitch block for "foobar" as above is to type "foobar" in a line and then type M-T (meta-shift-t). Note that all these things are explained here, (find-eepitch-intro) http://angg.twu.net/eev-intros/find-eepitch-intro.html and that we should definitely create a sandboxed tutorial like that for using eev with Org... I'm saying "we" just because I'll need help with (at least) some details! About ignoring the "#+" lines: this can be done by changing eepitch-comment-regexp, but there a default way that already works, which is to skip the "#+" lines with instead of typing on them... Cheers! Eduardo
Re: [O] org mode and eev
On Thu, Nov 7, 2013 at 7:33 AM, Sebastien Vauban wrote: > Hello Alan, > > Alan Schmitt wrote: > > I finally took the time to watch the eev video > > (http://angg.twu.net/eev-videos/video2.mp4) and I'm quite impressed by > > it. I find it may be redundant for some features of org mode (such as > > basic links to files) but I find the driving of external shell-based > > programs very nice. As I've seen it mentioned on this list before, I was > > wondering if some of you use it in addition to org mode. > > I've always dreamed of being able to use it from Org, to document > deployment > procedures (for example), and execute them. > > With Org only, we're not far when we execute sh code blocks in a session. > Though, it's possible there must be missing things. > > Best regards, > Seb > > -- > Sebastien Vauban > > > Hello all, I am the author of eev... How can I help? I still know far less about org-mode than I would like to - maybe because I have been using Emacs in a very idiosyncratic way for ages 8-\ - but it seems trivial to create code blocks that can be executed by both org and eev. Here is a example - just replace each "*" below with a real char 15. 1. Execute the code block below with org's `C-c C-c': * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) #+begin_src sh rm -Rv /tmp/eev/ mkdir /tmp/eev/ cd /tmp/eev/ wget http://angg.twu.net/eev-current/eev2.tgz tar -xvzf eev2.tgz #+end_src ;; 2. Eval this to activate eev-mode: (progn (add-to-list 'load-path "/tmp/eev/") (require 'eev2-all) (eev-mode 1)) ;; 3. Now the "char 15"s will be displayed as red star glyphs, and the ;; code block above can be executed both with org's `C-c C-c' and with ;; eev's . Try to type on each line below, starting on the ;; first one with the "(eepitch-shell)": * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) #+begin_src sh rm -Rv /tmp/eev/ mkdir /tmp/eev/ cd /tmp/eev/ wget http://angg.twu.net/eev-current/eev2.tgz tar -xvzf eev2.tgz #+end_src ;; 4. Now links like these should work - note that it is possible to ;; "follow" them with `M-e' and to "go back" with `M-k', as explained ;; here: http://angg.twu.net/eev-intros/find-eval-intro.html ;; ;; (find-eepitch-intro) ;; (find-eval-intro) ;; (eek "M-5 M-j") Cheers, Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/#eev http://angg.twu.net/eev-videos/video4-eepitch.mp4
Re: [O] Org Tutorials need more structure
On Mon, Sep 30, 2013 at 3:36 PM, Peter Neilson wrote: > 1. Non-video presentations for beginners. Some of us are (for one reason > or another) badly set up to use video. Perhaps our network connection is > slow, or our system is flaky and crashes with video. Or perhaps we only > have five or ten minutes at a time to study. Or perhaps we are mostly > trying to learn from hard copy we've printed out. A few of us might even be > blind. > Any chance of an MP4 version of Carsten's Google Tech talk being produced and uploaded to a public place, with a wget-able URL? It would be trivial to add to this tutorial - or to some other - the code to download it and to make mplayer play it from given positions... http://angg.twu.net/eev-intros/find-videos-intro.html http://angg.twu.net/eev-intros/find-audiovideo-intro.html and integrating into Org the feature described there - namely: with a certain minor mode activated `M-p' opens the current default video at the first time offset of the current line - should be little more than a 10-line hack... Btw, that would make indices of time offsets in videos like the one in http://orgmode.org/worg/org-tutorials/org-screencasts/org-mode-google-tech-talk.html http://orgmode.org/worg/org-tutorials/org-screencasts/org-mode-google-tech-talk.org.html trivial to execute. I don't have (yet) the skills to make things like =1:23= become active links that do that in Org, though. Cheers, Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/#eev edrx at freenode.org (at #eev, #org-mode, etc)
Re: [O] Connect to the ssh and execute any command
Hi Andrey, you can use eev - take a look at the demo that starts at 0:18 in this video here: http://www.youtube.com/watch?v=Lj_zKC5BR64 http://angg.twu.net/eev-videos/video4-eepitch.mp4 There are many things that I do in the server that hosts my home page by using this to set up a connection, (eepitch-do "ssh e...@angg.twu.net") and then typing on each line that needs to be sent. If you have any difficulty in setting things up feel free to get in touch by e-mail, IRC (#eev at Freenode) or gmail chat - there are some new features that do not appear in videos yet (the videos I have are a few months old), and I am just resurecting my screencast-making scripts to make some new ones... and I am exactly at the point where tests and feedback can clarify a lot my ideas about the best ways to present things. Cheers! =) Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/ On Thu, Sep 12, 2013 at 6:56 PM, Andrey Tykhonov wrote: > Hi all! > > During last several days I was trying to implement quite simple script > which: > > 1. Creates new buffer with the shell (M-x shell) > 2. Executes there "ssh usern...@domain.com". As result -- the password > prompt appears in the minibuffer. I manually input password. > 3. Then script executes any command in the recently created buffer > (shell), for example: "ls -la". So I expect to see directory listing on > the domain.com. > > but, for sorry, I cannot to do so that "ls -la" will be executed! > > I googled, I have tried many different approaches but without any luck :-( > > Here I should mention quite important thing: I cannot use TRAMP because > it does not work with the server to which the script connects and then > on which executes "ls -la". (I suppose that TRAMP uses FUSE, but for > sorry FUSE does not work with mine server). So TRAMP is not available > for me. > > For example I tried: > > (progn > (make-comint-in-buffer "ssh" "*ssh*" "ssh" nil "usern...@domain.com") > (make-comint-in-buffer "ls" "*ssh*" "ls" nil "-la") > ) > "ls -la" does not executes. > > (progn > (make-comint-in-buffer "ssh" "*ssh*" "ssh" nil "usern...@domain.com") > ; instead of "ls -la" here is pwd > (start-file-process "pwd" "*ssh*" "pwd") > ) > In *scratch* outputs just "Process pwd finished" > > (progn > (start-process-shell-command "ssh" "*ssh*" "ssh userna...@domain.com") > (process-send-string (get-buffer-process "*ssh*") "pwd\n") > ) > Seems this one -- is overall wrong approach because > start-process-shell-command > does not want to show shell after I put the password in the prompt. > > Also I tried call-process instead of start-process-shell-command: > (call-process "ssh" nil "*ssh*" t "usern...@domain.com") > > I got "Pseudo-terminal will not be allocated because stdin is not a > terminal". > > Then... > > (progn > (setq buffer (get-buffer-create "*ssh*")) > ; switch to buffer > (switch-to-buffer-other-window buffer) > ; execute there a shell > (shell buffer) > ; then executes there mine commands > (process-send-string (get-buffer-process "*ssh*") "ssh > usern...@domain.com") > (comint-send-input) > ; and > (process-send-string (get-buffer-process "*ssh*") "ls -la") > (comint-send-input) > ) > Last process-send-string does not execute in time because it is not > synchronous. > Last process-send-string does not wait for previous... > > Also I tried set-process-filter but filter just eats password prompt so > I could not input password > > > How my task could be implemented without TRAMP? > > Please help! > > > > Regards, > Andrey > > > > > > >
Re: [O] naming and/or directly addressing particular windows?
Hi Matt, if you are considering using a little language to create window configurations then maybe you will find this interesting: http://angg.twu.net/eev-intros/find-multiwindow-intro.html http://angg.twu.net/eev-current/eev-multiwindow.el.html Cheers! Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/#eev On Sat, Dec 1, 2012 at 1:22 PM, Matt Price wrote: > Hi, > > After the recent conversation about Scrivener (on help-gnu-emacs) I > thought the very first step would be to write a simple function that > would create a window layout and populate the windows with a set of > buffers, then set mjor and minor modes for some of hte buffers. > (After that I guess I will have to figure out how to write some very > simple minor modes, or at least some functions that allow e.g. direct > editing of org-mode properties on a selected node.) > > So, what I have so far is quite trivial but doesn't seem to work > exactly as I expected: > > (delete-other-windows) > (split-window-horizontally) > (windmove-right) > (split-window-horizontally) > (enlarge-window-horizontally 20) > (windmove-right) > (split-window-vertically) > > > Anyway presumably I'll fiddle with this and eventually it will work, > but something better would be > > (set-window-name "outline") > (split-named-window-horizontally-and-name-the-other-window "outline" > "main") > (split-named-window-horizontally-and-name-the-other-window "main" > "metadata") > (set-width-named-window "main" 60) > > and then write a function, bound to say Ctrl-Enter, > > open-node-as-indirect-buffer-in-named-window > > Anyway: is it possible to give/get a name for a window that persists > long enough to be called in functions? > > Thanks, > Matt > >
Re: [O] Org HTML->PDF publishing
On Tue, Sep 18, 2012 at 2:58 PM, Marcelo de Moraes Serpa < celose...@gmail.com> wrote: > Hey guys, > > Is it feasible to publish something (say an ebook) to html and then > convert it to pdf? > > I know *TeX is the most powerful framework for creating PDFs, but given > that I'm more familiar with CSS, I'm sure I could come up with a > better style for the document in much less time than if, say, using LaTeX, > as of now. > > My thought is, publish to HTML via org using a custom CSS, and then > convert this HTML+CSS to PDF somehow - I'm still not sure how exactly - > printing to PDF from the browser might be an option, however, I'm afraid > that the final PDF quality will not be enough for the given publication. > > Has anyone tried this workflow? > > Cheers, > > - Marcelo. > This works very well, but it's non-free: http://news.ycombinator.com/item?id=501897 http://tomayko.com/writings/princexml http://www.youtube.com/watch?v=vcXUrNSvjhU [[]], Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/
Re: [O] Org without X on Debian
On Tue, Jan 31, 2012 at 6:55 PM, Jay Belanger wrote: > >> I want to use a small netbook exclusively for Org-mode. > >> That's why I think I do not need X. > > > > You may not need it, but a lightweight window manager like WindowMaker > > fvwm or maybe a tiling WM like awesome may be worth a second look. Have > > a look here: > > If the netbook will only be used for org-mode, and so perhaps only > running Emacs, a WM might not even be necessary. If only one Emacs > frame is used, it could probably be run on bare X. This works for me: cat > /tmp/em.sh <<'%%%' #!/bin/sh /usr/bin/emacs %%% chmod 755 /tmp/em.sh XINITRC=/tmp/em.sh xinit -- :2.0 & Cheers, Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/
[O] Quick and dirty code blocks: eepitch
Hello list, I just discovered org-babel-screen... I haven't done my org-homework yet, but I can't resist making an announcement: the package eepitch.el, at http://angg.twu.net/eev-current/eepitch.el.html http://angg.twu.net/eev-current/eepitch.el http://angg.twu.net/eev-current/eepitch.readme.html has some goals in common with org-babel - eepitch also lets us script external programs from Emacs - but it does that in a very different style from org. In eepitch the emphasys is in the simplicity of the implementation - its core is less than 200 lines, it runs on plain Emacs, it uses only two keybindings, support for a new language can usually be implemented in just one or two lines of Lisp, and "eepitch code blocks" can appear in any file and be used in any mode (by the way, I've been using them in org files for ages). Eepitch's approach has several downsides, of course - one of them is that eepitch code blocks will look UGLY to org users, as I never worked on ways of fontifying them... I will try to implement an org-babel language for eepitch code blocks (this is part of my homework). Oh, by the way: org-babel-screen was inspired by the ancestor of eepitch... http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-screen.html http://angg.twu.net/eev-current/anim/channels.anim.html Cheers, :-) Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/
[Emacs-orgmode] doing `M-x org-mode' loses point
Hello list, Suppose that I have a file with a structure like this: * an org header (some elisp code) * another org header (more elisp code) * another org header (more elisp code) In a file like that it would be natural to switch between org-mode and emacs-lisp-mode; M-x emacs-lisp-mode works as expected, but when I do M-x org-mode the point moves to the first header line, and that doesn't look like the right thing... One solution that just occurred to me is to have a line like this in each elisp block: ;; (progn (save-excursion (org-mode)) (reveal-post-command)) by executing it with C-x C-e (*) I can switch back to org-mode without losing point... the next obvious steps - binding that to a key, patching org-mode, etc, are not relevant here, so I won't talk about them... So, is this org-mode-jumps-to-the-first-header-line a bug or a feature? Is there a standard workaround? Thanks in advance, cheers, Eduardo Ochs http://angg.twu.net/ [EMAIL PROTECTED] (*): We need this: (autoload 'reveal-post-command "reveal")) ___ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode