[O] elisp call dot babel doesn't work on Org mode 9

2017-04-20 Thread wang jinjian
Hi, I like generating simple process diagrams using dot and tables tutorial! It works fine on Org mode 8 but doesn't work on Org mode 9.0.5. The reason is the params variable not accessible! below error message displayed: let: Symbol’

Re: [O] Elisp: help on string operations for fast file visiting

2016-12-20 Thread John Kitchin
This is a different approach to what I think you want. Here is what I assume in this: 1. All the things you want to search for are in a file called archive.org which is in the same directory you are searching for (use an absolute path if it is not). 2. You have file links that only have a path, i.

Re: [O] Elisp: help on string operations for fast file visiting

2016-11-08 Thread Karl Voit
* Alan Schmitt wrote: > > On 2016-11-07 17:27, Karl Voit writes: > >> I'd like to get a "Sorry" message for (1). Easy, if only I know how to >> count lines in strings (as opposed to buffers). > > You could start by doing (split-string the_string "\n" t) (the last 't' > says to omit the empty stri

Re: [O] Elisp: help on string operations for fast file visiting

2016-11-08 Thread Alan Schmitt
On 2016-11-07 17:27, Karl Voit writes: > I'd like to get a "Sorry" message for (1). Easy, if only I know how to > count lines in strings (as opposed to buffers). You could start by doing (split-string the_string "\n" t) (the last 't' says to omit the empty strings). So you get a list, possibly e

[O] Elisp: help on string operations for fast file visiting

2016-11-07 Thread Karl Voit
Hi! For Memacs[1], I'd like to come up with a very fast Org-mode method to open files independent of their location on your disk. I accomplished everything necessary so far. However, I've got issues writing an elisp function for extracting a file and sending it to a function that calls the operati

Re: [O] ELisp expression in a var not executed anymore on tangle

2015-07-03 Thread Nicolas Goaziou
Hello, Sebastien Vauban writes: > I noticed that the following code block: > > #+begin_src shell :tangle yes :var workingDir=(file-name-directory (or > load-file-name (buffer-file-name))) :shebang #!/bin/sh > cmd="$EMACS -q -l ${workingDir}init.el" > #+end_src > > does now return this: > > #!

[O] ELisp expression in a var not executed anymore on tangle

2015-07-03 Thread Sebastien Vauban
Hello, I noticed that the following code block: --8<---cut here---start->8--- #+begin_src shell :tangle yes :var workingDir=(file-name-directory (or load-file-name (buffer-file-name))) :shebang #!/bin/sh cmd="$EMACS -q -l ${workingDir}init.el" #+end_src --8<--

Re: [O] Elisp function for wrapping sexp or region in src-block (was Re: some lisp help)

2014-07-29 Thread Thorsten Jolitz
Xebar Saram writes: > ok ignore above email, i just saw the previous email..damm gmail..grrr RFC is just 'request for comments': , | http://en.wikipedia.org/wiki/Request_for_Comments ` PS I know that feeling, a (too) quick C-c C-c in gnus and that damned email is out ... ;) -- cheer

Re: [O] Elisp function for wrapping sexp or region in src-block (was Re: some lisp help)

2014-07-29 Thread Xebar Saram
Thorsten, thats amazing! thanks so much , really appreciate this i hope other people will also find it useful kind regards Z On Tue, Jul 29, 2014 at 7:23 PM, Xebar Saram wrote: > ok ignore above email, i just saw the previous email..damm gmail..grrr > > z > > > On Tue, Jul 29, 2014 at 7:21

Re: [O] Elisp function for wrapping sexp or region in src-block (was Re: some lisp help)

2014-07-29 Thread Xebar Saram
ok ignore above email, i just saw the previous email..damm gmail..grrr z On Tue, Jul 29, 2014 at 7:21 PM, Xebar Saram wrote: > hi i fell like an idiot but what is RFC, is that a repo of some sorts, > would you mind pasting a link? > > sorry about that > > Z > > > On Tue, Jul 29, 2014 at 5:48 P

Re: [O] Elisp function for wrapping sexp or region in src-block (was Re: some lisp help)

