[O] feature request: modify org-attach to also create new (non-text) attachments

2019-07-20 Thread Simon Campese
Hello,

while in orgmode, I frequently create some handwritten notes (using
a wacom tablet and xournalpp) and attach it to the current
headline. My ad-hoc solution is the following trivial modification of
org-attach-new (only the second to last line has changed):

(defun org-attach-new-external (file)
  "Create a new attachment FILE for the current task.
The attachment is created as an Emacs buffer."
  (interactive "sCreate attachment named: ")
  (when (and org-attach-file-list-property (not org-attach-inherited))
(org-entry-add-to-multivalued-property
 (point) org-attach-file-list-property file))
  (let ((attach-dir (org-attach-dir t)))
(org-attach-tag)
(call-process "~/bin/myscript.sh" nil nil nil (expand-file-name file 
attach-dir))
(message "New attachment %s" file)))

Here, ~/bin/myscript.sh $FILE creates a new xopp-file $FILE by copying from
an empty template and then opens it in xournalpp. Another use case could
be audio/video recordings, for example during a meeting.

It would be nice to add this functionality directly to
org-attach by generalizing the above function
'org-attach-new-external' and associating it to the key 'N'. This
function would

1. ask the user for a filename and a program, taken from some variable,
say 'org-attach-new-external-programs-alist' which contains entries of
the form ("short_name" . "program"). Each program of this list should,
when called via 'program $filename', create a file $filename in some way
(by copying from a template and then letting the user edit, starting an
audio recording etc.) 

2. build the filename, optionally using some function stored in
'org-attach-new-create-filename-function' which takes the user input as an
argument (to for example automatically insert the date, the name of the
org-headline etc.)

3. call 'program $filename' and exit


What do you think?


Best regards,

Simon





Re: [O] Bug: org-babel-tangle purges comma at the beginning of a line ]

2013-02-27 Thread Simon Campese
Hello Nicolas, 

thanks a lot for the patch. It partly works, as long as there are some
more characters after the first comma, but a single comma at the beginning of
a line still gets purged. Now we can start discussing about whoever
would want to have a single comma in a line of its own... :-) 


Best wishes,

Simon




[O] [org-contacts] need help for making gnus/message-mode integration optional

2013-02-26 Thread Simon Campese
Hello,

I have one quick feature request for org-contacts.el that should be
pretty easy and quick to implement: Could someone please introduce
customizable variables to optionally disable the gnus/message mode
integration?  

I don't know a lot of elisp, so instead of copy-pasting my way to a
half-baked solution that would maybe not be accepted upstream, I thought
that asking the experts here is more appropriate.  

My reason for this request:
For email address completion in message mode, I use a program that scans
through my whole email database (I use notmuch to manage emails and have
all my mails stored locally). This program is stored in
'notmuch-address-command' and the integration has so far been done by
'notmuch-address'. However, the recent version of org-contacts breaks
this behaviour, i.e. I only get the emails from my org-contacts file
when I try to complete recipients. As I don't want to add all the people
I correspond with electronically to my org-contacts file, this is a huge  
annoyance.


Thank you very much,

Simon



[O] Bug: org-babel-tangle purges comma at the beginning of a line ]

2013-02-26 Thread Simon Campese
Hello,

I just noticed that org-babel-tangle removes the comma if its at the
beginning of a line inside a source block. This seems to be independent from the
language indicated (tried with sh, js and emacs-lisp) and also
independent from the characters that follow (',' gets tangled to a blank
line, ',,,' gets tangled to ',,', ',sometext' gets tangled to 'sometext'
etc.).


Best,

Simon

Emacs  : GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4) 
 of 2013-01-20 on eric
Package: Org-mode version 7.9.3e (7.9.3e-1122-g27da9a @ mixed
 installation! ~/.emacs.d/el-get/org-mode/contrib/lisp/ and
 ~/.emacs.d/el-get/org-mode/lisp/) 




Re: [O] Non-interactive insertion of future-dates

2012-01-28 Thread Simon Campese
Thanks Borbus, it works! See my followup to Jonathan's answer on my plans to add
relative dates to the template expansion.


Best wishes,

Simon




Re: [O] Non-interactive insertion of future-dates

2012-01-28 Thread Simon Campese
Hey Jonathan,

thanks for the hints, it works like a charm! As far as I can overlook
this, adding relative dates to the template expansion should not be a
lot of work, basically one just has to add a simple wrapper to
org-read-date. I gave some more thoughts to an appropriate symbol and
the best I could come up with is '_'. I therefore propose the following: 

% {EXP}t, %_{EXP}T, %_{EXP}u, %_{EXP}U 

in a capture-template inserts an (in-)active date-/timestamp that would
have resulted from manually entering the expression EXP at the
interactive date-/timeprompt. 

If no serious objections come up, I will put this on my todo-list.


Best wishes,

Simon



