Org-mode mailing list
 help / color / mirror / Atom feed
* buffer name of Org Src...
@ 2020-10-12 12:44 Greg Minshall
  2020-10-12 13:18 ` Eric S Fraga
  2020-10-12 13:39 ` Dr. Arne Babenhauserheide
  0 siblings, 2 replies; 15+ messages in thread
From: Greg Minshall @ 2020-10-12 12:44 UTC (permalink / raw)
  To: emacs-orgmode

hi, all.

i often write my version of (il)literate programs using one .org file,
from which four or five (typically) files are tangled.  and, generally,
i'm very happy with this.

but, when i have multiple Org Src ... buffers open, all from the same
language, i am at a loss on how to determine to which buffer i should
'C-x b', as the only distinguishing characteristic is a (possible)
trailing '<N>', for some small integer N.

in *my* case (with the project i'm currently working on), each source
block in the .org file is a separately tangled file, and each source
block could be tagged with a distinct '#+name:' value.

is there a way to customize the buffer name?  or, an easy hack?  (given
a choice, i'd probably have some function of [src block name; language;
tangled-to file name], prefixed, clearly, by Org Src... and optionally
suffixed with "<N>".)

cheers, Greg

ps -- in case it's of interest: possibly i'm frustrated now, and wasn't
so much in the past, as i recently got annoyed by having to go back to
the base file to save and tangle (part of my work flow, to test whatever
i'm working on), and, so, wrote a few lines of emacs lisp so that a 'C-x
s' save from the Org Src ... file causes a save of the base file
followed by a tangle.  so, i can basically live long periods of time
just in the Org Src ... buffers; if only i could find my way around.
cheers!


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 12:44 buffer name of Org Src Greg Minshall
@ 2020-10-12 13:18 ` Eric S Fraga
  2020-10-12 14:17   ` Greg Minshall
  2020-10-12 13:39 ` Dr. Arne Babenhauserheide
  1 sibling, 1 reply; 15+ messages in thread
From: Eric S Fraga @ 2020-10-12 13:18 UTC (permalink / raw)
  To: Greg Minshall; +Cc: emacs-orgmode

On Monday, 12 Oct 2020 at 15:44, Greg Minshall wrote:
> in *my* case (with the project i'm currently working on), each source
> block in the .org file is a separately tangled file, and each source
> block could be tagged with a distinct '#+name:' value.

Using the name of the src block would be a nice enhancement.

> ps -- in case it's of interest: possibly i'm frustrated now, and wasn't

I understand your frustration but I've found the solution that works in
my case, when tangling a large number of blocks all to the same code
file.  The solution is to work on the code file directly, having tangled
with :comments on, and then detangle (org-bable-detangle) to get the src
blocks back in the original org file.  I do this particularly in the
early stages of code development when I'm continually running and
editing the code.

HTH,
eric

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 12:44 buffer name of Org Src Greg Minshall
  2020-10-12 13:18 ` Eric S Fraga
@ 2020-10-12 13:39 ` Dr. Arne Babenhauserheide
  2020-10-12 14:04   ` Greg Minshall
  2020-10-12 14:11   ` Eric S Fraga
  1 sibling, 2 replies; 15+ messages in thread
From: Dr. Arne Babenhauserheide @ 2020-10-12 13:39 UTC (permalink / raw)
  To: Greg Minshall; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]


Greg Minshall <minshall@umich.edu> writes:
> ps -- in case it's of interest: possibly i'm frustrated now, and wasn't
> so much in the past, as i recently got annoyed by having to go back to
> the base file to save and tangle (part of my work flow, to test whatever
> i'm working on), and, so, wrote a few lines of emacs lisp so that a 'C-x
> s' save from the Org Src ... file causes a save of the base file
> followed by a tangle.  so, i can basically live long periods of time
> just in the Org Src ... buffers; if only i could find my way around.
> cheers!

Did you find a way to make flycheck or flymake work in the src-buffers?
I get problems with these, because the buffers are not associated to
real files. That’s what’s preventing me from using Org Src for anything
larger than a dozen simple lines.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 13:39 ` Dr. Arne Babenhauserheide
@ 2020-10-12 14:04   ` Greg Minshall
  2020-10-12 14:11   ` Eric S Fraga
  1 sibling, 0 replies; 15+ messages in thread
From: Greg Minshall @ 2020-10-12 14:04 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: emacs-orgmode

Arne,

no, sorry, i don't use either flymake or flycheck.

cheers, Greg


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 13:39 ` Dr. Arne Babenhauserheide
  2020-10-12 14:04   ` Greg Minshall
@ 2020-10-12 14:11   ` Eric S Fraga
  2020-10-12 16:33     ` Dr. Arne Babenhauserheide
  1 sibling, 1 reply; 15+ messages in thread
From: Eric S Fraga @ 2020-10-12 14:11 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: Greg Minshall, emacs-orgmode

On Monday, 12 Oct 2020 at 15:39, Dr. Arne Babenhauserheide wrote:
> Did you find a way to make flycheck or flymake work in the src-buffers?

This is an example of when I use tangling/detangling: when I need this
kind of support to develop my code.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 13:18 ` Eric S Fraga
@ 2020-10-12 14:17   ` Greg Minshall
  2020-10-12 14:31     ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: Greg Minshall @ 2020-10-12 14:17 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

Eric,

thanks.  de-tangling sounds like a possible solution.  though, at least
with Org Src ... buffers, org/emacs mostly keep me from messing up by,
e.g., making changes in both the base file source block and in the Org
Src... buffer (which i assume the de-tangling solution can't?).  given
my aging brain, such protection is probably vital for me.

cheers, Greg


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 14:17   ` Greg Minshall
@ 2020-10-12 14:31     ` Eric S Fraga
  2020-10-13  6:27       ` Greg Minshall
  0 siblings, 1 reply; 15+ messages in thread
From: Eric S Fraga @ 2020-10-12 14:31 UTC (permalink / raw)
  To: Greg Minshall; +Cc: emacs-orgmode

On Monday, 12 Oct 2020 at 17:17, Greg Minshall wrote:
> making changes in both the base file source block and in the Org
> Src... buffer (which i assume the de-tangling solution can't?).  

Yes, de-tangling cannot handle such simultaneous changes so you do need
to be careful.  But that's what git etc. are for! ;-)

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 14:11   ` Eric S Fraga
@ 2020-10-12 16:33     ` Dr. Arne Babenhauserheide
  2020-10-12 16:50       ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: Dr. Arne Babenhauserheide @ 2020-10-12 16:33 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Greg Minshall, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]


Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Monday, 12 Oct 2020 at 15:39, Dr. Arne Babenhauserheide wrote:
>> Did you find a way to make flycheck or flymake work in the src-buffers?
>
> This is an example of when I use tangling/detangling: when I need this
> kind of support to develop my code.

That’s also when I tangle — but I often don’t move the code back into
org afterwards, because once I needed this support once, I know I’ll
need it again.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 16:33     ` Dr. Arne Babenhauserheide
@ 2020-10-12 16:50       ` Eric S Fraga
  2020-10-12 18:52         ` Dr. Arne Babenhauserheide
  0 siblings, 1 reply; 15+ messages in thread
From: Eric S Fraga @ 2020-10-12 16:50 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: Greg Minshall, emacs-orgmode

On Monday, 12 Oct 2020 at 18:33, Dr. Arne Babenhauserheide wrote:
> That’s also when I tangle — but I often don’t move the code back into
> org afterwards, because once I needed this support once, I know I’ll
> need it again.

Interesting.  I guess my needs are different: I need these support tools
when doing the initial code development but not much after
that.  Subsequently, most of my time is spent with documentation,
dissemination, and bug fixes.  Doing most of this is easier in org mode.

But whatever works best for you is what you should do!

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 16:50       ` Eric S Fraga
@ 2020-10-12 18:52         ` Dr. Arne Babenhauserheide
  2020-10-13  7:51           ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: Dr. Arne Babenhauserheide @ 2020-10-12 18:52 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Greg Minshall, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]


Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Monday, 12 Oct 2020 at 18:33, Dr. Arne Babenhauserheide wrote:
>> That’s also when I tangle — but I often don’t move the code back into
>> org afterwards, because once I needed this support once, I know I’ll
>> need it again.
>
> Interesting.  I guess my needs are different: I need these support tools
> when doing the initial code development but not much after
> that.  Subsequently, most of my time is spent with documentation,
> dissemination, and bug fixes.  Doing most of this is easier in org mode.

Do you use org-mode to document stuff after you wrote it?

I often use it to start small tools that I need right now — for example
some data extraction — and I would prefer to keep them in org, because I
then have one single reference. And I often write the code while I’m
writing the text around it. When then something does not work, I need
debugging and exploration to find out how to fix it.

> But whatever works best for you is what you should do!

There are a lot of great ways to use org-mode :-)

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 14:31     ` Eric S Fraga
@ 2020-10-13  6:27       ` Greg Minshall
  2020-10-13  7:52         ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: Greg Minshall @ 2020-10-13  6:27 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

