Re: [O] ANNOUNCE: GNU Hyperbole 6.0.1 for Emacs 24.4 - 25 is released

2016-07-29 Thread Kaushal Modi
Thanks for the detailed reply, Aditya.

,"aditya siram" 
>
> Hyperbole, even though it is old, feels like it is in its second infancy
> meaning it is open to change based on community feedback. As a practical
> note, once you install it doing C-h h d d will fire up a nice Demo which I
> is think is more fun than watching a screencast.
>
> -deech
>
> --

Kaushal Modi


Re: [O] ANNOUNCE: GNU Hyperbole 6.0.1 for Emacs 24.4 - 25 is released

2016-07-29 Thread tumashu
great comment

在 2016-07-30 00:25:12,"aditya siram"  写道:

I never used Hyperbole back in the day so this is all fresh for me. I am also 
an avid org-mode user. The following feedback is based on about 48 hours of 
usage.


Hyperbole is a suite of tools. One of them is an outliner that overlaps quite a 
bit with org-mode. It has some interesting features like being able to link 
individual paragraphs as opposed to just headings/sub-headings but in most 
cases org-mode is further along.

But there are other tools in Hyperbole that might interest you including 
Acme-like string execution. For example if you do M-RET on the word README it 
automatically jumps to README without having to go through the rigamarole or 
creating a link in org-mode.


One of the nicest things about Hyperbole is that it's available everywhere. 
Org-mode is a mode and its features are only available in *.org files. For 
instance if you dropped into `eshell` or `ansi-term` and did `ls`, you can move 
point to any of the directory's contents, do M-RET (or Shift-Button2) and jump 
to that file. And that's just one example. Note that this means that all 
Hyperbole functionality is available in *.org files as well. To me, except for 
the Hyperbole outliner, that makes complementary not conflicting. It's 
Hyperbole *and* org-mode, not Hyperbole vs. org-mode.



Additionally, off the bat, I found it very well documented and for me that's a 
proxy for the quality of a package and the maintainer, Robert Weiner is quite 
responsive and really seems to want Hyperbole to take off. There's plenty more 
functionality that I haven't uncovered yet but due to ease of installation and 
quality of documentation digging into it is actually fun; much more 
discoverable than org-mode which has become this giant bag of random directives.


Hyperbole, even though it is old, feels like it is in its second infancy 
meaning it is open to change based on community feedback. As a practical note, 
once you install it doing C-h h d d will fire up a nice Demo which I is think 
is more fun than watching a screencast.


-deech




On Fri, Jul 29, 2016 at 10:54 AM, Kaushal Modi  wrote:

Actually it will be even more awesome if you can record a short video/GIF 
screencast demonstrating what hyperbole does compared to org mode. Or in 
general how you would use hyperbole.


Thanks.


On Fri, Jul 29, 2016 at 11:52 AM Adam Porter  wrote:

Charles Philip Chan  writes:

> Wow, blast from the past. I remember using older versions of Hyperbole
> fondly and still miss it. Thank you for updating it. I look forward to
> using it. :-)

Charles, could you explain a little bit how it compares to Org?  I read
the thread on /r/emacs and looked at the wiki, but I'm still not sure
how it compares to or complements Org.



--


Kaushal Modi




Re: [O] make some tangled dotfiles file executable during babel tangling?

2016-07-29 Thread Adam Porter
Xebar Saram  writes:

> i have officaly moved over to manage all my dotfiles with orgmode
> based on this excellent post:
> https://expoundite.net/guides/dotfile-management

Hey Z, thanks for sharing, that's very cool!




Re: [O] make some tangled dotfiles file executable during babel tangling?

2016-07-29 Thread Adam Porter
Xebar Saram  writes:

> i have officaly moved over to manage all my dotfiles with orgmode
> based on this excellent post:
> https://expoundite.net/guides/dotfile-management

Hey Z, that's really cool, thanks for sharing it!




Re: [O] modifying/deleting ovelrays; also, un-sparsifying tree?

2016-07-29 Thread Nicolas Goaziou
Matt Price  writes:

> small question: Is it possible to get one or more columns to always line up
> o nthe right hand side of the buffer? Or to assign a width to the first
> column (in my case the item name) that is somehting like "buffer-width
> minus 30"?

No, it isn't.

Regards,



[O] Regression: commit 38de20287fbf26d0a84d6264c030fd8fddadfdc6 prevents successful build of org-timer.el

