From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: suggestion: M-m should move point to first word on line Date: Tue, 12 Feb 2013 08:33:27 +0100 Message-ID: <87pq06x9yw.fsf@bzg.ath.cx> References: <87a9rahofk.fsf@bzg.ath.cx> <87halidnem.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5AUh-0005TT-TN for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 02:41:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5AUg-00009M-HN for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 02:41:35 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:55300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5AUg-00009F-Bd for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 02:41:34 -0500 Received: by mail-wi0-f181.google.com with SMTP id hm6so4015108wib.2 for ; Mon, 11 Feb 2013 23:41:33 -0800 (PST) In-Reply-To: <87halidnem.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Tue, 12 Feb 2013 17:33:29 +1030") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Fraga Cc: "emacs-orgmode@gnu.org Mailing List" , Meng Weng Wong --=-=-= Content-Type: text/plain Hi Eric, thanks for testing. Eric S Fraga writes: > this seems to cause a problem with org-ctrl-c-minus when trying to cycle > a bullet point past +. That is, it works if the bullet is - so you can > cycle to the next which is + but you cannot cycle past that. Attached patch (against master) fixes this problem. I'm not sure I'm in favor of this change, though, I expect it to cause other problems and the benefit looks small for now. Do you see other reasons than M-m where stars as whitespace chars are useful? What about *markup*? Thanks, --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org.el-org-mode-Set-to-be-syntactically-a-whitespace.patch >From a41bc3569e6812ce0c35e50abfc91590a47919c6 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 12 Feb 2013 08:30:14 +0100 Subject: [PATCH] org.el (org-mode): Set ?* to be syntactically a whitespace character * org-list.el (org-list-bullet-string): Don't skip all whitespace characters, skip whitespace and tab explicitely. * org.el (org-mode): Set ?* to be syntactically a whitespace character. --- lisp/org-list.el | 4 ++-- lisp/org.el | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org-list.el b/lisp/org-list.el index d86746f..e4d6d6d 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -1081,8 +1081,8 @@ It determines the number of whitespaces to append by looking at org-list-two-spaces-after-bullet-regexp bullet)) " " " "))) - (string-match "\\S-+\\([ \t]*\\)" bullet) - (replace-match spaces nil nil bullet 1)))) + (if (string-match "[^ \t]+\\([ \t]*\\)" bullet) + (replace-match spaces nil nil bullet 1))))) (defun org-list-swap-items (beg-A beg-B struct) "Swap item starting at BEG-A with item starting at BEG-B in STRUCT. diff --git a/lisp/org.el b/lisp/org.el index 461cdf0..a58c10b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5173,6 +5173,7 @@ 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") (modify-syntax-entry ?\" "\"") (if org-startup-truncated (setq truncate-lines t)) -- 1.8.1.2 --=-=-= Content-Type: text/plain -- Bastien --=-=-=--