* [RFC/PATCH] org-tree-to-indirect-buffer name without tags
@ 2016-01-06 16:00 Stefan-W. Hahn
2016-01-06 18:08 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Stefan-W. Hahn @ 2016-01-06 16:00 UTC (permalink / raw)
To: emacs-orgmode
Hello,
when indirecting an org-tree the buffer gets the titel of the task together
with its tags and also the spaces between the title and the tags. This is an
ugly behaviour for the mode-line.
I will propose following patch which removes the tags for the buffer name
and therefore generates a shorter name:
diff --git a/lisp/org.el b/lisp/org.el
index c600f2f..47c28fb 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7595,7 +7595,7 @@ org-tree-to-indirect-buffer
(while (> (setq level (org-outline-level)) arg)
(org-up-heading-safe)))
(setq beg (point)
- heading (org-get-heading))
+ heading (org-get-heading 'no-tags))
(org-end-of-subtree t t)
(when (org-at-heading-p) (backward-char 1))
(setq end (point)))
With kind regards,
Stefan
--
Stefan-W. Hahn It is easy to make things.
It is hard to make things simple.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC/PATCH] org-tree-to-indirect-buffer name without tags
2016-01-06 16:00 [RFC/PATCH] org-tree-to-indirect-buffer name without tags Stefan-W. Hahn
@ 2016-01-06 18:08 ` Nicolas Goaziou
2016-01-06 19:29 ` Stefan-W. Hahn
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2016-01-06 18:08 UTC (permalink / raw)
To: Stefan-W. Hahn; +Cc: emacs-orgmode
Hello,
"Stefan-W. Hahn" <stefan.hahn@s-hahn.de> writes:
> when indirecting an org-tree the buffer gets the titel of the task together
> with its tags and also the spaces between the title and the tags. This is an
> ugly behaviour for the mode-line.
>
> I will propose following patch which removes the tags for the buffer name
> and therefore generates a shorter name:
>
> diff --git a/lisp/org.el b/lisp/org.el
> index c600f2f..47c28fb 100755
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -7595,7 +7595,7 @@ org-tree-to-indirect-buffer
> (while (> (setq level (org-outline-level)) arg)
> (org-up-heading-safe)))
> (setq beg (point)
> - heading (org-get-heading))
> + heading (org-get-heading 'no-tags))
> (org-end-of-subtree t t)
> (when (org-at-heading-p) (backward-char 1))
> (setq end (point)))
Sounds good. Thank you.
Could you send it using git format-patch, with an appropriate commit
message? If you haven't signed FSF papers, you'll need to add TINYCHANGE
at its end.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC/PATCH] org-tree-to-indirect-buffer name without tags
2016-01-06 18:08 ` Nicolas Goaziou
@ 2016-01-06 19:29 ` Stefan-W. Hahn
2016-01-06 22:01 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Stefan-W. Hahn @ 2016-01-06 19:29 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 647 bytes --]
Mail von Nicolas Goaziou, Wed, 06 Jan 2016 at 19:08:45 +0100:
Hello,
> > when indirecting an org-tree the buffer gets the titel of the task together
> > with its tags and also the spaces between the title and the tags. This is an
> > ugly behaviour for the mode-line.
> >
> Sounds good. Thank you.
>
> Could you send it using git format-patch, with an appropriate commit
> message? If you haven't signed FSF papers, you'll need to add TINYCHANGE
> at its end.
Attached.
With kind regards,
Stefan
--
Stefan-W. Hahn It is easy to make things.
It is hard to make things simple.
[-- Attachment #2: 0001-Name-org-tree-indirected-buffer-just-with-title.patch --]
[-- Type: text/x-diff, Size: 968 bytes --]
From f24140c66248826b648ad29c82762389ee0175cc Mon Sep 17 00:00:00 2001
From: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
Date: Wed, 6 Jan 2016 20:20:36 +0100
Subject: Name org-tree indirected buffer just with title
Just use org-tree title for naming an indirected org-tree buffer. If
tags are appended the name clutters mode-line.
TINYCHANGE
Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
---
lisp/org.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index c600f2f..47c28fb 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7595,7 +7595,7 @@ org-tree-to-indirect-buffer
(while (> (setq level (org-outline-level)) arg)
(org-up-heading-safe)))
(setq beg (point)
- heading (org-get-heading))
+ heading (org-get-heading 'no-tags))
(org-end-of-subtree t t)
(when (org-at-heading-p) (backward-char 1))
(setq end (point)))
--
2.5.0.rc3.2.g6f9504c
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-06 21:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06 16:00 [RFC/PATCH] org-tree-to-indirect-buffer name without tags Stefan-W. Hahn
2016-01-06 18:08 ` Nicolas Goaziou
2016-01-06 19:29 ` Stefan-W. Hahn
2016-01-06 22:01 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.