2016-07-29 Thread Humberto Nanni
After the mentioned commit, the build of org-timer.el fails:

[...]
-:8737: warning: @table has text but no @item
-:9518: warning: @table has text but no @item
-:9588: warning: @table has text but no @item
...skipping...

In end of data:
org-plot.el:354:1:Warning: the following functions are not known to be
defined: first, second
Wrote /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-plot.elc
Compiling 
/home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-protocol.el...
Wrote /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-protocol.elc
Compiling /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-rmail.el...
Wrote /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-rmail.elc
Compiling /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-src.el...
Wrote /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-src.elc
Compiling /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-table.el...
Wrote /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-table.elc
Compiling /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-timer.el...

In toplevel form:
org-timer.el:38:1:Error: Symbol's function definition is void: incf
Compiling 
/home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-version.el...
Compiling /home/robaccia/roba/vicenda/sources/org/org-mode/lisp/org-w3m.el..



Re: [O] ANNOUNCE: GNU Hyperbole 6.0.1 for Emacs 24.4 - 25 is released

2016-07-29 Thread Nick Dokos
Peter Davis  writes:

> On Thu, Jul 28, 2016, at 01:16 PM, Charles Philip Chan wrote:
>> Robert Weiner  writes:
>> 
>> > GNU Hyperbole (pronounced Ga-new Hi-per-bo-lee), or just Hyperbole, is
>> > an amazing programmable hypertextual information management system
>> > implemented as a GNU Emacs package.  This is the first public release
>> > in 2016.
>> 
>> Wow, blast from the past. I remember using older versions of Hyperbole
>> fondly and still miss it. Thank you for updating it. I look forward to
>> using it. :-)
>
> Yes, I remember using Hyperbole years ago, and trying unsuccessfully to
> resurrect it several times in recent years. I'm very glad to see it
> again!
>

Me too: I last used it about 20 years ago I think. It then went dormant
afaik and building the version I had saved became harder with every
subsequent emacs release; finally I abandoned it - and a few years later
stumbled onto org-mode!  But it was the first hyperlink system I used
and I have always had a soft spot for it. I just installed it and am
trying it out again. Good to have it back!

-- 
Nick




Re: [O] ANNOUNCE: GNU Hyperbole 6.0.1 for Emacs 24.4 - 25 is released

2016-07-29 Thread Peter Davis


On Thu, Jul 28, 2016, at 01:16 PM, Charles Philip Chan wrote:
> Robert Weiner  writes:
> 
> > GNU Hyperbole (pronounced Ga-new Hi-per-bo-lee), or just Hyperbole, is
> > an amazing programmable hypertextual information management system
> > implemented as a GNU Emacs package.  This is the first public release
> > in 2016.
> 
> Wow, blast from the past. I remember using older versions of Hyperbole
> fondly and still miss it. Thank you for updating it. I look forward to
> using it. :-)

Yes, I remember using Hyperbole years ago, and trying unsuccessfully to
resurrect it several times in recent years. I'm very glad to see it
again!

-pd

-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] make some tangled dotfiles file executable during babel tangling?

2016-07-29 Thread Xebar Saram
Thx John

perfect

Z

On Fri, Jul 29, 2016 at 6:48 PM, John Kitchin 
wrote:

> See http://orgmode.org/manual/tangle_002dmode.html#tangle_002dmode
>
> It should do what you need.
>
>
> On Friday, July 29, 2016, Xebar Saram  wrote:
>
>> Hi all
>>
>> i have officaly moved over to manage all my dotfiles with orgmode based
>> on this excellent post:
>> https://expoundite.net/guides/dotfile-management
>>
>> one thing im missing is how to make some of these tangled sh files
>> executable after i tangle them (like running chmod +x).
>>
>> any ideas?
>>
>> best
>>
>> Z
>>
>>
>>
>
> --
> John
>
> ---
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>
>


Re: [O] ANNOUNCE: GNU Hyperbole 6.0.1 for Emacs 24.4 - 25 is released

2016-07-29 Thread aditya siram
I never used Hyperbole back in the day so this is all fresh for me. I am
also an avid org-mode user. The following feedback is based on about 48
hours of usage.

Hyperbole is a suite of tools. One of them is an outliner that overlaps
quite a bit with org-mode. It has some interesting features like being able
to link individual paragraphs as opposed to just headings/sub-headings but
in most cases org-mode is further along.

