Re: literate programming, development log -- ideas? (ominbus reply)

2021-06-11 Thread Juan Manuel Macías
Samuel Banya writes:

> I'm okay with git repos for dot files or some kind of programming
> project but yeah, I've been debating something else for an org based
> repo cause I too have almost had my 'life.org' be completely destroyed
> with a merge event.

I have all my everyday Org documents in a Nextcloud folder, but only
because I work between the desktop PC and the laptop. I sync using a
script with nextcloud-cmd, not via the Nextcloud app, which I find it
somewhat intrusive. And with another script I do every week a backup of
that folder to a git repo. But this repo is secondary and is only for
keep some backups (I also keep a weekly backup of Elpa folders ---last
versions--- there, in case some update breaks something).

Best regards,

Juan Manuel 






Re: literate programming, development log -- ideas? (ominbus reply)

2021-06-11 Thread Samuel Banya
Now this idea I like!

Thanks for this, I didn't think about using the Git repo as a SECONDARY backup 
source.

Also, using Nextcloud sounds like a neat idea.

I'm into Self-Hosting stuff myself nowadays but am starting out small (ex: Just 
bought an old Dell Optiplex from eBay, put 2 HDDs into it, planning on using it 
for HDD backups, and as a Git server).

However, this sounds like an awesome workflow, as I did not consider to host 
Nextcloud. Awesome idea, thank you for this, Juan!

On Fri, Jun 11, 2021, at 10:30 AM, Juan Manuel Macías wrote:
> Samuel Banya writes:
> 
> > I'm okay with git repos for dot files or some kind of programming
> > project but yeah, I've been debating something else for an org based
> > repo cause I too have almost had my 'life.org' be completely destroyed
> > with a merge event.
> 
> I have all my everyday Org documents in a Nextcloud folder, but only
> because I work between the desktop PC and the laptop. I sync using a
> script with nextcloud-cmd, not via the Nextcloud app, which I find it
> somewhat intrusive. And with another script I do every week a backup of
> that folder to a git repo. But this repo is secondary and is only for
> keep some backups (I also keep a weekly backup of Elpa folders ---last
> versions--- there, in case some update breaks something).
> 
> Best regards,
> 
> Juan Manuel 
> 
> 
> 
> 


Re: org-attach a directory?

2021-06-11 Thread John Kitchin
I discovered another way to do this that is already built in with
`org-attach-dired-to-subtree` that would help sometimes.

You split your window, open dired in one of them, mark some files, and then
run that command in the dired window.

John

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



On Thu, Jun 10, 2021 at 10:04 PM stardiviner  wrote:

> I want this feature patch too. Hope Org Mode can add this. I remember old
> version org-mode can do this. But later delete this feature? I forget what
> version is.
>
> I suggest to add this feature.
>
> On Jun 8, 2021, at 11:49 PM, John Kitchin  wrote:
>
> Is it possible to attach a directory to an org heading?
>
> I have only seen how to attach a file so far.
>
> John
>
> ---
> Professor John Kitchin (he/him/his)
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>
>


Re: [PATCH] Allow LaTeX reference command (\ref) to be customised

2021-06-11 Thread Nicolas Goaziou
Hello,

Timothy  writes:

> Cool :) Merged.

Thank you.

Regards,
-- 
Nicolas Goaziou



Re: org-attach a directory?

