* Removing (modify-syntax-entry ?# "<")
@ 2010-06-07 11:12 Leo
2010-06-08 16:46 ` Carsten Dominik
2010-06-18 7:11 ` Carsten Dominik
0 siblings, 2 replies; 4+ messages in thread
From: Leo @ 2010-06-07 11:12 UTC (permalink / raw)
To: emacs-orgmode
Hello Carsten,
Setting a comment starter without a corresponding comment ender is
problematic and the # creeps in mysteriously under auto-fill. For
example, in my current running emacs, this happens almost certainly in
all org files that has # in their header. The only (temporary) solution
seems to reboot emacs (which is painful and disruptive).
If you try eval (forward-comment 1) at the beginning of an org file that
has some "#+..." it will move to the end of file (the whole file is
regarded as one single comment). So when auto-fill a long text, it will
find the common prefix to be #.
In addition, I don't think org mode has clear comment syntax or ideas on
what to do with it.
I can't see any gain from (modify-syntax-entry ?# "<") so I am proposing
removing it entirely and get rid of this mysterious and annoying bug
once and for all.
The attached patch may (though I think it is quite safe) cause some bugs
but those will be fixable unlike the one mentioned above.
Best wishes,
Leo
diff --git a/lisp/org/org.el b/lisp/org/org.el
index aae49fa..bb36ed8 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -4208,7 +4208,6 @@ The following commands are available:
(org-set-tag-faces 'org-tag-faces org-tag-faces))
;; Calc embedded
(org-set-local 'calc-embedded-open-mode "# ")
- (modify-syntax-entry ?# "<")
(modify-syntax-entry ?@ "w")
(if org-startup-truncated (setq truncate-lines t))
(org-set-local 'font-lock-unfontify-region-function
@@ -4237,7 +4236,7 @@ The following commands are available:
'org-block-todo-from-checkboxes))
;; Comment characters
-; (org-set-local 'comment-start "#") ;; FIXME: this breaks wrapping
+ (org-set-local 'comment-start "#")
(org-set-local 'comment-padding " ")
;; Align options lines
--
CCL-USER> (if you fail to plan (plan to fail))
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Removing (modify-syntax-entry ?# "<")
2010-06-07 11:12 Removing (modify-syntax-entry ?# "<") Leo
@ 2010-06-08 16:46 ` Carsten Dominik
2010-06-18 7:11 ` Carsten Dominik
1 sibling, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2010-06-08 16:46 UTC (permalink / raw)
To: Leo; +Cc: emacs-orgmode
Hi Leo,
thanks for this.
I am off for a one-week vacation now - I will look at this patch when
I com back.
- Carsten
On Jun 7, 2010, at 1:12 PM, Leo wrote:
> Hello Carsten,
>
> Setting a comment starter without a corresponding comment ender is
> problematic and the # creeps in mysteriously under auto-fill. For
> example, in my current running emacs, this happens almost certainly in
> all org files that has # in their header. The only (temporary)
> solution
> seems to reboot emacs (which is painful and disruptive).
>
> If you try eval (forward-comment 1) at the beginning of an org file
> that
> has some "#+..." it will move to the end of file (the whole file is
> regarded as one single comment). So when auto-fill a long text, it
> will
> find the common prefix to be #.
>
> In addition, I don't think org mode has clear comment syntax or
> ideas on
> what to do with it.
>
> I can't see any gain from (modify-syntax-entry ?# "<") so I am
> proposing
> removing it entirely and get rid of this mysterious and annoying bug
> once and for all.
>
> The attached patch may (though I think it is quite safe) cause some
> bugs
> but those will be fixable unlike the one mentioned above.
>
> Best wishes,
>
> Leo
>
>
> diff --git a/lisp/org/org.el b/lisp/org/org.el
> index aae49fa..bb36ed8 100644
> --- a/lisp/org/org.el
> +++ b/lisp/org/org.el
> @@ -4208,7 +4208,6 @@ The following commands are available:
> (org-set-tag-faces 'org-tag-faces org-tag-faces))
> ;; Calc embedded
> (org-set-local 'calc-embedded-open-mode "# ")
> - (modify-syntax-entry ?# "<")
> (modify-syntax-entry ?@ "w")
> (if org-startup-truncated (setq truncate-lines t))
> (org-set-local 'font-lock-unfontify-region-function
> @@ -4237,7 +4236,7 @@ The following commands are available:
> 'org-block-todo-from-checkboxes))
>
> ;; Comment characters
> -; (org-set-local 'comment-start "#") ;; FIXME: this breaks wrapping
> + (org-set-local 'comment-start "#")
> (org-set-local 'comment-padding " ")
>
> ;; Align options lines
>
>
>
> --
> CCL-USER> (if you fail to plan (plan to fail))
>
>
> _______________________________________________
> 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
- Carsten
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Removing (modify-syntax-entry ?# "<")
2010-06-07 11:12 Removing (modify-syntax-entry ?# "<") Leo
2010-06-08 16:46 ` Carsten Dominik
@ 2010-06-18 7:11 ` Carsten Dominik
2010-06-18 10:04 ` Leo
1 sibling, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2010-06-18 7:11 UTC (permalink / raw)
To: Leo; +Cc: emacs-orgmode
Hi Leo,
I have now applied this patch - hopefully it will do the right thing.
Thank you for your persistence in trying to fix this old and super-
annoying
bug.
- Carsten
On Jun 7, 2010, at 1:12 PM, Leo wrote:
> Hello Carsten,
>
> Setting a comment starter without a corresponding comment ender is
> problematic and the # creeps in mysteriously under auto-fill. For
> example, in my current running emacs, this happens almost certainly in
> all org files that has # in their header. The only (temporary)
> solution
> seems to reboot emacs (which is painful and disruptive).
>
> If you try eval (forward-comment 1) at the beginning of an org file
> that
> has some "#+..." it will move to the end of file (the whole file is
> regarded as one single comment). So when auto-fill a long text, it
> will
> find the common prefix to be #.
>
> In addition, I don't think org mode has clear comment syntax or
> ideas on
> what to do with it.
>
> I can't see any gain from (modify-syntax-entry ?# "<") so I am
> proposing
> removing it entirely and get rid of this mysterious and annoying bug
> once and for all.
>
> The attached patch may (though I think it is quite safe) cause some
> bugs
> but those will be fixable unlike the one mentioned above.
>
> Best wishes,
>
> Leo
>
>
> diff --git a/lisp/org/org.el b/lisp/org/org.el
> index aae49fa..bb36ed8 100644
> --- a/lisp/org/org.el
> +++ b/lisp/org/org.el
> @@ -4208,7 +4208,6 @@ The following commands are available:
> (org-set-tag-faces 'org-tag-faces org-tag-faces))
> ;; Calc embedded
> (org-set-local 'calc-embedded-open-mode "# ")
> - (modify-syntax-entry ?# "<")
> (modify-syntax-entry ?@ "w")
> (if org-startup-truncated (setq truncate-lines t))
> (org-set-local 'font-lock-unfontify-region-function
> @@ -4237,7 +4236,7 @@ The following commands are available:
> 'org-block-todo-from-checkboxes))
>
> ;; Comment characters
> -; (org-set-local 'comment-start "#") ;; FIXME: this breaks wrapping
> + (org-set-local 'comment-start "#")
> (org-set-local 'comment-padding " ")
>
> ;; Align options lines
>
>
>
> --
> CCL-USER> (if you fail to plan (plan to fail))
>
>
> _______________________________________________
> 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
- Carsten
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Removing (modify-syntax-entry ?# "<")
2010-06-18 7:11 ` Carsten Dominik
@ 2010-06-18 10:04 ` Leo
0 siblings, 0 replies; 4+ messages in thread
From: Leo @ 2010-06-18 10:04 UTC (permalink / raw)
To: emacs-orgmode
On 2010-06-18 08:11 +0100, Carsten Dominik wrote:
> Hi Leo,
>
> I have now applied this patch - hopefully it will do the right thing.
> Thank you for your persistence in trying to fix this old and super-
> annoying bug.
>
> - Carsten
Thank you Carsten.
I hope people who use org mode features more extensively can test it
out. My personal use since the patch was submitted indicates no problem
but my org mode setup is only ~50 lines.
Cheers,
Leo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-18 10:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07 11:12 Removing (modify-syntax-entry ?# "<") Leo
2010-06-08 16:46 ` Carsten Dominik
2010-06-18 7:11 ` Carsten Dominik
2010-06-18 10:04 ` Leo
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).