But there are other tools in Hyperbole that might interest you including
Acme-like string execution. For example if you do M-RET on the word README
it automatically jumps to README without having to go through the
rigamarole or creating a link in org-mode.

One of the nicest things about Hyperbole is that it's available everywhere.
Org-mode is a mode and its features are only available in *.org files. For
instance if you dropped into `eshell` or `ansi-term` and did `ls`, you can
move point to any of the directory's contents, do M-RET (or Shift-Button2)
and jump to that file. And that's just one example. Note that this means
that all Hyperbole functionality is available in *.org files as well. To
me, except for the Hyperbole outliner, that makes complementary not
conflicting. It's Hyperbole *and* org-mode, not Hyperbole vs. org-mode.

Additionally, off the bat, I found it very well documented and for me
that's a proxy for the quality of a package and the maintainer, Robert
Weiner is quite responsive and really seems to want Hyperbole to take off.
There's plenty more functionality that I haven't uncovered yet but due to
ease of installation and quality of documentation digging into it is
actually fun; much more discoverable than org-mode which has become this
giant bag of random directives.

Hyperbole, even though it is old, feels like it is in its second infancy
meaning it is open to change based on community feedback. As a practical
note, once you install it doing C-h h d d will fire up a nice Demo which I
is think is more fun than watching a screencast.

-deech


On Fri, Jul 29, 2016 at 10:54 AM, Kaushal Modi 
wrote:

> Actually it will be even more awesome if you can record a short video/GIF
> screencast demonstrating what hyperbole does compared to org mode. Or in
> general how you would use hyperbole.
>
> Thanks.
>
> On Fri, Jul 29, 2016 at 11:52 AM Adam Porter  wrote:
>
>> Charles Philip Chan  writes:
>>
>> > Wow, blast from the past. I remember using older versions of Hyperbole
>> > fondly and still miss it. Thank you for updating it. I look forward to
>> > using it. :-)
>>
>> Charles, could you explain a little bit how it compares to Org?  I read
>> the thread on /r/emacs and looked at the wiki, but I'm still not sure
>> how it compares to or complements Org.
>>
>>
>> --
>
> Kaushal Modi
>


Re: [O] modifying/deleting ovelrays; also, un-sparsifying tree?

2016-07-29 Thread Matt Price
On Fri, Jul 29, 2016 at 11:31 AM, Matt Price  wrote:

>
>
> On Fri, Jul 29, 2016 at 10:46 AM, Nicolas Goaziou 
> wrote:
>
>> Matt Price  writes:
>>
>> > In my gradesheets I use overlays to display the grade property in
>> headlines
>> > -- that way I can see at a glance approximately how my students are
>> doing:
>> >
>> > ;; still imperfect, but good enough for me.
>> > (defun org-grading-overlay-headings ()
>>
>> Why don't you use column view instead?
>>
>
> um.  because...  um I guess I had some reason a year ago when I
> designed this system. Looking at it again today, column view looks great...
>

small question: Is it possible to get one or more columns to always line up
o nthe right hand side of the buffer? Or to assign a width to the first
column (in my case the item name) that is somehting like "buffer-width
minus 30"?



>
>


Re: [O] Bug: Reading currently clocked headline interferes with org-capture-finalize [8.3.4 (8.3.4-93-g0d72c3-elpaplus @ /home/joe/.emacs.d/elpa/org-20160627/)]

2016-07-29 Thread Adam Porter
Joe, thanks for reporting this!  I have been noticing this for a while
now, but I always thought it must have been a config problem on my
end.  (Or maybe it is, and we both have it? haha)

Just to be clear, here's how I seem to experience it:

1.  Clock in any item.
2.  Run org-capture with a template that uses ":clock-in t
:clock-resume t" (and not ":clock-keep t").
3.  Finish the capture.
4.  The capture is still clocked in.  I have to clock-out manually.




Re: [O] ANNOUNCE: GNU Hyperbole 6.0.1 for Emacs 24.4 - 25 is released

2016-07-29 Thread Adam Porter
Charles Philip Chan  writes:

> Robert Weiner  writes:
>
>> GNU Hyperbole (pronounced Ga-new Hi-per-bo-lee), or just Hyperbole, is
>> an amazing programmable hypertextual information management system
>> implemented as a GNU Emacs package.  This is the first public release
>> in 2016.
>
> Wow, blast from the past. I remember using older versions of Hyperbole
> fondly and still miss it. Thank you for updating it. I look forward to
> using it. :-)