Eric,

> But that's what git etc. are for! ;-)

yes, but.  the first time i 'C-c C-v t' in the base file onto a
changed-but-uncommitted tangled file, even git will provide me no
succor.

cheers, Greg


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-12 18:52         ` Dr. Arne Babenhauserheide
@ 2020-10-13  7:51           ` Eric S Fraga
  0 siblings, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2020-10-13  7:51 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: Greg Minshall, emacs-orgmode

On Monday, 12 Oct 2020 at 20:52, Dr. Arne Babenhauserheide wrote:
> Do you use org-mode to document stuff after you wrote it?

Before, during, and after!

> I often use it to start small tools that I need right now — for example

I do as well.  I have little snippets of code and data throughout my
documents.  It is indeed very useful to have everything in one place.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-13  6:27       ` Greg Minshall
@ 2020-10-13  7:52         ` Eric S Fraga
  2020-10-13  9:01           ` Dr. Arne Babenhauserheide
  0 siblings, 1 reply; 15+ messages in thread
From: Eric S Fraga @ 2020-10-13  7:52 UTC (permalink / raw)
  To: Greg Minshall; +Cc: emacs-orgmode

On Tuesday, 13 Oct 2020 at 09:27, Greg Minshall wrote:
> yes, but.  the first time i 'C-c C-v t' in the base file onto a
> changed-but-uncommitted tangled file, even git will provide me no
> succor.

True.  :-(

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-13  7:52         ` Eric S Fraga
@ 2020-10-13  9:01           ` Dr. Arne Babenhauserheide
  2020-10-13 10:40             ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: Dr. Arne Babenhauserheide @ 2020-10-13  9:01 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Greg Minshall, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]


Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Tuesday, 13 Oct 2020 at 09:27, Greg Minshall wrote:
>> yes, but.  the first time i 'C-c C-v t' in the base file onto a
>> changed-but-uncommitted tangled file, even git will provide me no
>> succor.
>
> True.  :-(

Don’t you get a "do you want to revert file" warning then?

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: buffer name of Org Src...
  2020-10-13  9:01           ` Dr. Arne Babenhauserheide