On Wed, 25 Jan 2012 12:56:37 -0500, Jonathan Leech-Pepin 
jonathan.leechpe...@gmail.com wrote:
 Hello,
 
 
 On Wed, Jan 25, 2012 at 11:42, Simon Campese emacs-orgm...@campese.de wrote:
 
  Dear community,
 
  I want to setup a capture-template that sets a
  SCHEDULE-property in the future (say one week from today) without any
  user interaction.
 
  Currently, I almost achieve this by inserting the line
 
  :SCHEDULED: %(org-read-date nil nil nil nil nil +1w)
 
  into my template. When I now call the template, I end up in the
  date-time-prompt, with +1w prefilled, so that manually have to press
  enter.
 
  Maybe it is trivial to call an interactive lisp-function and emulate
  some keypress, in which case I would be thankful for the code that
  achieves this (my lisp-skills are limited). Also, one should be able to
  achieve what I want by using format-time-string and increment the
  current time, but again my lisp-skills prohibit me from implementing it
  myself.
 
 A similar question had come up on StackOverflow (
 http://stackoverflow.com/questions/7986935/using-org-capture-templates-to-schedule-a-todo-for-the-day-after-today/7988809#7988809
 ).
 
 My answer there should apply, adjusting the offset from +1d to +1w :
 
     SCHEDULED: %(org-insert-time-stamp (org-read-date nil t \+1d\))
 
 Alternately you can include the SCHEDULED: portion within the
 timestamp insertion itself.  This example will also include a fixed
 time at which to schedule the item (unneeded in this case I suspect
 but it could be of use elsewhere) :
 
     (org-insert-time-stamp (org-read-date nil t \+1w 12:00\) t nil
 \SCHEDULED: \)
 
  In any case, it might be a good idea to include non-interactive access
  to relative times in template expansion, so that for example one
  can state something like %t[+1w] or %{+1w}t in the template to get the
  date one week from today (one should spend some more time to specify the
  actual input-format of course...). What do you think?
 
 I agree, adding the ability to automatically have relative dates would
 allow for quicker capture templates if you regularly need to to set
 them with a specific offset.
 
  Thank you very much,
 
  Simon
 
 Regards,
 
 Jonathan



[O] Non-interactive insertion of future-dates

2012-01-25 Thread Simon Campese
Dear community,

I want to setup a capture-template that sets a
SCHEDULE-property in the future (say one week from today) without any
user interaction.

Currently, I almost achieve this by inserting the line

:SCHEDULED: %(org-read-date nil nil nil nil nil +1w)

into my template. When I now call the template, I end up in the
date-time-prompt, with +1w prefilled, so that manually have to press
enter. 

Maybe it is trivial to call an interactive lisp-function and emulate
some keypress, in which case I would be thankful for the code that
achieves this (my lisp-skills are limited). Also, one should be able to
achieve what I want by using format-time-string and increment the
current time, but again my lisp-skills prohibit me from implementing it
myself. 

In any case, it might be a good idea to include non-interactive access
to relative times in template expansion, so that for example one
can state something like %t[+1w] or %{+1w}t in the template to get the
date one week from today (one should spend some more time to specify the
actual input-format of course...). What do you think? 


Thank you very much,

Simon







[Orgmode] clock resolver never stops if task hasn't been clocked before

2010-02-27 Thread Simon Campese
Hello,

I just noticed a bug in the clock resolver while testing its
functionality which can be reproduced as follows:

  - Start the clock on a task which doesn't contain any clocked time
(i.e. no clock-entries in the :LOGBOOK: property). 

  - Leave emacs idle until the resolver gets active (I set my
'org-clock-idle-time' to '1', maybe that's the cause of the bug)

  - Cancel the clock altogether (i.e. choose 'C' in the resolver), so
that any clock information gets erased from the tasks'
:LOGBOOK:.

  - If you now leave emacs idle again, the resolver gets active
although no clock is running


At first I thought that this has something to do with my rather
unusual setting of 'org-clock-idle-time' to '1', but this can also be
reproduced with other settings (though I must confess that I just
tested a value of '2' additionally).

Unfortunately I'm an elisp-illiterate so that I can not look into it
myself.


Kind regards,

Simon


signature.asc
Description: Digital signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] date/time-prompt broken in debian lenny package?

2009-03-11 Thread Simon Campese
Hello,

I just installed emacs on debian lenny via aptitude and noticed that the
date/time prompt in org-mode doesn't work. I can enter absolute date
specifications ('2009-03-15') but all abbreviated and relative entries
like '+4d', '13' etc. are ignored, inserting the default date (all
examples were entered without the quotes of course).
As I am a totally inexperienced emacs-user this likely is a
configuration issue, seems like a helper function hasn't been loaded.

For reference my ~/.emacs file :

(keyboard-translate ?\C-h ?\C-?)
(global-set-key [(hyper h)] 'help-command)
(add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))
(global-set-key \C-cl 'org-store-link)
(global-set-key \C-ca 'org-agenda)
(global-set-key \C-cb 'org-iswitchb)
(setq org-log-done t)
(setq org-agenda-files (list ~/org/work.org
~/org/study.org
~/org/home.org))
(add-hook 'org-mode-hook 'turn-on-font-lock)
(transient-mark-mode 1)

Hopefully someone can give me a quick hint on what is wrong.


Regards,

Simon

PS: Please cc me when replying, as I am not on the mailing-list


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] SOLVED: date/time-prompt broken in debian lenny package?

2009-03-11 Thread Simon Campese
Hello again,

I solved the problem by just installing the debian org-mode package
which I hadn't done before. Necessary startup code has been integrated
into the site-wide emacs startup file and everything works fine now. I
am really sorry for bothering you all with such minor issues.


Regards,

Simon


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode