Re: [O] Scatter-gather idea

2017-04-04 Thread Yasushi SHOJI
Hi Bob,

On Mon, Apr 3, 2017 at 1:34 PM, Bob Newell  wrote:
>
> A simple use case: you're brainstorming, making org-mode headline
> entries as fast as you can think or type. After a while you notice that
> a number of entries seem to be related and might actually be better
> considered as a spin-off. So you want to gather up all of those entries
> and send them off in bulk to a different org file.

mark them with tags, and do org-tags-view.  Or, you can use regex or other
criteria if you like.

If you want to refile them to a org file, mark entries you want to refile
with
org-agenda-bulk-mark and do org-agenda-bulk-action and 'r' to select
a file.

http://orgmode.org/manual/Agenda-commands.html#Agenda-commands
--
   yashi


Re: [O] Viewing pdf images

2017-04-04 Thread Kaushal Modi
In case you are interested, I have now updated the solution on
emacs.stackexchange to not use #+HEADER for this purpose:
http://emacs.stackexchange.com/a/401/115

Earlier discussion on that:
http://lists.gnu.org/archive/html/emacs-orgmode/2017-01/msg00260.html

The solution still does the exact same thing as before.

On Tue, Mar 21, 2017 at 8:37 PM Doyley, Marvin M. 
wrote:

> Thanks,
>
> Much appreciated.
>
> Cheers,
> M
> > On Mar 21, 2017, at 6:34 AM, Julian M. Burgos <
> julian.bur...@hafogvatn.is> wrote:
> >
> > I have the following in my .emacs file.  For this to work you need to
> > have your emacs compiled with imagemagick support (and have imagemagick
> > installed, of course).  It works well, although the images do not appear
> > immediately the first time you toggle them because the conversion takes
> > a little bit.
> >
> > #+BEGIN_SRC emacs-lisp
> >
> > (setq image-file-name-extensions
> >   (quote
> >("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm"
> "pnm" "svg" "pdf" "bmp" "eps")))
> > (add-to-list 'image-type-file-name-regexps '("\\.eps\\'" . imagemagick))
> > (add-to-list 'image-file-name-extensions "eps")
> > (add-to-list 'image-type-file-name-regexps '("\\.pdf\\'" . imagemagick))
> > (add-to-list 'image-file-name-extensions "pdf")
> > (setq imagemagick-types-inhibit (remove 'PDF imagemagick-types-inhibit))
> >
> > #+END_SRC
> >
> >
> >
> >
> > Doyley, Marvin M. writes:
> >
> >> Doesn’t work. Emacs just Hangs :(
> >>> On Mar 17, 2017, at 8:43 AM, Norwid Behrnd  wrote:
> >>>
> >>>
> >>> To include and display pdf files, perhaps the setup outlined here is
> >>> still working (dates back 2014...)
> >>>
> >>>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__emacs.stackexchange.com_questions_390_display-2Dpdf-2Dimages-2Din-2Dorg-2Dmode=DwIC-g=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU=cQ2XAFEKpHWcRH33Hvyanl-V2rE3v-7glys69pwm8CY=rmvwv-l1KvLkkUN0iG1d7bT6-MNbzQOFpz5U4-fLPt0=
> >>>
> >>> Cheers.
> >>>
> >>>
> >>>
> >>> On 03/17/2017 01:27 PM, Doyley, Marvin M. wrote:
>  Hi there,
> 
>  For manuscripts, my research group and I typically save images in pdf
>  format, much better resolution. It would be nice to view pdf  images
>  when working in org-mode. Does anybody know how to view pdf images in
>  org-mode.
> 
>  Thanks, M
> 
>  PS We also work with svg images too, that would also love to view in
>  org-mode
> 
> >
> >
> > --
> > Julian Mariano Burgos, PhD
> > Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
> > Marine and Freshwater Research Institute
> > Skúlagata 4, 121 Reykjavík, Iceland
> > Sími/Telephone : +354-5752037 <+354%20575%202037>
> > Bréfsími/Telefax:  +354-5752001 <+354%20575%202001>
> > Netfang/Email: julian.bur...@hafogvatn.is
>
> --

Kaushal Modi


[O] Numbering specific headings only

2017-04-04 Thread Mehul Sanghvi
I am creating a legal document (a rental agreement) using org-mode and
{{{macros}}}.
I have some of the kinks in the document ironed out so, except for one.

sample document---
#+OPTIONS: num:nil toc:nil
#+LATEX_HEADER: \usepackage{fullpage}

* RESIDENTIAL LEASE AGREEMENT

   This residential leased property lease agreement

** LANDLORD AND TENANT COVENANT AND AGREE:

*** DEFINITIONS
1. blah blah blah blah blah blah blah blah blah blah ablaakjkfjadsf
 kjfkjasdfkhajkfdjakf'asdfhsfh  shdfjhsaf khasdfhaieurh kakshfkasfhouw
kdhfkahsdfjkiu  khdsjfhjf kjkqwn ajhjhb
2. foo bar foo bar foo bar jkhdfjahf mhaksdfjkaf kjaksfdjkwhefrnm
adfhff kaskdfha kajfhjahroryetha jkasdkfhajfhwohrmahjah kahsdfjhwurey
hajsdfhiwyure hkhsadfyoiytg jhajdfh herhjh kh dahf hasjdfhiwer khkshdfkq
 jkjaiyashd

*** FOOBAR
some more legal gibberish goes here

---end of sample document-


When I export the document to PDF, all the headings get numbered.  I only
want to
have the 3rd level heading numbered (DEFINITIONS, FOOBAR, etc.).  I have
got about 50 3rd level headings so far.  There may be more, might get
less.  I don't want to manually number the headings.

How do I go about doing that ?If I use the option 'H:3' it will do all
headings 3 and above, which is not what I want.

Any thoughts/pointers/suggestions much appreciated.


cheers,

  mehul



-- 
Mehul N. Sanghvi
email: mehul.sang...@gmail.com


[O] Securing Org ELPA

2017-04-04 Thread Adam Spiers
Hi all,

Would it be possible to make Org ELPA available via https?

This is the motivation for asking:

https://glyph.twistedmatrix.com/2015/11/editor-malware.html

Thanks!
Adam



Re: [O] Insert datetree entry

2017-04-04 Thread Daniele Nicolodi
On 4/4/17 1:25 PM, Bruce V Chiarelli wrote:
> 
> Daniele Nicolodi  writes:
> 
>>
>> thanks for the hint, but I don't understand what `subtree-at-point` is
>> in your code, it does not seem to be defined in my emacs and
>> `org-datetree-find-date-create` has a third parameter that is
>> interpreted as a boolean. I'm confused.
> 
> Ah, yes I forgot that this is a fairly new feature. Sorry for the
> confusion. In the latest Org, the optional keep-restriction parameter can be
> 
> - t - make the datetree at the end of the current /view/ of the buffer,
> - nil - make the datetree at the end of the file, even if it was narrowed
>   to a subtree before, or
> - 'subtree-at-point - put the datetree as a subheading at the end of the
>   current heading. This one is new in Org 9.0.5.
> 
> The first two options have been around for a long time, so if you get
> rid of 'subtree-at-point it should be fine. It will default to nil.

Hi Bruce,

I modified your code as follow to be able to insert a datetree entry
correctly being anywhere in an existing datetree. I also added the
possibility of having a prefix argument to prompt for the date. It works
for me, but I don't know if this is the most elegant way to obtain what
I want. Comments are welcome.


;; look for datetree root
(defun dnn-org-datetree-root ()
  (let ((re
"^\\([12][0-9]\\{3\\}\\)\\(-\\([01][0-9]\\)\\(-\\([0123][0-9]\\)\\)?\\)?
\\w+$"))
(while (string-match re (org-get-heading))
  (org-up-heading-safe))
(org-up-heading-safe)))

;; add a datetree entry
(defun dnn-org-datetree-find-create (arg)
  (interactive "P")
  (let ((d (calendar-gregorian-from-absolute
(if arg (time-to-days (org-read-date nil t)) (org-today)
(dnn-org-datetree-root)
(org-datetree-find-date-create d 'subtree-at-point)))


Cheers,
Daniele



Re: [O] Insert datetree entry

2017-04-04 Thread Daniele Nicolodi
On 4/4/17 1:25 PM, Bruce V Chiarelli wrote:
> 
> Daniele Nicolodi  writes:
> 
>>
>> thanks for the hint, but I don't understand what `subtree-at-point` is
>> in your code, it does not seem to be defined in my emacs and
>> `org-datetree-find-date-create` has a third parameter that is
>> interpreted as a boolean. I'm confused.
> 
> Ah, yes I forgot that this is a fairly new feature. Sorry for the
> confusion. In the latest Org, the optional keep-restriction parameter can be
> 
> - t - make the datetree at the end of the current /view/ of the buffer,
> - nil - make the datetree at the end of the file, even if it was narrowed
>   to a subtree before, or
> - 'subtree-at-point - put the datetree as a subheading at the end of the
>   current heading. This one is new in Org 9.0.5.
> 
> The first two options have been around for a long time, so if you get
> rid of 'subtree-at-point it should be fine. It will default to nil.

I would like t he functionality provided specifying 'subtree-at-point,
but it has been introduced after the 3.0.5 release currently available
on melpa :(

Cheers,
Daniele





Re: [O] Insert datetree entry

2017-04-04 Thread Bruce V Chiarelli

Daniele Nicolodi  writes:

>
> thanks for the hint, but I don't understand what `subtree-at-point` is
> in your code, it does not seem to be defined in my emacs and
> `org-datetree-find-date-create` has a third parameter that is
> interpreted as a boolean. I'm confused.

Ah, yes I forgot that this is a fairly new feature. Sorry for the
confusion. In the latest Org, the optional keep-restriction parameter can be

- t - make the datetree at the end of the current /view/ of the buffer,
- nil - make the datetree at the end of the file, even if it was narrowed
  to a subtree before, or
- 'subtree-at-point - put the datetree as a subheading at the end of the
  current heading. This one is new in Org 9.0.5.

The first two options have been around for a long time, so if you get
rid of 'subtree-at-point it should be fine. It will default to nil.

>
> Cheers,
> Daniele


--
Bruce V. Chiarelli
http://github.com/bccomm



Re: [O] Insert datetree entry

2017-04-04 Thread Daniele Nicolodi
On 4/3/17 5:37 PM, Bruce V Chiarelli wrote:
> 
> Daniele Nicolodi writes:
> 
>> Hello,
>>
>> there is a way in org-mode to insert a datetree entry without going
>> through the org-capture?  Ideally the function would jump to the
>> datetree and inser an headline for the current day if one is not
>> present, or move to the end of it if one is present.
>>
>> I haven't found anything like this in the manual. I'm now digging in the
>> code. Hopefully it is not something too hard to implement with my
>> lacking elisp knowledge.
> 
> I don't believe there really is one, but I've had to do it a couple of
> times myself. This is my solution (I'm not a lisp expert either, but it
> did the job):
> 
> (defun bc/org-new-datetree-at-point
>(interactive)
>(org-up-heading-safe)
>(org-datetree-find-date-create
>  (calendar-gregorian-from-absolute (org-today))
>  'subtree-at-point))
> 
> This will make the datetree as a subheading of the current heading (or
> find it if it already exists). Getting rid of 'subtree-at-point will
> make the year a level 1 heading at the end of the file, like with
> org-capture.

Hi Bruce,

thanks for the hint, but I don't understand what `subtree-at-point` is
in your code, it does not seem to be defined in my emacs and
`org-datetree-find-date-create` has a third parameter that is
interpreted as a boolean. I'm confused.

Cheers,
Daniele




Re: [O] Creating consecutive time stamps

2017-04-04 Thread Michael Welle
Hello Carsten,

Carsten Dominik  writes:

> Hi MIchael,
>
> the automatic reset of the starting date for a second time stamp on works
> if the command `org-time-stamp' is invoked twice in direct succession.  So
> if you press `C-c  .'  to insert a time stamp, and then you press it
> immediately again, the magic will take its course.  This is probably the
> situation that you remember.
ah, suddenly all makes sense ;). I changed the template a couple of
years ago. It could well be that I inserted both time stamps vie C-c.
before the change.


> However, if you use %T in a template, then `last-command' is `org-capture',
> and the time stamp command does not know that you are making a range.  I
> could, by looking back and finding <...>-- , but that is not implemented.
> You might be better off Using an empty template and then inserting both
> time stamps with `C-c .' - which will make it easy to also directly choose
> the starting date.
Yes, that's way faster than navigation the calendar two times, esp. if
the appointment is far in the future.

Thank you
hmw



Re: [O] Creating consecutive time stamps

2017-04-04 Thread Carsten Dominik
Hi MIchael,

the automatic reset of the starting date for a second time stamp on works
if the command `org-time-stamp' is invoked twice in direct succession.  So
if you press `C-c  .'  to insert a time stamp, and then you press it
immediately again, the magic will take its course.  This is probably the
situation that you remember.

However, if you use %T in a template, then `last-command' is `org-capture',
and the time stamp command does not know that you are making a range.  I
could, by looking back and finding <...>-- , but that is not implemented.
You might be better off Using an empty template and then inserting both
time stamps with `C-c .' - which will make it easy to also directly choose
the starting date.

Carsten

On Tue, Apr 4, 2017 at 9:00 AM, Michael Welle  wrote:

> Hello,
>
> the subject is a bit fuzzy, so let me depict an example use case:
> creating an appointment for a multi-day conference. I use a capture
> template with the placeholder %T for that (I use the same template for
> single day appts, which occur more often.). Then I adjust the inserted
> time stamp, add --, press C-. and add the second time stamp.
>
> So far, good. The itching point is that the calendar view for the second
> time stamp starts today, again, not at the date of the first time stamp.
> I can dimly remember -or I think I do ;)- that that was different in the
> past, maybe with a different template. Any ideas for a 'grey ointment'
> that stops the itching?
>
> Regards
> hmw
>
>


[O] Creating consecutive time stamps

2017-04-04 Thread Michael Welle
Hello,

the subject is a bit fuzzy, so let me depict an example use case:
creating an appointment for a multi-day conference. I use a capture
template with the placeholder %T for that (I use the same template for
single day appts, which occur more often.). Then I adjust the inserted
time stamp, add --, press C-. and add the second time stamp.

So far, good. The itching point is that the calendar view for the second
time stamp starts today, again, not at the date of the first time stamp.
I can dimly remember -or I think I do ;)- that that was different in the
past, maybe with a different template. Any ideas for a 'grey ointment'
that stops the itching?

Regards
hmw