2021-06-11 Thread Juan Manuel Macías
I have put the Ihor's snippet in my init file. I find it very useful,
and everything is done from a simple Helm session. The only case it
doesn't work is when I just want to copy a directory --not a file--
(instead of moving or giving it a symbolic link). So I have done this
little modification (just added a conditional to the old function when
the method attach is 'cp: if attachment is a file, run `copy-file'. If
it is a directory, run `copy-directory'. Then just call the org-attach
dispatcher as always: C-c C-a and select an attach method:

(define-advice org-attach-attach (:around (oldfun files &rest args) 
start-from-default-directory)
  "Code shared by Ihor Radchenko, slightly modified and adapted to my use."
  (interactive
   (list
(mapcar #'directory-file-name (helm-read-file-name "File to keep as an 
attachment:"
   :initial-input (or (progn

(require 'dired-aux)

(dired-dwim-target-directory))
  
default-directory)
   :marked-candidates t))
current-prefix-arg
nil))
;; my addition starts here
  (setq oldfun (lambda (file &optional visit-dir method)
 (interactive)
 (setq method (or method org-attach-method))
 (let ((basename (file-name-nondirectory file)))
   (let* ((attach-dir (org-attach-dir 'get-create))
  (attach-file (expand-file-name basename attach-dir)))
 (cond
  ((eq method 'mv) (rename-file file attach-file))
  ((eq method 'cp) (if (file-directory-p file) 
(ref:lin-attach)
   (copy-directory file attach-file)
 (copy-file file attach-file)))
  ((eq method 'ln) (add-name-to-file file attach-file))
  ((eq method 'lns) (make-symbolic-link file attach-file))
  ((eq method 'url) (url-copy-file file attach-file)))
 (run-hook-with-args 'org-attach-after-change-hook 
attach-dir)
 (org-attach-tag)
 (cond ((eq org-attach-store-link-p 'attached)
(push (list (concat "attachment:" 
(file-name-nondirectory attach-file))
(file-name-nondirectory attach-file))
  org-stored-links))
   ((eq org-attach-store-link-p t)
(push (list (concat "file:" file)
(file-name-nondirectory file))
  org-stored-links))
   ((eq org-attach-store-link-p 'file)
(push (list (concat "file:" attach-file)
(file-name-nondirectory attach-file))
  org-stored-links)))
 (if visit-dir
 (dired attach-dir)
   (message "File or directory %S is now an
  attachment" basename))
  ;; my addition ends here
  (unless (listp files) (setq files (list files)))
  (mapc (lambda (file) (apply oldfun file args)) files))

John Kitchin writes:

> I discovered another way to do this that is already built in with
> `org-attach-dired-to-subtree` that would help sometimes.
>
> You split your window, open dired in one of them, mark some files, and
> then run that command in the dired window.
>
> John
>
> ---
> Professor John Kitchin (he/him/his)
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
> On Thu, Jun 10, 2021 at 10:04 PM stardiviner 
> wrote:
>
> I want this feature patch too. Hope Org Mode can add this. I
> remember old version org-mode can do this. But later delete this
> feature? I forget what version is.
>
> I suggest to add this feature.
>
> On Jun 8, 2021, at 11:49 PM, John Kitchin
>  wrote:
>
> Is it possible to attach a directory to an org heading?
>
> I have only seen how to attach a file so far.
>
> John
>
> ---
> Professor John Kitchin (he/him/his)
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>

--



Failure to resolve internal links on ox-html export?

2021-06-11 Thread Tim Visher
Hi Everyone,

I'd like to be able to link to various areas of a large wiki file I
maintain for when I'm looking at an entry in emacs. However, I will often
email exported subtrees and when I do that if I have a link to a heading
that's outside the current subtree it fails with a `user-error: Unable to
resolve link: …`, I assume because the export tree doesn't contain that
heading.

Is there any way to tell the exporter to simply make those into plain text
_or_ to simply ignore the error?

Thanks in advance!

--

In Christ,

Timmy V.

https://blog.twonegatives.com
http://five.sentenc.es


Re: Failure to resolve internal links on ox-html export?

2021-06-11 Thread Juan Manuel Macías
Hi Tim,

Try setting this variable to non-nil:

(setq org-export-with-broken-links t)

Best regards,

Juan Manuel 

Tim Visher writes:

> Hi Everyone,
>
> I'd like to be able to link to various areas of a large wiki file I
> maintain for when I'm looking at an entry in emacs. However, I will
> often email exported subtrees and when I do that if I have a link to a
> heading that's outside the current subtree it fails with a
> `user-error: Unable to resolve link: …`, I assume because the export
> tree doesn't contain that heading.
>
> Is there any way to tell the exporter to simply make those into plain
> text _or_ to simply ignore the error?
>
> Thanks in advance!
>
> --
>
> In Christ,
>
> Timmy V.
>
> https://blog.twonegatives.com
> http://five.sentenc.es
>



Emacs-related IRC channels moving to Libera.Chat

2021-06-11 Thread Amin Bandali
Hello,

Per today's announcement [0] on GNU and FSF moving to the Libera.Chat
IRC network, the following Emacs-related channels are also moving from
Freenode to Libera.Chat:

- #emacs
- #emacs-beginners
- #org-mode
- #erc
- #gnus

[0]: https://lists.gnu.org/archive/html/info-gnu/2021-06/msg5.html

Additionally, several other #emacs-* channels have already moved or
have been newly formed on Libera.Chat.  If you would like to register
a new channel in the #emacs-* namespace on Libera.Chat, including for
channels previously on Freenode, please email me at bandali at gnu.org
off-list and I would be happy to help set things up.

In the interest of keeping this list's discussions on topic, please
direct any replies to this post to the emacs-tange...@gnu.org list
instead or to myself off-list, thank you.



Re: literate programming, development log -- ideas? (ominbus reply)

2021-06-11 Thread Christian Barthel
On Tue, Jun 08 2021, Samuel Banya wrote:

> Not sure if it counts as off-topic for this thread, but does
> everyone use Git to manage their Org docs and notes? 

I store my "main" org file in git and commit daily (*).  I have
activated magit-wip-mode for keeping some kind of a backup in
case I execute an unwanted command.  I also let Emacs save
numbered backup files in ~/.emacs.d/backups.  This could be
helpful when I delete the git repository and my org file in
~/doc/org accidentally.

I also store the org files that I create with org-ref
(literature/Author.org). 
I am undecided how to do this with my org-attach folder because
there are some larger files that I do not want to store in git.
git-lfs seemed to be an option but as far as I have seen, it is
not possible to do a local clone [1].
Would love to hear how others manage this.

(*) Previously, I did this monthly with RCS but switched a few
months.

[1] https://github.com/git-lfs/git-lfs/issues/3073
-- 
Christian Barthel



ox-taskjuggler scenarios

2021-06-11 Thread david whiting
Hi,

I am starting to use org-mode with taskjuggler and am trying to
implement scenarios. To work with scenarios I need to be able to
provide the scenario parameter values where the scenario differs to
the default plan. For example, using the example from
https://taskjuggler.org/tj3/manual/Day_To_Day_Juggling.html#Tracking_the_Project
there are two scenarios, called "actual" and "test". To apply
different values to show the base scenario/plan, what actually
happened and the test scenario, I would do something like this:

task t "Task" {
  start 2007-05-29
  actual:start 2007-06-03
  test:start 2007-06-07
}

In this example, the original plan was to start on 2007-05-29, the
project actually started on 2007-06-03 and we also get to see what
would have happened if we started on 2007-06-07.

Using org-mode I can use the following to create the task with the
planned start date:

*** Task
:PROPERTIES:
:start: 2007-05-29
:END:

But I haven't been able to add the actual and test scenarios. I need
to be able to add something like:

*** Task
:PROPERTIES:
:start: 2007-05-29
:actual:start: 2007-06-03
:test:start: 2007-06-07
:END:

But the actual and test information is ignored, it is not converted in
the tjp file. I have tried adding "actual:start" (without the quotes)
to org-taskjuggler-valid-task-attributes, but that did not work. I
have also tried a similar approach with "effort", but again it is
ignored.

I currently have a hack to get what I want. I add the scenario info as
a comment with a marker and then run a sed script on the resulting tjp
file to replace the comment-markers with \n, like this:

*** Task
:PROPERTIES:
:start: 2007-05-29 #@actual:start 2007-06-03 #@test:start 2007-06-07
:END:

Is there a better way to do this?

David
-- 
David Whiting