2014-07-29 Thread Xebar Saram
hi i fell like an idiot but what is RFC, is that a repo of some sorts, would you mind pasting a link? sorry about that Z On Tue, Jul 29, 2014 at 5:48 PM, Xebar Saram wrote: > Hi again > > looks great but i think there may be a bug. if there is 1 line then issues > the function works perfect (

Re: [O] Elisp function for wrapping sexp or region in src-block (was Re: some lisp help)

2014-07-29 Thread Thorsten Jolitz
Xebar Saram writes: Hi, > looks great but i think there may be a bug. can you try the new version in my RFC please and let me know if it works as expected. I invested a bit of time into this function because I actually need this quite often too, and I'm happy you pushed me to finally write i

Re: [O] Elisp function for wrapping sexp or region in src-block (was Re: some lisp help)

2014-07-29 Thread Xebar Saram
Hi again looks great but i think there may be a bug. if there is 1 line then issues the function works perfect (although no prompt, which for 1 line is ideal). but using C-u before the M-x dosent seem to do anything at all, it just wraps the current line. do i need any dependencies or doing someth

Re: [O] Elisp function for wrapping sexp or region in src-block (was Re: some lisp help)

2014-07-29 Thread Thorsten Jolitz
Thorsten Jolitz writes: > Xebar Saram writes: This is what I got in my init.el now (improved version with global keybindings). And I like, will probably become one of those commands I use all the time. I already used it to wrap the following code in 3 src-blocks: #+begin_src emacs-lisp (defu

[O] Elisp function for wrapping sexp or region in src-block (was Re: some lisp help)

2014-07-29 Thread Thorsten Jolitz
Xebar Saram writes: > Thx and sorry about not posting to the list, was a gmail mistake (i > really *need* to start with gnus..just to intimidating :)) > > wrapping in parens by marking the region kinda defeats the purpose > sine the original function i posted (in the original post) already > wrap

Re: [O] elisp: link type isn't working

2012-01-24 Thread Nick Dokos
Nick Dokos wrote: > Alan E. Davis wrote: > > > [[elisp:(open-encrypted-file "~/WB/org/junk.org.bfe")][PassWord]] > > > > Anymore, as of today, when I try to run this link, the following is > > received: > > > > " Symbol's function definition is void: org-in-clocktable-p" > > > M-x toggle-de

Re: [O] elisp: link type isn't working

2012-01-24 Thread Nick Dokos
Alan E. Davis wrote: > --f46d0442829ce6a93e04b750a2ca > Content-Type: text/plain; charset=ISO-8859-1 > > I've been using an elisp function to open an encrypted file. I borrowed > this setup from, I think, Sacha Chua's blog. It's worked unfailingly for > at least a couple of years, until tonigh

[O] elisp: link type isn't working

2012-01-24 Thread Alan E. Davis
I've been using an elisp function to open an encrypted file. I borrowed this setup from, I think, Sacha Chua's blog. It's worked unfailingly for at least a couple of years, until tonight. I keep some sensitive information in a file, "junk.org." when encrypted using bcrypt, the file is renamed

Re: [O] Elisp programming style

