Re: [O] multiple cursor not working properly with org-mode

2015-10-16 Thread Ivan Andrus
I haven’t been following the thread so this may have already been asked,
but have you checked ~/.emacs.d/.mc-lists.el ?

Perhaps org-self-insert-command found it’s way into the wrong list.  It’s
safe to just delete the file and restart Emacs.

-Ivan


On Oct 16, 2015, at 9:53 AM, Jérémie Juste  wrote:

*
   emacs version

   GNU EMACS 24.5.1 (X86_64-REDHAT-LINUX-GNU, GTK+ VERSION 3.16.6) OF
2015-09-14 ON BUILDVM-10.PHX2.FEDORAPROJECT.ORG


   Org version

   Org-mode version 8.3.1 (8.3.1-103-g366dc4-elpa @
/home/DJJ/.emacs.d/elpa/org-20150907/)


   * About the problem

   When I have a key binding which is s-d for mc/mark-next-like-this. This
works pretty well. I can mark easily what I want to mark. I can delete
characters with all the cursors but when I type a character only the first
cursor enters them. I have the same issue with  mc/mark-previous-like-this.

   I tried the same procedure with different mode but didn't have any
problem. (eg ess-mode, python-mode, text-mode, lisp-mode)

I hope I have provided enough info. I'll be glad to provide more info if it
can help.

On Fri, Oct 16, 2015 at 5:20 PM, Kaushal Modi 
wrote:

> I am using the same multiple-cursors version.
>
> What is you OS, emacs version (M-x emacs-version) and org-mode version
> (M-x org-version)?
>
> I don't know if that information will help as I have never seen the
> problem you described. But it will still be good to have that info.
>
> What happens when you try to write anything.. can you post what you
> get when you hit something like "C-h c a" once you are in that mode
> when you cannot type?
> Does this happen after all of multiple-cursors commands
> (mc/mark-next-like-this, mc/mark-prev-like-this, ...)?
>
> It will be very useful if you can provide a step-by-step explanation
> of what commands you are running to recreate that problem starting
> from an emacs -Q session.. provide us a recipe of the problem.
>
> It should also open this issue on the multiple-cursors github with all
> the above info if you are sure that this happens only with
> multiple-cursors loaded.
>
> --
> Kaushal Modi
>
>
> On Fri, Oct 16, 2015 at 11:10 AM, Jérémie Juste 
> wrote:
> > Hello,
> >
> > I started an emacs - Q session and loaded only multiple-cursors. I still
> > have the same issue.
> > my verson of multiple-cursors is multiple-cursors-20150710.456 - the
> latest
> > one from melpa.
> >
> >
> >
> > On Wed, Oct 14, 2015 at 11:17 PM, Kaushal Modi 
> > wrote:
> >>
> >> It works fine for me.
> >>
> >> Have you tried starting an emacs -Q session and loading just
> >> multiple-cursors (and org-mode, if you are not using the org-mode
> version
> >> shipped with emacs)?
> >>
> >> Can you replicate the problem then?
> >>
> >> If not, then comment out your whole emacs config and uncomment it 50%
> at a
> >> time between emacs restarts till you narrow down to the part in the
> config
> >> causing this issue.
> >>
> >>
> >> --
> >> Kaushal Modi
> >>
> >> On Wed, Oct 14, 2015 at 4:56 PM, Jérémie Juste 
> >> wrote:
> >>>
> >>> Hello,
> >>>
> >>> Multiple cursor is a very handy tool. but I don't understand why it
> does
> >>> not work properly in org-mode.  I can delete characters but I cannot
> write
> >>> anything in org-mode. For the time being when it's not too costly I've
> >>> resorted switching to text-mode make the modification and then back to
> >>> org-mode.
> >>>
> >>> anyone tried something better?
> >>>
> >>> --
> >>> Jérémie Juste
> >>
> >>
> >
> >
> >
> > --
> > Jérémie Juste
>



-- 
Jérémie Juste


Re: [O] another example of org being slow, with some analysis

2015-06-18 Thread Ivan Andrus
I’m jumping into the middle of the thread, but have you tried

(setq cache-long-scans nil)

That solved some performance issues for me.  I can’t remember where
I got the advice.

-Ivan

On Jun 18, 2015, at 10:28 AM, Eric S Fraga  wrote:

Hello,

there have been a few threads recently mentioning poor
performance.  Although some of these have been resolved (e.g. the use of
=linum=), I wonder if I could add a data point.

I have a medium (for me) sized (385 kB) org file with all of my "tasks"
in a date-tree structure.  One of the tasks requires me to edit a small
table every day for a couple of weeks (see below for the table).  Asking
for a recalculation of the table (C-u C-c C-c) takes 17 seconds on a new
laptop (16 GB RAM, SSD, i7 cpu, Debian linux testing) which is quite
fast at most other tasks.

The output of the ELP profiler is here:

--8<---cut here---start->8---
org-ctrl-c-ctrl-c   117.655796272  17.655796272
org-table-recalculate   117.652738791  17.652738791
org-table-get-range 14   13.166332242  0.940452303
org-table-eval-formula  19   13.101183716  0.6895359851
org-goto-line   104  10.761145733  0.1034725551
org-table-copy-region   13   7.362366204   0.5663358618
org-current-line66   6.8422078910  0.1036698165
org-table-get-descriptor-line   28   1.659497877   0.0592677813
org-table-align 10.415633428   0.415633428
org-table-get-specials  10.206756703   0.206756703
org-table-expand-lhs-ranges 10.103551707   0.103551707
org-element--parse-to   60.0031655370  0.0005275895
org-babel-execute-safely-maybe  10.002872891   0.002872891
org-babel-execute-maybe 10.002870729   0.002870729
org-babel-execute-src-block-maybe   10.002846968   0.002846968
org-element-at-point30.0028012790  0.0009337596
org-babel-where-is-src-block-head   10.002664822   0.002664822
org-element--cache-compare  303  0.0025883040  8.542...e-06
org-table-current-column119  0.002235665   1.878...e-05
--8<---cut here---end--->8---

The table, for completeness, is here:

#+begin_src org
 | date | TBD | Victoria | London Bridge | Blackfriars | City |
Farrindgon | St Pancras | Totals | Miles |
 |  | 2.5 |5 |   4.8 | 3.2 |  2.9 |
 5 |1.6 ||   |
 
|--+-+--+---+-+--++++---|
 | [2015-06-08 Mon] |   2 |  |   | |1 |
   |  1 |9.5 |   5.9 |
 | [2015-06-12 Fri] |   2 |  |   |   1 |  |
   |  1 |9.8 |   6.0 |
 | [2015-06-15 Mon] |   2 |  | 1 | |  |
   |  1 |   11.4 |   7.0 |
 | [2015-06-17 Wed] |   2 |  |   |   1 |  |
   |  1 |9.8 |   6.0 |
 | [2015-06-18 Thu] |   1 |  |   |   1 |  |
   ||5.7 |   3.5 |
 
|--+-+--+---+-+--++++---|
 | Totals   |   9 |0 | 1 |   3 |1 |
 0 |  4 |   46.2 |  28.5 |
 ,#+TBLFM: @>$2..@>$>>=vsum(@I..@II)::$9=($2..$>>>)*(@<<$2..@
<<$>>>);EN::$10=$9/1.62;%.1f
#+end_src

If I change, for instance, the entry in the TBD column for today from 1
to 2, in the original file, it takes 17 seconds.  If I do it in this
email buffer (changing mode to org etc.), it is essentially
instantaneous.

Large buffers seem to be causing problems with org.  I've noticed this
elsewhere as I do tend to work with org files that are often 0.25-1 MB
in size.  Having looked at the profiler output, my gut feeling was that
the buffer is being repeatedly parsed (or some similar activity) given
where the time is being spent.  So... as the table is currently 99% of
the way into the buffer, I have copied the table to the start of the
same large document and, lo and behold, the table recalculation on the
copy is instantaneous!

(the moral of the story, for me, may be to use a reverse date-tree
structure for my tasks, if such were possible... maybe it is, given the
hidden gems in org! ;-)

I would be happy to instrument more than just org, if it would help.  I
should add that the above profile was done using emacs -Q so no
customisations.

I have no real issue with the performance of org overall but I thought
I'd add a data point in case it helps.

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1216-gb856f6


Re: [O] [ANN] Org-gamify

2014-07-09 Thread Ivan Andrus
On Jul 8, 2014, at 8:39 PM, Paul Sexton  wrote:

> I have written a plugin for org agenda, which allows "gamification" of
> task management. Define currencies, earn them by completing tasks, and
> spend them on rewards. Inspired by HabitRPG, Epic Win and similar
> systems.
> 
> http://bitbucket.org/eeeickythump/org-gamify
> 
> Note - I am well aware of existing criticisms of gamification. I have
> significant reservations about many of its applications myself. However 
> I am not going to enter into any debate about its desirability or 
> ethicality. I have written some software to allow individuals to 
> voluntarily experiment with gamifying aspects of their own task 
> management systems, in order to find out whether it is enjoyable or 
> useful for them.

This looks quite interesting.  I’m going to have to try it out.  On a similar 
vein, I started (but kind of stalled) working on my own gamification for 
learning Emacs (available on MELPA):

https://bitbucket.org/gvol/emacs-achievements

Right now it’s only achievements (and I didn’t have any plans of anything else 
like experience).  I need to write more achievements to unlock (suggestions 
greatly welcome—especially org related), and I think it might be cool to 
integrate with org-gamify to offer a richer experience.

-Ivan




Re: [O] Fwd: Mac OS Alias file links

2014-04-14 Thread Ivan Andrus
On Apr 14, 2014, at 12:36 PM, Ken Mankoff  wrote:

> On 2014-04-14 at 13:42, Charles Berry wrote:
> 
>> For this to work as you fantasize, you would need to enable the Finder
>> application to modify the part of the *.org file that encodes the
>> alias when you change the location of the aliased file just as the
>> Finder does to the alias when the location of the aliased file is
>> modified in the Finder.
> 
> I don't think so. I'm not sure how BibDesk handles it, but my BibTeX
> file is not modified when I move the PDF that is linked to an entry via
> that 1200 character field that encodes the alias. Clearly BibDesk does
> something neat to encode and decode that field, but once created, the OS
> nor Finder know anything about that line or the file containing it. I
> don't think Finder would need to know about a string in an Org file
> either.

We can look at a BibDesk file to see how it works.  It adds a special field 
like:

Bdsk-File-1 = {YnBsaXN0MDDUA...AAAMO}

We guess that this base64 encoded, so we decode it (M-x base64-decode-region)  
This then gives us a binary plist (it starts with bplist) which we can turn 
into a readable form with M-: plutil -convert xml1 -o - - RET

