[O] [feature] prepend comment char before org-babel-ref

2018-01-23 Thread numbch...@gmail.com
I'm currently using this advice:
```elisp
;;; prepend comment char ahead of `org-babel-ref'.
;; auto prefix with comment char when create code ref in src block with
`org-store-link'.
(defun org-babel-ref-prepend-comment-char (arg  interactive?)
  "Prepend comment chart in Org-mode src code block."
  (when (org-src-edit-buffer-p)
(comment-dwim nil)
(insert " ")))

(advice-add 'org-store-link :before #'org-babel-ref-prepend-comment-char)
```

There is another solution but not work:
```elisp
;;; Another implement solution.
(defun org-src-coderef-format ( element)
  (cond
   ((and element (org-element-property :label-fmt element)))
   ((org-src-edit-buffer-p) (org-src-do-at-code-block
(org-src-coderef-format)))
   ((org-element-property :label-fmt (org-element-at-point)))
   (t org-coderef-label-format)))

(defun org-src-coderef-prepend-comment-char (args)
  "Prepend comment chart in Org-mode src code block."
  (when (org-src-edit-buffer-p)
(comment-dwim nil)
(insert " ")))

(advice-add 'org-src-coderef-format :filter-return
#'org-src-coderef-prepend-comment-char)
```

I think this function should be in Org-mode itself.
Because when you're editing the source code, will not want this src-coderef
like `(ref:example)` be editable. It should be in comment.

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


Re: [O] compatible issue between MELPA org and source code org

2018-01-23 Thread numbch...@gmail.com
After check your source code, I finally and with your theory:

> Org doesn't load automatically.. it autoloads only if you open an Org
file or call an org-loading function. After emacs -Q, if you do M-:
(featurep 'org), you will get nil. So the user does get a change to set the
load path as they want before any package gets loaded.

I finally understand how it works. Yesterday, I use a crude way: delete
Emacs built-in org/ directory. This works too. But I still take your
method. Your method is the correct way. Thanks very much.

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Wed, Jan 24, 2018 at 12:15 AM, Kaushal Modi 
wrote:

> On Tue, Jan 23, 2018 at 11:09 AM numbch...@gmail.com 
> wrote:
>
>> Thanks for your advice. After your code inspiration. I got an idea. After
>> test, it works fine. I try to load `use-package` and `(use-package org :pin
>> manaul ..)` ahead of `(package-initialize)`. Half of the problem is solved.
>>
>
>
>> The another half of the problem is that Emacs still will load built-in
>> org-mode in lisp/org/. I think I can't solve this problem essentially.
>> Because I can't load before Emacs built-in library. Oops.
>>
>
> Org doesn't load automatically.. it autoloads only if you open an Org file
> or call an org-loading function. After emacs -Q, if you do M-: (featurep
> 'org), you will get nil. So the user does get a change to set the load path
> as they want before any package gets loaded.
>
> That's way, I tweak the load-path in the :preface section[1] in the org
> use-package form. The load-path would be set exactly as I want before org
> gets (auto)loaded.
>
> [1]: https://github.com/kaushalmodi/.emacs.d/blob/
> master/setup-files/setup-org.el
>
>
> --
>
> Kaushal Modi
>


Re: [O] How to set org-tag-alist

2018-01-23 Thread Nick Dokos
Lawrence Bottorff  writes:

> This describes a org-tag-alist for setting up globally a list of tags, but 
> I'm not sure how to alter
> org-tag-alist. I'm used to doing an M-x customize-variable, but there is no 
> org-tag-alist.

There is a defcustom for it in org.el, so once that is loaded, you should be 
able
to customize it. 

>  Later on the page it has this form:
>
> (setq org-tag-alist '(("@work" . ?w) ("@home" . ?h) ("laptop" . ?l)))
>
> which seems to be something to put in my .emacs, i.e., org-tag-alist is not 
> an existing variable?
>

You probably have not loaded org yet.

-- 
Nick




[O] Bug: Option :session cripples the Results output by adding ">" sign

2018-01-23 Thread msj
When I attempt to work with shell source blocks in session mode
(:session argument) I'm receiving in RESULTS block an unwanted sign
(probably line continuation sign) in multi line commands like 'for'
loop.

---
 How it works at the moment ---
---

#+BEGIN_SRC sh :session test
for i in `seq 1 5`;do
   echo $i
   echo 
done
#+END_SRC
 
#+RESULTS:
| > | > | > | 1 |
|   |   |   |   |
| 2 |   |   |   |
|   |   |   |   |
| 3 |   |   |   |
|   |   |   |   |
| 4 |   |   |   |
|   |   |   |   |
| 5 |   |   |   |

---
--- code evaluation taken from 'test' buffer ---
---

for i in `seq 1 5`;do
$echo $i
> >echo 
> done
1

2

3

4

5
 
$ echo 'org_babel_sh_eoe'
org_babel_sh_eoe
$

---
--- Expected behavior (for this case adding a sign is omitted by
running the loop in one line mode ---
---


#+BEGIN_SRC bash :session test7
  for i in $(seq 1 5);do echo "hello"; done
#+END_SRC
 
#+RESULTS:
| hello |
| hello |
| hello |
| hello |
| hello |
 


Some further troubleshooting revealed that by exporting PS2 to an empty
string this behavior can be temporarily suppressed.


Regards,
Peter



Emacs  : GNU Emacs 25.3.1 (x86_64-unknown-linux-gnu, GTK+ Version
3.22.26)
 of 2017-12-16
Package: Org mode version 9.1.6 (9.1.6-16-g86a382-elpaplus @
/home/cqs/.emacs.d/elpa/org-plus-contrib-20180115/)





Re: [O] [RFC] Moving "manual.org" into core

2018-01-23 Thread Samuel Wales
i will leave style decisions to the bike shed manufacturer [those who
do the work].  but i will opine anyway.  i'm with the no indentation
people.  [except -- not implemented -- plain lists indented by 2.  :]]

but my reason for posting is that as a default for org, i think (setq
org-src-preserve-indentation t) would surprise users less.  and to
congratulate for dogfooding.  :]



Re: [O] [RFC] Moving "manual.org" into core

2018-01-23 Thread Thomas S. Dye

Aloha all,

Nicolas Goaziou writes:



Note that I made a few design choices I didn't write about, 
e.g.,:


  - use fixed-width area for one-line examples,
  - use example blocks for Org syntax instead of "begin_src 
  org",

  - internal links to headlines always start with a star,
  - tags, node properties, are not shown with the surrounding 
  columns,

  - when to use =...= or ~...~ markup:
- files or extensions use =...=,
- anything that is meant to be written in the Org buffer 
uses =...=,

- any meaningful token in a programming language uses ~...~.


I'd like to follow up on an earlier suggestion to put together a 
style guide for manual.org based on Phil Rooke's 
Documentation_Standards.org.  The idea was to "translate" Phil's 
document to follow the change from .texi source to .org source.


I think it will prove useful to have design choices described 
together in one place.


I've copied Phil in case he objects to having his "Notes to myself 
..." document used in this way.


Any comments welcome.

All the best,
Tom

--
Thomas S. Dye
http://www.tsdye.com



Re: [O] sed tests

2018-01-23 Thread Marco Wahl
Hi Skip,

Collins  writes:

> Recently (last two or three weeks), when I run make test on the latest
> git source (currently release_9.1.6-395-g8ecc4c) on my mac with Emacs
> 26.0.90 (compiled with brew on my Mac), I get the following results:
>
> Ran 775 tests, 771 results as expected, 4 unexpected (2018-01-23 
> 11:37:59-0500)
> 11 expected failures
>
> 4 unexpected results:
>FAILED  ob-sed-test/cmd-line-header-argument
>FAILED  ob-sed-test/in-file-header-argument
>FAILED  ob-sed-test/simple-execution-of-script
>FAILED  test-ob-python/session-multiline
>
> I would appreciate any suggestions for how to address the problem.
> This is not urgent, as I don't use ob-sed and org seems to be
> functioning normally otherwise. But OSX command line tools sometimes
> have quirks that show up as failed tests. Of course it is possible
> that I broke my emacs/org in some way.

Some days ago I accidentially saw that the sed tests were disabled and
that I could easily activate them.  And I did and thought that was a
wonderful idea.  And also the sed tests pass on my linux box.

This

> Test ob-sed-test/cmd-line-header-argument condition:
> (ert-test-failed
>  ((should
>(string= "A tested again file.
> "
> (with-temp-buffer ... ...)))
>   :form
>   (string= "A tested again file.
> "  "A test file.
> ")
>   :value nil))

shows that sed did not do the substitution of "test" by "tested again"
as defined in the respective sed babel block.

Maybe you could try to execute sed babel blocks directly.  Possibly you
get a better understanding of the behaviour.


HTH
   Marco
   




Re: [O] Make tag inheritance explicit

2018-01-23 Thread Karl Voit
* Kaushal Modi  wrote:
>
> On Tue, Jan 23, 2018 at 9:45 AM Karl Voit  wrote:
>
>> > 2. Use `org-get-tags-at' with point on "Task 1" heading in your example.
>> > `org-get-tags' returns a list of tags *only* at the current heading.
>> > `org-get-tags-at' returns inherited tags too.
>>
>> You mean for developing a custom-made function that provides the
>> feature I was asking for?
>
> By "feature", you mean copying all the inherited tags to the heading at
> point?

Yes.

With your help, I wrote:

(defun my-set-tags-including-inherited ()
  (interactive)
  (let (
(alltags (org-get-tags-at))
)
(org-set-tags-to alltags)
)
  )

Which provides me "the feature" I was looking for. It can be
simplified, I know. However, I tried to add a list of tags I *don't*
want to be added to the heading but failed so far.

alltags content example:
(#("test1" 0 5 (inherited t)) #("foobar" 0 6 (inherited t))
 #("test2" 0 5 (inherited t)) #("baz" 0 3 (inherited t)))

Do you have an idea, how I can delete all items contained in my
black-list?

My example black list would be: (ignored-tags '(test1 2del crypt))

My latest approach on a single-item level was:
(remove* "test1" alltags :test 'equal :key 'car)

>> First, I wanted to get a confirmation that this feature is not
>> already part of Org-mode because (as usual) this seemed obvious to
>> me when using export functionality ;-)
>
> It's not clear what you mean by "feature is not already part of Org-mode".

Sorry for being unclear.

I thought, there might be something like "org-add-inherited-tags" or
similar I was not aware of.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] How to set org-tag-alist

2018-01-23 Thread Lawrence Bottorff
This  describes
a org-tag-alist for setting up globally a list of tags, but I'm not sure
how to alter org-tag-alist. I'm used to doing an M-x customize-variable,
but there is no org-tag-alist. Later on the page it has this form:

(setq org-tag-alist '(("@work" . ?w) ("@home" . ?h) ("laptop" . ?l)))

which seems to be something to put in my .emacs, i.e., org-tag-alist is not
an existing variable?

LB


[O] sed tests

2018-01-23 Thread Skip Collins
Recently (last two or three weeks), when I run make test on the latest
git source (currently release_9.1.6-395-g8ecc4c) on my mac with Emacs
26.0.90 (compiled with brew on my Mac), I get the following results:

Ran 775 tests, 771 results as expected, 4 unexpected (2018-01-23 11:37:59-0500)
11 expected failures

4 unexpected results:
   FAILED  ob-sed-test/cmd-line-header-argument
   FAILED  ob-sed-test/in-file-header-argument
   FAILED  ob-sed-test/simple-execution-of-script
   FAILED  test-ob-python/session-multiline

I would appreciate any suggestions for how to address the problem.
This is not urgent, as I don't use ob-sed and org seems to be
functioning normally otherwise. But OSX command line tools sometimes
have quirks that show up as failed tests. Of course it is possible
that I broke my emacs/org in some way.

The backtrace from the first failed test is:
executing Sed code block...
executing sed source code block
Babel evaluation exited with code 1
Code block produced no output.
Test ob-sed-test/cmd-line-header-argument backtrace:
  signal(ert-test-failed (((should (string= "A tested again file.\n" (
  ert-fail(((should (string= "A tested again file.\n" (with-temp-buffe
  (if (unwind-protect (setq value-1104 (apply fn-1102 args-1103)) (set
  (let (form-description-1106) (if (unwind-protect (setq value-1104 (a
  (let ((value-1104 'ert-form-evaluation-aborted-1105)) (let (form-des
  (let* ((fn-1102 (function string=)) (args-1103 (condition-case err (
  (let ((default-directory temporary-file-directory)) (let ((temp-buff
  (save-restriction (let ((default-directory temporary-file-directory)
  (progn (org-id-goto "E3C6A8BA-39FF-4840-BA8E-90D5C4365AB1") (setq to
  (unwind-protect (progn (org-id-goto "E3C6A8BA-39FF-4840-BA8E-90D5C43
  (let ((save-match-data-internal (match-data))) (unwind-protect (prog
  (progn (let ((save-match-data-internal (match-data))) (unwind-protec
  (unwind-protect (progn (let ((save-match-data-internal (match-data))
  (let ((wconfig (current-window-configuration))) (unwind-protect (pro
  (unwind-protect (let ((wconfig (current-window-configuration))) (unw
  (let* ((id-location (org-id-find "E3C6A8BA-39FF-4840-BA8E-90D5C4365A
  (lambda nil (let* ((id-location (org-id-find "E3C6A8BA-39FF-4840-BA8
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name ob-sed-test/cmd-line-header-argument
  ert-run-or-rerun-test(#s(ert--stats :selector "\\(org\\|ob\\)" :test
  ert-run-tests("\\(org\\|ob\\)" #f(compiled-function (event-type 
  ert-run-tests-batch("\\(org\\|ob\\)")
  ert-run-tests-batch-and-exit("\\(org\\|ob\\)")
  (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
  org-test-run-batch-tests("\\(org\\|ob\\)")
  eval((org-test-run-batch-tests org-test-select-re))
  command-line-1(("--eval" "(setq vc-handled-backends nil org-startup-
  command-line()
  normal-top-level()
Test ob-sed-test/cmd-line-header-argument condition:
(ert-test-failed
 ((should
   (string= "A tested again file.
"
(with-temp-buffer ... ...)))
  :form
  (string= "A tested again file.
" "A test file.
")
  :value nil))
   FAILED  109/775  ob-sed-test/cmd-line-header-argument



Re: [O] [RFC] Moving "manual.org" into core

2018-01-23 Thread Kaushal Modi
On Tue, Jan 23, 2018 at 11:33 AM Nicolas Goaziou 
wrote:

>
> If `org-src-fontify-natively' is non-nil, contents of source blocks is
> not shown verbatim. In this particular case, contents are displayed as
> in an Org buffer, which means links are partly invisible.
>

Thanks. That makes sense. It's almost as if fontification should be
separated from overlay application (or whichever technique is used to make
the links invisible).

But with how the things are, looks like example blocks is the way to go to
prevent the link hiding in Org snippets.


-- 

Kaushal Modi


Re: [O] [RFC] Moving "manual.org" into core

2018-01-23 Thread Nicolas Goaziou
Hello,

Kaushal Modi  writes:

> On Mon, Jan 22, 2018 at 2:52 PM Nicolas Goaziou 
> wrote:
>
>> There is another issue with "begin_src org" blocks. If your example
>> contains a link, you only see the description part, not the whole
>> syntax. Thus
>>
>> #+begin_src org
>>   [[path][description]]
>> #+end_src
>>
>> is seen as
>>
>> #+begin_src org
>>   description
>> #+end_src
>>
>> which can be very confusing.
>>
>
> Wouldn't that qualify as a bug? Shouldn't text in src blocks always be
> shown verbatim without any overlays?

If `org-src-fontify-natively' is non-nil, contents of source blocks is
not shown verbatim. In this particular case, contents are displayed as
in an Org buffer, which means links are partly invisible.

Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Moving "manual.org" into core

2018-01-23 Thread Julius Dittmar
Am 23.01.2018 um 16:19 schrieb Kaushal Modi:
> There is another issue with "begin_src org" blocks. If your example
> contains a link, you only see the description part, not the whole
> syntax. Thus
> 
> #+begin_src org
>   [[path][description]]
> #+end_src
> 
> is seen as
> 
> #+begin_src org
>   description
> #+end_src
> 
> which can be very confusing.
> 
> 
> Wouldn't that qualify as a bug? Shouldn't text in src blocks always be
> shown verbatim without any overlays? Use of example block instead of src
> block using this as one of the reasons looks like a workaround.

I think not.

As far as I understood, a src block is tagged with a style information
so the appropriate emacs mode for displaying this kind of code is used.
So the second display is exactly what I'd expect.

Julius




Re: [O] compatible issue between MELPA org and source code org

2018-01-23 Thread Kaushal Modi
On Tue, Jan 23, 2018 at 11:09 AM numbch...@gmail.com 
wrote:

> Thanks for your advice. After your code inspiration. I got an idea. After
> test, it works fine. I try to load `use-package` and `(use-package org :pin
> manaul ..)` ahead of `(package-initialize)`. Half of the problem is solved.
>


> The another half of the problem is that Emacs still will load built-in
> org-mode in lisp/org/. I think I can't solve this problem essentially.
> Because I can't load before Emacs built-in library. Oops.
>

Org doesn't load automatically.. it autoloads only if you open an Org file
or call an org-loading function. After emacs -Q, if you do M-: (featurep
'org), you will get nil. So the user does get a change to set the load path
as they want before any package gets loaded.

That's way, I tweak the load-path in the :preface section[1] in the org
use-package form. The load-path would be set exactly as I want before org
gets (auto)loaded.

[1]:
https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-org.el


-- 

Kaushal Modi


Re: [O] compatible issue between MELPA org and source code org

2018-01-23 Thread numbch...@gmail.com
Thanks for your advice. After your code inspiration. I got an idea. After
test, it works fine. I try to load `use-package` and `(use-package org :pin
manaul ..)` ahead of `(package-initialize)`. Half of the problem is solved.
The another half of the problem is that Emacs still will load built-in
org-mode in lisp/org/. I think I can't solve this problem essentially.
Because I can't load before Emacs built-in library. Oops.

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Tue, Jan 23, 2018 at 8:26 PM, Kaushal Modi 
wrote:

> On Mon, Jan 22, 2018, 4:41 AM numbch...@gmail.com 
> wrote:
>
>>
>> Does anybody have a perfect solution to use latest source code Org in
>> Emacs way?
>>
>
> I've been using a solution that's working perfectly for me. Unfortunately,
> the only way is to:
>
> 1. Uninstall all the Org installations that you don't want to use
> (example: delete the Org Elpa installed version if you plan to use the git
> cloned version).
> 2. Advice a package.el function that never auto-installs Org as
> dependency.
> 3. Another advice to never update Org using the package manager (as you
> would be managing the updates yourself using git).
>
> Basically the update/dependency-check should not install Org.
>
> A while back, I did a detailed write-up on this setup:
> https://scripter.co/building-org-development-version/. With that setup,
> and modi/org-version-select set to 'dev, I don't have to worry about other
> Org versions getting auto-installed.
>
>> --
>
> Kaushal Modi
>


Re: [O] [RFC] Moving "manual.org" into core

2018-01-23 Thread Kaushal Modi
On Mon, Jan 22, 2018 at 2:52 PM Nicolas Goaziou 
wrote:

> Kaushal Modi  writes:
>


> There is another issue with "begin_src org" blocks. If your example
> contains a link, you only see the description part, not the whole
> syntax. Thus
>
> #+begin_src org
>   [[path][description]]
> #+end_src
>
> is seen as
>
> #+begin_src org
>   description
> #+end_src
>
> which can be very confusing.
>

Wouldn't that qualify as a bug? Shouldn't text in src blocks always be
shown verbatim without any overlays? Use of example block instead of src
block using this as one of the reasons looks like a workaround.


-- 

Kaushal Modi


Re: [O] Make tag inheritance explicit

2018-01-23 Thread Kaushal Modi
On Tue, Jan 23, 2018 at 9:45 AM Karl Voit  wrote:

>
> > 2. Use `org-get-tags-at' with point on "Task 1" heading in your example.
> > `org-get-tags' returns a list of tags *only* at the current heading.
> > `org-get-tags-at' returns inherited tags too.
>
> You mean for developing a custom-made function that provides the
> feature I was asking for?
>

By "feature", you mean copying all the inherited tags to the heading at
point?

My suggestion implied that you can skip that copying step altogether and
directly use org-get-tags-at to gets all the inherited tags for the current
heading. That way, you wouldn't need to add redundant information to your
Org file.


> Yes, this helps a lot to me.
>

Great! :)

First, I wanted to get a confirmation that this feature is not
> already part of Org-mode because (as usual) this seemed obvious to
> me when using export functionality ;-)
>

It's not clear what you mean by "feature is not already part of Org-mode".
Org mode provides `org-get-tags-at', which any Org exporter can use. How
that function is used is, I think, very subjective. The way I use it in
ox-hugo is probably not used in other exporters.


-- 

Kaushal Modi


Re: [O] Make tag inheritance explicit

2018-01-23 Thread Karl Voit
Hi Carsten,

* Carsten Dominik  wrote:
>
> On Tue, Jan 23, 2018 at 11:22 AM, Karl Voit  wrote:
>
>> Background: Org-mode has perfect tag inheritance but unfortunately
>> the export methods I am using do export the tags only to the
>> headings they are assigned to and not to their sub-headings via
>> inheritance. So copying the inherited tags would be a viable
>> workaround to me.
>
> I guess this then should happen optionally during export.  Doing this in
> the buffer itself makes much less sense.

I totally agree.

However, from my (non-insider) perspective, this would require all
export methods to adapt. Or was this situation improved as we
switched the general export framework some time ago?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Make tag inheritance explicit

2018-01-23 Thread Karl Voit
Hi,

* Kaushal Modi  wrote:
>
> On Tue, Jan 23, 2018, 5:24 AM Karl Voit  wrote:
>
>> Org-mode has perfect tag inheritance but unfortunately
>> the export methods I am using do export the tags only to the
>> headings they are assigned to and not to their sub-headings via
>> inheritance.
>
> Hello,
>
> I am curious how you are exporting. Are you exporting using subtree scope?

Always, yes.

> I am asking because I am using the exact same style of tagging for my
> posts, and I export using subtree scopes using ox-hugo,.. and I faced the
> exact same challenge.

My current export methods are: HTML, pandoc>docx, latex>PDF

> The trick is to:
>
> 1. Set org-use-tag-inheritance to t (temporarily in let so that it doesn't
> populate the user-set global value).

Check.

> 2. Use `org-get-tags-at' with point on "Task 1" heading in your example.
> `org-get-tags' returns a list of tags *only* at the current heading.
> `org-get-tags-at' returns inherited tags too.

You mean for developing a custom-made function that provides the
feature I was asking for?

Yes, this helps a lot to me.

First, I wanted to get a confirmation that this feature is not
already part of Org-mode because (as usual) this seemed obvious to
me when using export functionality ;-)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] compatible issue between MELPA org and source code org

2018-01-23 Thread Kaushal Modi
On Mon, Jan 22, 2018, 4:41 AM numbch...@gmail.com 
wrote:

>
> Does anybody have a perfect solution to use latest source code Org in
> Emacs way?
>

I've been using a solution that's working perfectly for me. Unfortunately,
the only way is to:

1. Uninstall all the Org installations that you don't want to use (example:
delete the Org Elpa installed version if you plan to use the git cloned
version).
2. Advice a package.el function that never auto-installs Org as dependency.
3. Another advice to never update Org using the package manager (as you
would be managing the updates yourself using git).

Basically the update/dependency-check should not install Org.

A while back, I did a detailed write-up on this setup:
https://scripter.co/building-org-development-version/. With that setup, and
modi/org-version-select set to 'dev, I don't have to worry about other Org
versions getting auto-installed.

> --

Kaushal Modi


Re: [O] Make tag inheritance explicit

2018-01-23 Thread Carsten Dominik
On Tue, Jan 23, 2018 at 11:22 AM, Karl Voit  wrote:

> Hi!
>
> Is it possible to lookup inherited tags and add them explicitly to
> the current heading?
>
> Example:
>
> * Project:ProjectX:
> ** Sub-Project   :@Joe:
> *** Task 1
> *** Task 2
>
> When I go to "Task 1" (or 2), I want to invoke a command which
> "copies" the tags ProjectX and @Joe to the heading of the task.
>
>
> Background: Org-mode has perfect tag inheritance but unfortunately
> the export methods I am using do export the tags only to the
> headings they are assigned to and not to their sub-headings via
> inheritance. So copying the inherited tags would be a viable
> workaround to me.
>

I guess this then should happen optionally during export.  Doing this in
the buffer itself makes much less sense.

Carsten


>
> Thanks!
>
> --
> get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
>> get Memacs from https://github.com/novoid/Memacs <
> Personal Information Management > http://Karl-Voit.at/tags/pim/
> Emacs-related > http://Karl-Voit.at/tags/emacs/
>
>
>


Re: [O] Make tag inheritance explicit

2018-01-23 Thread Kaushal Modi
On Tue, Jan 23, 2018, 5:24 AM Karl Voit  wrote:

> Org-mode has perfect tag inheritance but unfortunately
> the export methods I am using do export the tags only to the
> headings they are assigned to and not to their sub-headings via
> inheritance.


Hello,

I am curious how you are exporting. Are you exporting using subtree scope?
I am asking because I am using the exact same style of tagging for my
posts, and I export using subtree scopes using ox-hugo,.. and I faced the
exact same challenge.

The trick is to:

1. Set org-use-tag-inheritance to t (temporarily in let so that it doesn't
populate the user-set global value).
2. Use `org-get-tags-at' with point on "Task 1" heading in your example.
`org-get-tags' returns a list of tags *only* at the current heading.
`org-get-tags-at' returns inherited tags too.

Hope this helps.

> --

Kaushal Modi


[O] Make tag inheritance explicit

2018-01-23 Thread Karl Voit
Hi!

Is it possible to lookup inherited tags and add them explicitly to
the current heading?

Example:

* Project:ProjectX:
** Sub-Project   :@Joe:
*** Task 1
*** Task 2

When I go to "Task 1" (or 2), I want to invoke a command which
"copies" the tags ProjectX and @Joe to the heading of the task.


Background: Org-mode has perfect tag inheritance but unfortunately
the export methods I am using do export the tags only to the
headings they are assigned to and not to their sub-headings via
inheritance. So copying the inherited tags would be a viable
workaround to me.

Thanks!

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Feature request: #+INCLUDE: with anchors

2018-01-23 Thread Rasmus
BTW: For your original request there’s a hack here that might work for
you.  AFAIR it works by updating the lines.


http://endlessparentheses.com/updating-org-mode-include-statements-on-the-fly.html

At one point I considered adding some sort of regexp delimiters, but I
think including named objects is better in almost all cases.

Rasmus

-- 
Summon the Mothership!




Re: [O] [RFC] Moving "manual.org" into core

2018-01-23 Thread Christian Moe

Bastien Guerry writes:

> Hi Nicolas,
>
>> "manual.org" was updated a month ago, and, so far, nobody complained
>> about it. So, I think it's a good time to discuss about what could be
>> done next.
>
> Having the manual in .org is a great achievement, congrats to anyone
> who worked on this titanic task!

+1 !!

Yours,
Christian



[O] org-adapt-indentation 'content (was Re: [RFC] Moving "manual.org" into core)

2018-01-23 Thread Christian Moe

Nicolas Goaziou writes:

> Bastien Guerry  writes:
>
>> I've added (org-list-description-max-indent . 5)
>
> OK.
>
>> Me too, for the same argument.  But this points to a strong limitation
>> to `org-adapt-indentation' for which I'd like to propose this change.
>>
>>(setq org-adapt-indentation t) => current behavior
>>  (setq org-adapt-indentation nil) => current behavior
>> (setq org-adapt-indentation 'content) => only adapt content's
>>  indentation, not that of the property drawer.
>
> I proposed this very change some years ago, but it didn't get much
> traction and wasn't implemented in the end.

FWIW, I'd like this.

Yours,
Christian