2011-10-29 Thread Thorsten
Tom Prince writes: > Perhaps > > ,--- > | (defun main-function (args) > | (let ((var (assoc :key1 args))) ; extracting var once > | ... > | (helper-f

Re: [O] Elisp programming style

2011-10-28 Thread Eric Abrahamsen
[...] >> Would that be considered bad style from the original author, or is that >> up to personal choice and not considered a problem? >> > > Not a problem - you can't predict the future. You do the best you can > with your current knowledge. You can always refactor in the future: > that's one

Re: [O] Elisp programming style

2011-10-28 Thread Tom Prince
Perhaps ,--- | (defun main-function (args) | (let ((var (assoc :key1 args))) ; extracting var once | ... | (helper-function1 ... var ...) ; inside let

Re: [O] Elisp programming style

2011-10-28 Thread Thorsten
Tassilo Horn writes: > And I wouldn't tell multiple similar let-bindings duplicate code. I have to get used to that, at first sight it looks like there is redundancy everywhere. But its more from the Java perspective, from the more functional perspective it makes sense. cheers -- Thorsten

Re: [O] Elisp programming style

2011-10-28 Thread Thorsten
Nick Dokos writes: > Not a problem - you can't predict the future. You do the best you can > with your current knowledge. You can always refactor in the future: > that's one reason that having the source code around is important. When > you refactor, you may be cursing the original author for th

Re: [O] Elisp programming style

2011-10-28 Thread Thorsten
Eric Schulte writes: Hi Eric, > Hmmm, this looks suspiciously like the case in some Babel functions :) well ... ;) > in which we originally has instances of the first style and then had to > manually transition to the second. IMO the first is very poor form, the > variables are technically "

Re: [O] Elisp programming style

2011-10-28 Thread Eric Schulte
Tassilo Horn writes: > Thorsten writes: > >>> Too bad you didn't give any concrete examples. >> >> The problem can be described easily: >> >> problem-specific helper-funcions (some redundancy avoided) >> ,--- >> | (defun main-function (arg

Re: [O] Elisp programming style

2011-10-28 Thread Eric Schulte
> > The problem can be described easily: > > problem-specific helper-funcions (some redundancy avoided) > ,--- > | (defun main-function (args) > | (let ((var (assoc :key1 args))) ; extracting var once > | ...

Re: [O] Elisp programming style

2011-10-28 Thread Tassilo Horn
Thorsten writes: >> Too bad you didn't give any concrete examples. > > The problem can be described easily: > > problem-specific helper-funcions (some redundancy avoided) > ,--- > | (defun main-function (args)

Re: [O] Elisp programming style

2011-10-28 Thread Nick Dokos
Thorsten wrote: > Štěpán Němec writes: > > > On Thu, 27 Oct 2011 20:03:22 +0200 > > Thorsten wrote: > > > >> Hi List, doing some Elisp programming (in an orgmode context) > >> recently, the following question with regards to the 'accepted > >> programming style' for Elisp concerned me: > >> > >

Re: [O] Elisp programming style

2011-10-28 Thread Thorsten
Štěpán Němec writes: > On Thu, 27 Oct 2011 20:03:22 +0200 > Thorsten wrote: > >> Hi List, doing some Elisp programming (in an orgmode context) >> recently, the following question with regards to the 'accepted >> programming style' for Elisp concerned me: >> >> How independent and self-sustained s

Re: [O] Elisp programming style

2011-10-28 Thread Štěpán Němec
On Thu, 27 Oct 2011 20:03:22 +0200 Thorsten wrote: > Hi List, > doing some Elisp programming (in an orgmode context) recently, the > following question with regards to the 'accepted programming style' for > Elisp concerned me: > > How independent and self-sustained should helper functions be? >

[O] Elisp programming style

2011-10-27 Thread Thorsten
Hi List, doing some Elisp programming (in an orgmode context) recently, the following question with regards to the 'accepted programming style' for Elisp concerned me: How independent and self-sustained should helper functions be? I found some redundancy in elisp code, e.g. several (main and h

Re: [O] ELISP

2011-10-23 Thread Memnon Anon
Karl Voit writes: > * Carsten Dominik wrote: >> C-u 30 C-c a a > For now I used: > > ,[ from my .emacs ] > | (defun vk-export-agenda() > | "Exports monthly Org-mode agenda to agenda.ics file" > | (interactive) > | (org-agenda-list) > | (org-agenda-month-view) > | (org-write-agenda

[O] ELISP (was: Agenda views w/m: inconsistency, bug)

2011-10-23 Thread Karl Voit
* Carsten Dominik wrote: > > You are looking for a view that covers 30 days. > The view you are requesting can be made with > > C-u 30 C-c a a > > or with a simple custom command that sets > org-agenda-span to 30 in the options section > of the command. I am (almost) to afraid to ask here (OT, ne

Re: [O] Elisp Primer?

2011-03-11 Thread Nick Dokos
Matthew Sauer wrote: > I am wanting to learn about/have a reference guide for elisp. I am a huge > fan of the O'Reilly books for the other languages I have worked with but I > was wondering if someone knew of an online repository (possibly like Worg) > that might be available to pull onto my sys

Re: [O] Elisp Primer?

2011-03-11 Thread brian powell
*I strongly agree with John Hendy: Robert Chassel's "An Introduction to Programming in Emacs Lisp": http://www.gnu.org/software/emacs/emacs-lisp-intro/ --should be mastered first (it should be the first book @everyone@ reads.) *O'Reilly's "Safari" has online books for $20/month you can put 10 bo

Re: [O] Elisp Primer?

2011-03-11 Thread John Hendy
On Fri, Mar 11, 2011 at 1:26 PM, Matthew Sauer wrote: > I am wanting to learn about/have a reference guide for elisp.  I am a huge > fan of the O'Reilly books for the other languages I have worked with but I > was wondering if someone knew of an online repository (possibly like Worg) > that might

[O] Elisp Primer?

2011-03-11 Thread Matthew Sauer
I am wanting to learn about/have a reference guide for elisp. I am a huge fan of the O'Reilly books for the other languages I have worked with but I was wondering if someone knew of an online repository (possibly like Worg) that might be available to pull onto my system that I could read right in