This gives an xml representation of what BibDesk stores.  It’s an archived 
object of some kind, but I don’t know about OS X aliases to know what is the 
important part--I presume the NS.data portion.  It probably wouldn’t be too 
hard to borrow the code from BibDesk and extend Emacs to do the same thing, or 
write an external script.  I’m not sure whether it would be possible to do it 
without touching C/Obj-C.  I would be interested in using such a thing (in 
BibDesk .bib files actually), though probably not in writing it.  :-)

-Ivan


Re: [O] Folding buglet?

2014-01-03 Thread Ivan Andrus
On Jan 3, 2014, at 3:29 AM, Bastien  wrote:

> Hi Thomas,
> 
> t...@tsdye.com (Thomas S. Dye) writes:
> 
>> Aloha all,
>> 
>> * Folding issue
>> - One
>> - Two
>> 
>> With this Org mode buffer, which ends immediately after "Two" with no
>> new line, the "o" of Two shows up when the headline is folded:
>> 
>> * Folding issue...o
>> 
>> Obviously, not a big deal, but not expected behavior.
> 
> Yes.  I've not searched deep into Org, but I suspect this is
> related to outline rather than Org.
> 
> Btw, I didn't notice this before because I use
> 
> (setq require-final-newline t)
> 
> which you might find useful.

FWIW, I use that setting, but I see the issue when I am narrowed to a subtree, 
since narrowing to a subtree doesn't include a final newline.  Though as Thomas 
says, it's not a big deal.

>> BTW, 2013 was a good year for Org mode in my book.  Many thanks for all
>> the improvements to this already-awesome software.  The Org mode
>> community is a source of real pleasure.  Happy New Year!
> 
> Indeed -- thanks to everyone involved!

+1

-Ivan


Re: [O] text-only plots

2013-12-09 Thread Ivan Andrus
On Dec 9, 2013, at 5:19 AM, Suvayu Ali  wrote:

> Hi Thierry,
> 
> On Sun, Dec 08, 2013 at 11:10:47PM +, Thierry Banel wrote:
>> Carsten Dominik  gmail.com> writes:
>>> 
>>> This is not a lot of code - I would not mind simply integrating this into
>> org-table.el  The only hickup might be
>>> that this could be trouble for the exporters - or have you produced the
>> webpage directly from an org file?
>> 
>> I'm not sure I understand the exporters issue.
>> Do you talk about the html exporter, the Odt exporter, and so on ?
>> Well, once a plot has been added to a table, it is just text.
>> It will be exported as any other content in the table.
>> Maybe I'm missing something...
>> 
>> Yes, this webpage:
>> http://orgmode.org/worg/org-contrib/orgtbl-ascii-plot.html
>> was produced by the Worg engine, from a regular Org file.
> 
> Technically speaking, it is not exported as a table since you put it as
> part of example block.  However a quick test tells me, html export will
> work fine (screenshot attached).  However LaTeX export is an entirely
> different story.  Unicode support in normal pdflatex is quite
> non-trivial.  If you use XeLaTeX, I think you could get it to work with
> some appropriate choice of fonts.  I tried libertine and dejavu without
> any luck.

Would it be possible to export it to \rule when using LaTeX?  It wouldn't be 
text then and you couldn't copy it, but it should work with any TeX engine 
regardless of fonts etc.  Just a thought.

-Ivan


Re: [O] Writing Challenge

2013-11-03 Thread Ivan Andrus
FWIW, I have added nanowrimo.el to MELPA.

-Ivan

On Oct 19, 2013, at 9:22 PM, Ivan Andrus  wrote:

> Very interesting! I have been working on a mode which gives the current 
> word-count, WPM and an estimate of the time it will take to hit today's quota 
> in the modeline.  I would be interested in feedback as well as integrating it 
> with your spreadsheet.  You can find it at
> 
> https://bitbucket.org/gvol/nanowrimo.el
> 
> -Ivan
> 
> On Oct 19, 2013, at 3:03 PM, Bob Newell  wrote:
> 
>> A couple of us who are writers have worked on a "writing challenge"
>> spreadsheet. This year, for the upcoming National Novel Writing Month,
>> I've greatly modified (read: made more complex) the challenge
>> spreadsheet, and implemented it in org-mode.
>> 
>> It's attached, for anyone who's interested. I know there are other
>> writers and WriMos out there.
>> 
>> It probably has bugs. No, it surely has bugs. Comments welcomed.
>> 
>> I'm kind of attachment-challenged so if it doesn't appear below, get it
>> at
>> 
>> http://www.bobnewell.net/filez/newchallenge.org
>> 
>> -- 
>> Bob Newell
>> Honolulu, Hawai`i




Re: [O] org-writers-room sort of works! just in time for NaNoWriMo

2013-10-31 Thread Ivan Andrus
Looks cool.  I already opened one issue on github.  :-)

-Ivan

On Oct 31, 2013, at 10:00 PM, Matt Price  wrote:

> I have just pushed a more-or-less-working version of my "Org Writer's
> Room" mode to github:
> 
> https://github.com/titaniumbones/org-writers-room
> 
> It's a very simple set of mostly-trivial minor modes that creates a
> Scrivener-like writing environment for org users.  put
> org-writers-room.el in your load path, load or require it, and then,
> in an org-mode file, type M-x org-writers-room.  This will close all
> but one of your existing windows, split the remaining window into 3
> columns, and populate them as follows:
> 
> - left-hand column contains your unnarrowed original org file.
> Ideally it should be org-global-cycle'd to "children" but I can't see
> how to instruct org-cycle or org-global-cycle to set visibility to a
> particular level.  (I would also like to have the entire "PROPERTIES"
> drawer and ALL NON-HEADING CONTENTS of the heading hidden at all
> times, but I can't figure that out either).
> - wide center column contains an indirect buffer narrowed to the
> subtree at point in the main buffer.
> - right-hand column contains a second indirect buffer narrowed to the
> properties drawer of the subtree at point.
> 
> In the left-hand column, press C-c C-x b or just RET on a heading to
> "activate" it and place its contents in the other two columns.
> 
> It could definitely be a lot better but it's not so terrible!  It
> allows you to have an overview of the project as a whole, a clean view
> of the section you're writing at the moment, and a look over at the
> metadata -- the "back of the index card" from Scrivener -- to remind
> you of what you're trying to do in the setion you're currently
> writing.
> 
> I would really like to make the metadata part more robust, with maybe
> some functions that let you edit the property values without touching
> the property names, and perhaps some fontlock trickery to make it look
> prettier.  Siilarly, I'd like to do a bit more with the guide and evne
> with the main section.  Eventually, I'd also like to make it
> compatible with zotero-plain so I can start to use citations properly
> in org-mode instead of inserting them post-facto in libreoffice
> (ugh!).But for now I'm pleased it works at all.
> 
> I would love it if people would try it out.  It should be much more
> stable than the last, awful version I posted some months ago.  The
> code is very simple and mostly just
> 
> (1) rewrites the org functions for dealing with indirect buffers, so
> that the indirect buffers don't need to be clones of the parent buffer
> (2) changes some keybindings
> (3) sets up the stable window configuration described above.
> 
> I would really love it if some other people would try it out, and (oh
> please!) suggest/implement improvements.  I am well aware of my
> terrible coding limitations.
> 
> Thank you,
> matt
> 
> PS, the readme on github is a little out of date, but the code itself
> is mostly documented so I hope that helps.  Though there's no general
> documentation at the top of the file -- oops, sorry.
> 




Re: [O] Writing Challenge

2013-10-31 Thread Ivan Andrus
I'm really sorry I didn't reply sooner.  I was out of town, and then I forgot 
to follow up.

On Oct 27, 2013, at 2:07 AM, Alan Schmitt  
wrote:

> Hi Ivan,
> 
> darthand...@gmail.com writes:
> 
>> Very interesting! I have been working on a mode which gives the
>> current word-count, WPM and an estimate of the time it will take to
>> hit today's quota in the modeline.  I would be interested in feedback
>> as well as integrating it with your spreadsheet.  You can find it at
>> 
>> https://bitbucket.org/gvol/nanowrimo.el
> 
> I've been looking at your mode, and I find it very interesting. Here are
> a couple typos I've found (for documentation strings):
> 
> - documentation of nanowrimo-total-goal should be "How many words you
>  would like to write in total."
> - documentation of nanowrimo-today-goal should be "How many words you
>  would like to write today."
> - documentation of nanowrimo-org-table-name should be "Name of the table
>  where goals are tracked."

Thanks.  Those are fixed now.

> Finally, it would be great if nanowrimo-today-goal could be computed
> from the "quota" part of the spreadsheet.

That's is a good idea.  You can now customize 
`nanowrimo-today-goal-calculation-function' and `nanowrimo-finish-functions' to 
update today's goal and progress.  Perhaps I should make them default to the 
"correct" values since they should be no-ops if you are not in org-mode.  But I 
haven't tested that all.  Nor have I tested the case when you use org-mode, but 
don't have the table inserted (which you can do with 
`nanowrimo-insert-org-table').

-Ivan


Re: [O] Writing Challenge

2013-10-19 Thread Ivan Andrus
Very interesting! I have been working on a mode which gives the current 
word-count, WPM and an estimate of the time it will take to hit today's quota 
in the modeline.  I would be interested in feedback as well as integrating it 
with your spreadsheet.  You can find it at

https://bitbucket.org/gvol/nanowrimo.el

-Ivan

On Oct 19, 2013, at 3:03 PM, Bob Newell  wrote:

> A couple of us who are writers have worked on a "writing challenge"
> spreadsheet. This year, for the upcoming National Novel Writing Month,
> I've greatly modified (read: made more complex) the challenge
> spreadsheet, and implemented it in org-mode.
> 
> It's attached, for anyone who's interested. I know there are other
> writers and WriMos out there.
> 
> It probably has bugs. No, it surely has bugs. Comments welcomed.
> 
> I'm kind of attachment-challenged so if it doesn't appear below, get it
> at
> 
> http://www.bobnewell.net/filez/newchallenge.org
> 
> -- 
> Bob Newell
> Honolulu, Hawai`i



Re: [O] org-clock-idle-time

2013-07-12 Thread Ivan Andrus
Do you have a stale .elc or somewhere?  Those are the bane of my existence.

-Ivan

On Jul 12, 2013, at 9:39 AM, J. David Boyd  wrote:

> Nick Dokos  writes:
> 
>> da...@adboyd.com (J. David Boyd) writes:
>> 
>>> A while back I set this to 5 minutes, and tried it for a while, and decided 
>>> I
>>> didn't like it, and set it back to never.
>>> 
>>> ...
>>> I've grepped all my .el and .org files, and can find no references to that
>>> variable anywhere.
>>> 
>>> However, it still fires off after 5 minutes.  I come back to my emacs window
>>> to clock out of the current task and into another one, and I get prompted to
>>> decide what to do with my idle time.
>>> 
>>> Any ideas where this setting is hiding?
>>> 
>> 
>> Did you check your customize file?
>> C-h v custom-file RET
> 
> Yes, thanks.  First place I looked.  It's custom.el on my system.
> 
> 




Re: [O] Skim.app support for org-mac-link-grabber.el

2013-05-12 Thread Ivan Andrus
Just two comments from someone who didn't know org-mac-link-grabber existed 
until today (I'm gonna try it out) and hasn't (yet) contributed to org-mode.

1. It looks like it's actually enabled by default
2. You can detect whether it should be enabled by default with something like

(< 0 (length (shell-command-to-string
  "mdfind kMDItemCFBundleIdentifier == 
'net.sourceforge.skim-app.skim'")))

which will tell whether you have skim installed.  I haven't looked at 
org-mac-link-grabber to see if other similar changes could be made.  So the 
defcustom would be changed to

(defcustom org-mac-grab-Skim-app-p
  (< 0 (length (shell-command-to-string
"mdfind kMDItemCFBundleIdentifier == 
'net.sourceforge.skim-app.skim'")))
  "Enable menu option [S]kim to grab page links from Skim.app"
  :tag "Grab Skim.app page links"
  :group 'org-mac-link-grabber
  :type 'boolean)

-Ivan

On May 12, 2013, at 12:29 PM, Daniil Frumin  wrote:

> Hi, all!
> 
> I use org-mac-link-grabber.el 
>  almost every 
> day. However, it lacks support for an app that I'd like to use together with 
> org-mode. 
> 
> Skim.app is a light and fast PDF reader for Mac OS X with a note-taking 
> ability. I wrote a little patch for org-mac-link-grabber.el to support 
> grabbing links to documents.
> 
> What it does:
> 
> * Grabs not just the link to file, but a page
> 
> * Inserts the selected text as a description, if present. Otherwise
>  inserts ", p. "
> 
> * The shortcut is set to [S]
> 
> * Defines a new "skim" link type
> 
> It would be interesting to also add some support for importing notes from 
> Skim to org.
> 
> Since Skim.app is not present in clean OS X installs, by default support for 
> grabbing links from it is disabled. You can enable it by customizing group 
> `org-mac-link-grabber'.
> 
> So, maybe it's possible to get this patch into the tree? It's my first time 
> hacking on org (or even any major elisp extension), so it's probably that 
> I've messed up somewhere with a commit format or whatnot.
> 
> Cheers.
> 
> -- Daniil Frumin
> <0001-Adding-Skim.app-support-to-org-mac-link-grabber.el.patch>




Re: [O] python sessions

2013-03-25 Thread Ivan Andrus
On Mar 25, 2013, at 11:27 AM, Andreas Röhler  
wrote:
> Am 25.03.2013 17:43, schrieb Eric Schulte:
>> John Hendy  writes:
>> 
>>> On Mon, Mar 25, 2013 at 11:01 AM, Ista Zahn  wrote:
 On Mon, Mar 25, 2013 at 11:40 AM, Eric Schulte  
 wrote:
> John Hendy  writes:
> 
>> On Sun, Mar 24, 2013 at 9:38 PM, Nick Dokos  
>> wrote:
>>> Eric Schulte  wrote:
>>> 
> 
> From participating in evaluating code throughout the discussion and
> catching the comments throughout, I'd say yes, at least in terms of
> how other babel languages function. In other words =#+begin_src R
> :session foo= creates an R session named "foo" whereas doing the same
> with =python= instead of =R= does not yield a named session.
> 
> From what others experienced, however, the functionality was working
> correctly (results were persistent across blocks and two differently
> names blocks created two different sessions), just not named
> correctly.
> 
 
 See the cond form starting at line 169 in ob-python.el.  Different
 session functionality is used based on the `org-babel-python-mode'
 variable, and on the version of Emacs in use (prior to 24.1 or not).
 
 The branch taken when `org-babel-python-mode' equals 'python is
 certainly broken, as it never saves the name of the newly created
 buffer, so session re-use and use of multiple named sessions probably
 works only when `org-babel-python-mode' equals 'python-mode.
 
>>> 
>>> That's me: org-babel-python-mode's value is python, so it's no wonder
>>> it's broken given what Eric says. I'm on emacs 24.3.50 where there is
>>> python.el but no python-mode.el. I tried the "cheap" workaround of
>>> switching the value to python-mode, but that does a (require
>>> 'python-mode) somewhere, so that option is out as well.
>> 
>> I'm on Emacs 24.3.1 and have no python-mode.el, either (only
>> python.el). My setup is working correctly (again, with the caveat of
>> not having named sessions).
>> 
> 
> It sounds like we have the same setup, and the following un-named
> session example does not work for me.  The first code block evaluates
> successfully, but it doesn't appear to be having any impact on the
> default session (e.g., in the *Python* buffer).
> 
>Returns the value of x as expected.
> 
>#+begin_src python :session
>  x = 1
>  return x
>#+end_src
> 
>#+RESULTS:
>: 1
> 
>#+begin_src python :session
>  return x
>#+end_src
> 
>#+RESULTS:
> 
> The second code block /should/ have access to the x variable defined
> previous, but instead it throws an error because x is undefined.
> 
> Currently I'd say session support for python is completely broken.
 
 As of this morning I've joined the "it does not work" crowd. Python
 sessions worked for me last week, but are now completely broken for me
 in the way Eric and others describe.
>>> 
>>> Interesting... checked out back to that commit
>>> (eff59a15d76647ce8282626b9eb463dc3706d56e) and it still doesn't work.
>>> On a whim, I checked my pacman log (Arch's install system) and
>>> coincidentally on Mar 20 /after/ I wrote that post in which things
>>> work, I ran a system package update.
>>> 
>>> $ grep -i emacs /var/log/pacman.log
>>> 
>>> [2013-03-20 12:51] upgraded emacs (24.2-4 -> 24.3-1)
>>> 
>>> Using the Arch Rollback Machine, I downloaded Emacs 24.2.4 and
>>> downgraded (also required downgrading imageMagick from 6.8.3.10 ->
>>> 6.8.2.3). Now it works again (refer to the reproducible example from
>>> the mailing list post):
>>> - http://www.mail-archive.com/emacs-orgmode@gnu.org/msg68238.html
>>> 
>>> Eric, your example fails for me. I get:
>>> 
>> 
>> Yes, because my example only works in external (non session) execution
>> with the current buggy code, where as your example works with session
>> execution in the old working code.
>> 
>>> 
>> x = 1
>> return x
>>>  File "", line 1
>>> SyntaxError: 'return' outside function
>>> 
>>> This works, hoever:
>>> 
>>> #+begin_src python :session
>>>  x = 1
>>>  x
>>> #+end_src
>>> 
>>> #+RESULTS:
>>> : 1
>>> 
>>> #+begin_src python :session
>>>  x
>>> #+end_src
>>> 
>>> #+RESULTS:
>>> : 1
>>> 
>>> So, with emacs 24.2.4 and current Org-mode (pulled just now) and clean
>>> make, *both* named and un-named sessions work for me on Arch Linux.
>>> 
>> 
>> Aha! Thanks for sleuthing this out.  So the problem lies in changes to
>> the python.el distributed with Emacs.  I don't suppose we can ask
>> whoever made these changes to python.el to fix the breakage they've
>> caused in Org-mode?
>> 
>> Thanks,
>> 
> 
> Please give me some time still to investigate. Still doubt it's python.el
> But if yes,

Re: [O] Automatically escaping single spaces

2013-03-19 Thread Ivan Andrus
Oops, forgot to reply to the list.

On Mar 18, 2013, at 9:59 PM, Aaron Ecay  wrote:

> Hi Suvayu,
> 
> I’ve had on my list of rainy day ideas for a while writing a function
> for org-export-filter-plain-text-functions that would implement
> something like this.  It should be as simple as doing a text replace,
> either on “. [^ ]” sequences in general or only spaces after a given
> list of abbreviations.  The advantage of the second approach is that it
> could catch the case where “e.g.” is at the end of a line in the org
> document.  (You’d also have to remove the newline: translate “e.g.\nfoo”
> into “e.g.\ foo”).  Another advantage to pre-specifying is that you might
> want a non-breaking space in “Fig.~1” but a breakable space in “e.g.\ foo”;
> so you could keep two lists.

FWIW, You shouldn't have to worry about newlines.  If Emacs is setup properly 
they should never appear except at sentence boundaries. Which is to say, 
autofill and fill-paragraph know not to break lines in the middle of a sentence 
after punctuation.  If the user adds a newline manually you can assume they 
meant it to be a new sentence.  IIRC the variable at play is 
`sentence-end-double-space'.

-Ivan


[O] Bug: Docstring of `org-clock-persist' doesn't mention `history' [7.9.2 (7.9.2-90-ge5ea08-elpaplus @ /Users/gvol/vcs/emacs/local/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2012-12-27 Thread Ivan Andrus
Hello org maintainers,

The manual suggests setting `org-clock-persist' to 'history, but this value 
isn't documented in the docstring.  There is an explicit check for the value of 
history in `org-clock-save', so I think it should be documented since it's more 
than just a non-nil value.

Thanks,
Ivan


Emacs  : GNU Emacs 24.3.50.3 (i386-apple-darwin12.2.0, NS apple-appkit-1187.34)
of 2012-12-14 on oroszlan.local
Package: Org-mode version 7.9.2 (7.9.2-90-ge5ea08-elpaplus @ 
/Users/gvol/vcs/emacs/local/nextstep/Emacs.app/Contents/Resources/lisp/org/)

current state:
==
(setq
org-hide-leading-stars t
org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
org-ctrl-c-ctrl-c-final-hook '(decrypt-current-block)
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
org-confirm-shell-link-function 'yes-or-no-p
org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
org-special-ctrl-a/e t
org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
org-agenda-skip-scheduled-if-done t
org-agenda-custom-commands '(("t" "TODO today" todo "TODO"
   ((org-agenda-sorting-strategy (quote (time-up
   nil)
  ("l" "TODO today" tags "LaTeX"
   ((org-agenda-sorting-strategy
 (quote (priority-down)))
)
   nil)
  ("d" "dissertation" todo "Dissertation"
   ((org-agenda-files
 (quote ("~/TeX/dissertation/todo.org")))
(org-agenda-sorting-strategy (quote 
(priority-up
   nil)
  ("v" "Creative" tags "creative"
   ((org-agenda-sorting-strategy (quote 
(alpha-up
   nil)
  )
org-todo-keyword-faces '(("IDEA" :foreground "orange" :weight bold)
  ("LATER" :foreground "orange" :weight bold)
  ("WORKING" :foreground "orange" :weight bold))
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-export-copy-to-kill-ring nil
org-mode-hook '(er/add-org-mode-expansions
 #[nil "\300\301\302\303\304$\207"
   [add-hook before-save-hook org-encrypt-entries nil t] 5]
 alth-auto-hook-org-mode-hook
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all 
append
local]
   5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook 
org-babel-show-result-all
append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
org-export-with-tags 'not-in-toc
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-directory "~"
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
org-tags-exclude-from-inheritance '("crypt")
org-export-latex-format-toc-function 'org-export-latex-format-toc-default
org-export-blocks '((src org-babel-exp-src-block nil)
 (export-comment org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
org-archive-location "~/Documents/archive.org::From %s"
org-export-first-hook '(org-beamer-initialize-open-trackers)
org-export-interblocks '((src org-babel-exp-non-block-elements))
org-export-with-drawers nil
org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info org-jsinfo 
org-irc
   org-mew org-mhe org-rmail org-vm org-w3m org-wl org-habit)
org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el"))
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-ditaa

Re: [O] The statement on what is orgmode.

2012-12-07 Thread Ivan Andrus
On Dec 7, 2012, at 9:50 AM, David Rogers  wrote:
> brian powell  writes:
> 
>> So, again, seriously, this thread is misnamed.  "What can't you do in
>> Emacs/OrgMode?"  What can't it be used for?--this should be the thread!
>> 
>> I'd really like to know.  Every week or two, something comes off my very
>> tiny list, which is just about empty.
> 
> Seriously seriously?
> 
> Things you can't do in Emacs that feel as if they *should* be practical,
> even though they currently are not
> 
> - Web browsing with ease, and with a full list of currently-expected
>  features (i.e. features to make the general public say "Wow! This is
>  much better than Firefox! I'm switching to this for banking, and for
>  everything else as well!" - not "Umm, why does it look like
>  this?"). This single (admittedly huge) feature, probably along with
>  the next one, are IMO the "killer features" that Emacs does not have.

Well, "with ease" is the problem there, eh?  I think that's the problem with 
most of the rest of these as well.  I think the problem is someone thinks, 
"Hey, X would be cool in Emacs" and so they start implementing it.  But then 
it's not as cool as they thought and since it _really_ hard to compete with 
some of the existing software that does X, they give up and the result is that 
it "barely works".I have included some links below as evidence.  I have no 
affiliation with any of them (even as user) so I cannot say whether they work 
or don't or how well, etc.  This list is intended for entertainment purposes 
only, comes with no warranty expressed or implied… It just amazes me the things 
that people are willing to try to implement in Emacs.

> - Ability to continue working in other buffers when one buffer is
>  busy. Combine this feature and the one mentioned above, and I (perhaps
>  along with a lot of other people) move from two primary every-day
>  applications down to one.

I agree, this would be very nice.

> - WYSIWYG word processing with multiple fonts per page, adjustable
>  margins, and named styles (not saying it should ever be implemented,
>  just saying it's something Emacs can't currently be used for)
 
Well, there is enriched-mode.  I did use this once briefly.


> And how about fantasy-but-would-be-really-useful features? Nearly unlimited.
> 
> - Fully-functioning, practical Org-mode & Gnus & Emacs on a touch screen

Would Emacs be Emacs without 5 modifier keys?

> - Optical character recognition within Emacs

http://emacspeak.sourceforge.net/info/emacspeak_002docr.html

> - Text entry by voice (including programming languages) within Emacs

http://www.emacswiki.org/emacs/SpeechToText

> - Hand-written text entry directly into Emacs, including filling in web forms

Maybe if you speak Chinese: http://www.youtube.com/watch?v=hC6l8gDaYzQ


> And then comes the truly unlimited category of "What, are you crazy???"

Yes, Emacs users are crazy!

> - Emacs Movie Editor

Maybe you haven't heard of https://savannah.nongnu.org/projects/gneve/ ?  I was 
originally going to just reply with just this link, but then I did some 
searching and found the rest.

> - Emacs Music Recording Studio

Not a studio, but maybe a step in the right direction: 
http://emacswiki.org/emacs/erec.el

> - Emacs Audio-To-Text Song Lyrics Transcriber

This one seems very hard, and in fact I could not find anyone who has tried.

> - "SkypEmacs" simultaneous videoconferencing and collaborative text
>  editing, where the participants all type into the same document at
>  once, but also their entire voice conversation is automatically
>  transcribed to plain text, and that transcription saved in the same
>  directory as the document.

I think this is probably only chat, but there is 
https://github.com/buzztaiki/emacs-skype

> (i.e. things that prove "It isn't all text after all, but some of it is".)

:-)

-Ivan


Re: [O] Use default value if a variable is not defined

2012-10-12 Thread Ivan Andrus
On Oct 11, 2012, at 6:04 PM, Nathan Neff wrote:

> Hello,
> 
> I'm trying to create a function that will tell org-capture
> dynamically where to put the captured item.
> 
> I have it almost working -- where I'm getting hung up on is
> with basic Emacs lisp.  I want to basically implement this
> pseudo code:
> 
> IF I have defined a variable called njn/current-q-file then
>(find-file njn/current-q-file)
> ELSE
>   (find-file ("questions.org")))
> 
> However, if I do not define my njn/current-q-file then
> I get a "Symbol's value as variable is void" error when Emacs starts up.
> 
> How do I test for the existence (and non-nil ness of a variable in Emacs)


You can use boundp.  So 

(if (boundp 'njn/current-q-file)
njn/current-q-file
  "questions.org")

can be used wherever you need it.

-Ivan




Re: [O] tables once again

2012-10-03 Thread Ivan Andrus
Oops, forgot to send it to the list.

On Oct 3, 2012, at 12:59 AM, Neuwirth Erich wrote:

> Here is my example (slightly modified) again,
> I still cannot get it to work the way I want it:
> 
> 
> In my .emacs I have (among other things)
> 
> (require 'org-install)
> (require 'org-e-latex)
> (require 'org-e-html)
> ;;(require 'org-e-ascii)
> 
> ;; using the new exporter
> (global-set-key (kbd "C-c C-e") 'org-export-dispatch)
> 
> 
> Doing C-c C-e still gives me the old dispatcher, not the new one.
> M-x org-export-dispatch
> does give me the new dispatcher.
> 
> How can I bind the new dispatcher to C-c C-e?

I think the issue is that you are binding it to a global key, but the org-mode 
keymap is overriding it in an org-mode buffer.  So try

(define-key org-mode-map (kbd "C-c C-e") 'org-export-dispatch)

and see if that fixes it.  You can always try C-h b to see what bindings are in 
place and which keymaps they come from.

-Ivan



Re: [O] Org-mode release 7.9

2012-08-30 Thread Ivan Andrus

On Aug 30, 2012, at 8:35 PM, Eric Schulte wrote:

> Achim Gratz  writes:
> 
>> Bastien writes:
>>> I'm afraid the only recommendation here is to try to stick to one
>>> installation method -- or to reinstall a fresh package/repo with a
>>> fresh contrib/lisp/ *after* any ELPA upgrade.
>> 
>> Well, we could make an ELPA package that includes contrib.  It just
>> can't be distributed via GNU ELPA then.
>> 
> 
> I second this option.

+1 I know that I am much more likely to try stuff if it's in ELPA.

> Given that ELPA and contrib/ both serve as a sort of proving ground for
> tools which do not yet have some combination of the stability, copyright
> assignment, or widespread utility to be included in Emacs or either
> Org-mode it seems natural to distribute the contrib directory through
> ELPA.
> 
> I think either of the following repositories would make excellent homes.
> 
>  http://tromey.com/elpa/
>  http://marmalade-repo.org/packages/

Don't forget MELPA:

http://melpa.milkbox.net/

which will package it right out of git.

-Ivan



Re: [O] SageTeX in export

2012-08-19 Thread Ivan Andrus
On Aug 17, 2012, at 8:30 AM, Nick Dokos wrote:

> mailingli...@nawaz.org wrote:
> 
>> Hi,
>> 
>> All I need is a way for the export to:
>> 
>> 1. After running pdflatex, check if there is a file called
>>   ".sagetex.sage".
>> 2. If it's present, run sage on it, and then rerun pdflatex.
>> 3. If it's not, nothing more is left to do.
>> 
>> I'd really appreciate if someone could tell me how to enable this with
>> Org mode's export.
> 
> All you have to do is set the variable org-latex-to-pdf-process,
> something like this [fn:1]
> 
> (setq org-latex-to-pdf-process 
>  '("pdflatex %f"
>"if [ -f %b.sagetex.sage ] ;then sage %b.sagetex.sage ;fi"
>   "pdflatex %f"
>   "pdflatex %f"))
> 
> although as Achim Gratz pointed out in this thread:
> 
>  http://thread.gmane.org/gmane.emacs.orgmode/58928
> 
> it's probably better to use the Customization interface, particularly if
> one is an elisp beginner - do C-h v org-latex-to-pdf-process RET, read the
> documentation for the variable and then click the customize link at the bottom
> to get to the customization page.
> 
> Nick
> 
> Footnotes:
> 
> [fn:1] Note that the default setting for this variable is three invocations of
>   pdflatex, so I'm just interpolating a call to sage.


This is cool.  I've opened a ticket [1] on sage-mode to add support for this 
automatically.  Hopefully, I'll get around to it fairly soon, but if not feel 
free to bug me.  I'll obviously have to make it a little more robust than a 
simple setq, or I would do it right now.  

-Ivan

[1] 
https://bitbucket.org/gvol/sage-mode/issue/10/add-support-for-sagetex-in-org-latex


Re: [O] Add the capture feature "%(sexp)" to org-feed

2012-08-09 Thread Ivan Andrus
On Aug 9, 2012, at 4:53 PM, Bastien wrote:

> Hi Michael,
> 
> Michael Brand  writes:
> 
>> You omitted the Local variables sentence-end-double-space: t. Isn't
>> this a good idea for all the users like me that have set this to nil
>> in their config? I wanted to add it to more files as soon as I will
>> change them.
> 
> I've check against current Emacs trunk, and only three files/packages
> uses this: rst.el, filesets.el and mh-e.
> 
> So I'd rather not pollute the hundred files of Org with this.

I'm probably missing something, but isn't this what directory local variables 
are for?

-Ivan