@ 2020-10-13 10:40             ` Eric S Fraga
  0 siblings, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2020-10-13 10:40 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: Greg Minshall, emacs-orgmode

On Tuesday, 13 Oct 2020 at 11:01, Dr. Arne Babenhauserheide wrote:
> Don’t you get a "do you want to revert file" warning then?

You might not be visiting that file and/or you might have auto-revert
mode set (which I do as I like living dangerously ;-)).

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-57-g8402c4


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-10-13 10:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 12:44 buffer name of Org Src Greg Minshall
2020-10-12 13:18 ` Eric S Fraga
2020-10-12 14:17   ` Greg Minshall
2020-10-12 14:31     ` Eric S Fraga
2020-10-13  6:27       ` Greg Minshall
2020-10-13  7:52         ` Eric S Fraga
2020-10-13  9:01           ` Dr. Arne Babenhauserheide
2020-10-13 10:40             ` Eric S Fraga
2020-10-12 13:39 ` Dr. Arne Babenhauserheide
2020-10-12 14:04   ` Greg Minshall
2020-10-12 14:11   ` Eric S Fraga
2020-10-12 16:33     ` Dr. Arne Babenhauserheide
2020-10-12 16:50       ` Eric S Fraga
2020-10-12 18:52         ` Dr. Arne Babenhauserheide
2020-10-13  7:51           ` Eric S Fraga

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git