Charles, could you explain a little bit how it compares to Org?  I read
the thread on /r/emacs and looked at the wiki, but I'm still not sure
how it compares to or complements Org.




Re: [O] ANNOUNCE: GNU Hyperbole 6.0.1 for Emacs 24.4 - 25 is released

2016-07-29 Thread Kaushal Modi
Actually it will be even more awesome if you can record a short video/GIF
screencast demonstrating what hyperbole does compared to org mode. Or in
general how you would use hyperbole.

Thanks.

On Fri, Jul 29, 2016 at 11:52 AM Adam Porter  wrote:

> Charles Philip Chan  writes:
>
> > Wow, blast from the past. I remember using older versions of Hyperbole
> > fondly and still miss it. Thank you for updating it. I look forward to
> > using it. :-)
>
> Charles, could you explain a little bit how it compares to Org?  I read
> the thread on /r/emacs and looked at the wiki, but I'm still not sure
> how it compares to or complements Org.
>
>
> --

Kaushal Modi


Re: [O] make some tangled dotfiles file executable during babel tangling?

2016-07-29 Thread John Kitchin
See http://orgmode.org/manual/tangle_002dmode.html#tangle_002dmode

It should do what you need.

On Friday, July 29, 2016, Xebar Saram  wrote:

> Hi all
>
> i have officaly moved over to manage all my dotfiles with orgmode based on
> this excellent post:
> https://expoundite.net/guides/dotfile-management
>
> one thing im missing is how to make some of these tangled sh files
> executable after i tangle them (like running chmod +x).
>
> any ideas?
>
> best
>
> Z
>
>
>

-- 
John

---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


Re: [O] modifying/deleting ovelrays; also, un-sparsifying tree?

2016-07-29 Thread Matt Price
On Fri, Jul 29, 2016 at 10:46 AM, Nicolas Goaziou 
wrote:

> Matt Price  writes:
>
> > In my gradesheets I use overlays to display the grade property in
> headlines
> > -- that way I can see at a glance approximately how my students are
> doing:
> >
> > ;; still imperfect, but good enough for me.
> > (defun org-grading-overlay-headings ()
>
> Why don't you use column view instead?
>

um.  because...  um I guess I had some reason a year ago when I
designed this system. Looking at it again today, column view looks great...

>
> > An unrelated simple question: if I make a sparse tree (e.g. by searching
> > for all subtrees with a "GRADE" property of "0" or "FAIL",), can i
> > un-sparsify hte buffer afterwards? I didn't immediately find that option
> in
> > the manual.
>
> See `org-reveal' or `org-cycle'.
>
org-reveal is what I'm looking for, thank you!

>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] make some tangled dotfiles file executable during babel tangling?

2016-07-29 Thread Xebar Saram
Hi all

i have officaly moved over to manage all my dotfiles with orgmode based on
this excellent post:
https://expoundite.net/guides/dotfile-management

one thing im missing is how to make some of these tangled sh files
executable after i tangle them (like running chmod +x).

any ideas?

best

Z


Re: [O] modifying/deleting ovelrays; also, un-sparsifying tree?

2016-07-29 Thread Nicolas Goaziou
Matt Price  writes:

> In my gradesheets I use overlays to display the grade property in headlines
> -- that way I can see at a glance approximately how my students are doing:
>
> ;; still imperfect, but good enough for me.
> (defun org-grading-overlay-headings ()

Why don't you use column view instead?

> An unrelated simple question: if I make a sparse tree (e.g. by searching
> for all subtrees with a "GRADE" property of "0" or "FAIL",), can i
> un-sparsify hte buffer afterwards? I didn't immediately find that option in
> the manual.

See `org-reveal' or `org-cycle'.

Regards,

-- 
Nicolas Goaziou



[O] modifying/deleting ovelrays; also, un-sparsifying tree?

2016-07-29 Thread Matt Price
In my gradesheets I use overlays to display the grade property in headlines
-- that way I can see at a glance approximately how my students are doing:

;; still imperfect, but good enough for me.
(defun org-grading-overlay-headings ()
  "Show grades at end of headlines that have a 'GRADE' property."
  (interactive)
  (require 'ov)

  (org-map-entries
   (lambda ()
 (when (org-entry-get (point) "GRADE")
   (ov-clear (- (line-end-position) 1)
 (+ 0 (line-end-position)))
   (setq ov (make-overlay (- (line-end-position) 1)
  (+ 0 (line-end-position
   (setq character (buffer-substring (- (line-end-position) 1)
(line-end-position)))
   (overlay-put
ov 'display
(format  "%s  GRADE: %s CHITS: %s" character (org-entry-get (point)
"GRADE") (org-entry-get (point) "CHITS")))
   (overlay-put ov 'name "grading")
   (message "%s" (overlay-get ov "name")
  )

This mostly works, except that I've noticed that, when I regenerate the
overlays after changes, certain folded trees end up with a duplicate
overlay, for reasons that I don't quite understand (maybe because the
ellipses at the end of the fold interfere with my counting somehow)?
I ould like to be able to find the named overlays and remove them all at
once, something like this:

(defun matt-clear-overlay ()
  (interactive)
  (let ((all-overlays (overlays-in (point-min) (point-max
(dolist (x all-overlays)
  (if (string= (overlay-get x "name") "grading")
  (delete-overlay x)
   ;; sorry for hanging brackets, I know it's bad form

this doesn't seem to do anything, so maybe I'm not testing right, or I'm
misnderstanding overlays. In any case ,I would love to be able to locate
the overlays properly, and modify or delete-and-recreate them
appropriately. Can you guys help out? Just clearing all overlays is not a
good option, as org seems to make heavy use of them to hide e.g. property
drawers.

An unrelated simple question: if I make a sparse tree (e.g. by searching
for all subtrees with a "GRADE" property of "0" or "FAIL",), can i
un-sparsify hte buffer afterwards? I didn't immediately find that option in
the manual.

thanks everyone!
matt


Re: [O] two basic elisp questions

2016-07-29 Thread Matt Price
On Sat, Jul 23, 2016 at 1:24 AM, Michael Welle  wrote:

> Hello,
>
> Matt Price  writes:
>
> > On Fri, Jul 22, 2016 at 1:54 PM, Michael Welle 
> wrote:
> >
> >> Hello,
> >>
> >> Matt Price  writes:
> >>
> >> > On Fri, Jul 22, 2016 at 11:38 AM, Matt Price 
> wrote:
> >> >
> >> >>
> >> >> (2) Is it possible to set the default value for interactive file
> >> selection
> >> >> to something OTHER than the currect directory of the current buffer?
> >> >> Something like:
> >> >>
> >> >> (let
> >> >>   ((base-dir "./Assignment1/"))
> >> >>   (org-attach--attach))
> >> >>
> >> >> I'd like to set different base directories when attaching files to
> >> >> subtrees of different first-level trees in a buffer. I guess I would
> set
> >> >> the value for the base directory with a property.
> >> >>
> >> >
> >> > OK, I made some progress on this:
> >> >
> >> > (let ((default-directory  (concat default-directory "Assignment1/") ))
> >> > (call-interactively 'org-attach-attach))
> >> >
> >> > However, I'd like to do something like:
> >> >
> >> > (let
> >> > ((parent-basedir nil))
> >> >   (save-excursion
> >> > (outline-up-heading)
> >> > (setq parent-basedir (org-get-entry "BASEDIR")))
> >> >   (let
> >> >   ((default-directory (concat default-directory parent-basedir) ))
> >> > (call-interactively 'org-attach-attach  )))
> >> >
> >> >
> >> >
> >> > But there are errors I don't understand in this code. Any hints?
> Thanks
> >> > again!
> >> well, I guess the errors are too secret to share them with us? The first
> >> I can see is that org-get-entry doesn't need parameters. And the overall
> >> structure looks strange, but that could be just me ;).
> >>
> >> :-( No, they're not too secret, I just have a terrible head cold and can
> > hardly think, so didn't think to include it!
> don't worry and get well soon ;).
>
>
> > The overall structure feels strange to me -- I just want a way of
> retaining
> > a temprary variable value in a let that also includes a temporary
> excursion
> > to the parent node. More on that shortly.
> >
> >
> >> The reason for the current behaviour is the interactive form of
> >> org-attach-attach. Ad hoc I have no idea how to change that. What I
> >> would try is to (cd your-wanted-dir) before calling org-attach-attach.
> >> Maybe a bit of cleanup if useful after calling the function.
> >>
> >
> > So it turns out  that, like most interactive functions, org-attach-attach
> > uses the built-in read-file-name macro, which relies on the value of
> > "default-directory", which is buffer-local. By calling org-attach-attach
> > from inside a let statement, I can get the behaviour I want:
> > (let
> >   ((default-directory (concat default-directory "Galileo/")))
> >   (org-attach-attach))
> That makes sense.
>
>
> >  The problem now is that I need to access a property from the parent node
> > in order ot dynamically set the appropriate value for default-directory,
> > and I'm struggling to do that.
> >
> > Here is a minimal test file:
> >
> > * Galileo :ASSIGNMENT:
> > :PROPERTIES:
> > :BASEDIR:  Galileo
> > :END:
> >
> >
> > ** testing
> >
> > #+BEGIN_SRC emacs-lisp
> >   (let
> >   ((parent-basedir nil))
> > (save-excursion
> >   (outline-up-heading)
> >   (setq parent-basedir (org-entry-get (point) "BASEDIR"))
> >   (message parent-basedir))
> > (let
> > ((default-directory (concat default-directory parent-basedir) ))
> >   (call-interactively 'org-attach-attach  )))
> > #+END_SRC
> I use Emacs 25 and there outline-up-heading uses a mandatory
> parameter. I changed that to (outline-up-heading 1).
>
>
> > This seems to work but so far I'm having issues actually opening the
> > attachment.  This may be due to the way that org-attach constructs links
> to
> > attachments (I prefer not to copy, as my disk space is limited).
> I haven't used attachments before, so I'm not sure what to expect. But if
> I use the code from above, I get the attachment related properties, as you
> said. Next I do M-x org-attach o and I get prompted for the attachment,
> which isn't right I think. The reason is IMO, that org-attach-open
> searches the attachment below the default-directory, not in the changed
> path. So, if the default-directory is /tmp, it searches /tmp/data/$ID,
> not /tmp/Galileo/date/$ID. Thinking about it that makes sense, somehow ;).
>
> So it looks like the are several more places where 'cheating' is needed
> to make this work.
>
Yes. Looks like I wold need to rewrite org-attach-attach and bind to my new
function; that feels hard so I've sort of given up on it for now.

>
>
> > Anyway, thanks for your help; this seems to be getting closer, despite
> what
> > feels like substantial mental impairment due to increased cranial
> pressure
> > (ouch!)
> I can feel your pain. Last week I had something that could have been an
> inflammation of the middle ear or 

Re: [O] error on make

2016-07-29 Thread Nicolas Goaziou
Hello,

Giri Prashanth  writes:

> Thank you for your response. I have GNU Emacs 24.5.1
> (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) .
> One possibility is that in OS X, there is a default emacs with version
> 22.1.1. I tried brew update but I think for some reason it is not updated
> and may cause for this problem.
>
> Is there a way to specify the location of emacs application and site-lisp
> folder in the config or  Makefile ?

I don't know. You may want to have a look at

  http://orgmode.org/worg/dev/org-build-system.html#sec-4

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: org-capture template expansion "%x" stopped working

2016-07-29 Thread Nicolas Goaziou
Hello,

Humberto Nanni  writes:

> starting from commit 6daad64277c43a6589de1c6a146ca8a72fe0e3b9 attempts to
> use the org-capture template expansion "%x" results in the following
> backtrace:
>
> Debugger entered--Lisp error: (error "Capture abort: (wrong-type-argument
> char-or-string-p nil)")
>   signal(error ("Capture abort: (wrong-type-argument char-or-string-p
> nil)"))
>   error("Capture abort: %s" (wrong-type-argument char-or-string-p nil))
>   #[257 "\300\301!\203\n\302\301!\210\303\304\"\207" [get-buffer
> "*Capture*" kill-buffer error "Capture abort: %s"] 4 "\n\n(fn
> ERROR)"]((wrong-type-argument char-or-string-p nil))
>   funcall(#[257 "\300\301!\203\n\302\301!\210\303\304\"\207" [get-buffer
> "*Capture*" kill-buffer error "Capture abort: %s"] 4 "\n\n(fn ERROR)"]
> (wrong-type-argument char-or-string-p nil))
>   org-capture(nil)
>   call-interactively(org-capture nil nil)
>   command-execute(org-capture)

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] Bug: Reading currently clocked headline interferes with org-capture-finalize [8.3.4 (8.3.4-93-g0d72c3-elpaplus @ /home/joe/.emacs.d/elpa/org-20160627/)]

2016-07-29 Thread Joe Schafer
I have a function to save the currently clocked item into a file so I
can display it in my terminal.  The hook seems to interfere with
org-capture.  If I capture something the following
happens:

1. org-capture dialog appears
2. Fill-in capture.  The capture is clocked-in.
3. Finish capture with C-c C-c
4. The capture is still clocked in.  The clock should go back to the
previous clocked-in entry.

Trying to bisect the issue was difficult.  Sometimes the new capture would
clock-out, but the original entry would not clock back in.  Other times
the clock would be left running in the new capture entry.

The smallest example I could get is:

(defun my:org-get-clocked-in-headline ()
  "Get the headline of the currently clocked in headline.
If no headline is clocked in, then return an empty string."
  (interactive)
  (with-current-buffer (marker-buffer org-clock-marker)
(goto-char org-clock-marker)))

(defun my:org-save-clocked-in-entry-to-file ()
  "Save currently clocked-in task to a file."
  (with-temp-buffer
(insert (my:org-get-clocked-in-headline

(add-hook 'org-clock-in-hook #'my:org-save-clocked-in-entry-to-file)

For reference, here's the full code I'm using

(defun my:org-get-clocked-in-headline ()
  "Get the headline of the currently clocked in headline.
If no headline is clocked in, then return an empty string."
  (interactive)
  (if (not (org-clocking-p))
  ""
(with-current-buffer (marker-buffer org-clock-marker)
  (save-excursion
(save-restriction
  (when (or (< org-clock-marker (point-min)) (>
org-clock-marker (point-max)))
(widen))
  (goto-char org-clock-marker)
  (org-no-properties (org-get-heading 'no-tags 'no-todo)))

(defvar my:org-clocked-in-file-path "/tmp/org-currently-clocked-in-task"
  "Where to save the currently clocked in task for all to see.")

(defun my:org-save-clocked-in-entry-to-file ()
  "Save currently clocked-in task to a file."
  (let ((last-message (current-message))
;; Suppress echo area to see clock out information.  Doesn't
seem to
;; work, so we'll just re-display last-message.
(inhibit-message nil))
(with-temp-buffer
  (insert (my:org-get-clocked-in-headline))
  (write-region (point-min) (point-max)
my:org-clocked-in-file-path))
(message last-message)))

(add-hook 'org-clock-in-hook #'my:org-save-clocked-in-entry-to-file)
(add-hook 'org-clock-out-hook #'my:org-save-clocked-in-entry-to-file)
(add-hook 'org-clock-cancel-hook #'my:org-save-clocked-in-entry-to-file)


Emacs  : GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-07-14
Package: Org-mode version 8.3.4 (8.3.4-93-g0d72c3-elpaplus @
/home/joe/.emacs.d/elpa/org-20160627/)

current state:
==
(setq
 org-id-locations-file "/home/joe/.emacs.d/.cache/.org-id-locations"
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-drill-sm5-initial-interval 1.5
 org-clock-persist-file "/home/joe/.emacs.d/.cache/org-clock-save.el"
 org-habit-preceding-days 10
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-reverse-note-order t
 org-clock-history-length 23
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-capture-after-finalize-hook '(org-save-all-org-buffers)
 org-log-done t
 org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-link-translation-function 'toc-org-unhrefify
 org-present-mode-hook '(spacemacs//org-present-start)
 org-agenda-restore-windows-after-quit t
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-default-notes-file "~/gdrive/org/refile.org"
 org-clock-in-resume t
 org-clock-cancel-hook '(my:org-save-clocked-in-entry-to-file)
 org-capture-templates '(("t" "todo" entry (file "~/gdrive/org/refile.org")
"* TODO %?\n%U\n%(my:org-pick-smart-context \"%x\")\n"
  :clock-in t :clock-resume t)
 ("r" "respond" entry (file "~/gdrive/org/refile.org
")
  "* NEXT Respond to %:from on
%:subject\nSCHEDULED: %t\n%U\n%a\n" :clock-in t :clock-resume t
:immediate-finish t)
 ("n" "note" entry (file "~/gdrive/org/refile.org")
"* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t)
 ("j" "Journal" entry (file+datetree "~/gdrive/org/
journal.org") "* %?\n%U\n" :clock-in t :clock-resume t)
 ("w" "org-protocol" entry (file "~/gdrive/org/
refile.org") "* TODO Review %c\n%U\n"