* M-x fill-region equivalent for lists? @ 2013-09-18 1:49 John Hendy 2013-09-18 9:15 ` Eric S Fraga 0 siblings, 1 reply; 14+ messages in thread From: John Hendy @ 2013-09-18 1:49 UTC (permalink / raw) To: emacs-orgmode Greetings, When editing lists after deleting words (shortening lines) and/or concatenating one line with the one that follows (to remedy a shortened line), I end up with an "unfilled" list item. Is there an Org equivalent to `M-x fill-region` on paragraphs to tidy up the Org document list entries? In other words, I'd like to cause the item to look equivalent to typing it all at once and having the text flowed onto the next line when I hit my setting for the fill width: (setq-default fill-column 90) Example: - here's some text that should all be one bullet and not be on separate lines. I deleted the stuff on the line above and now want all three of these lines to reflow nicely in the same bullet. Is this possible? If I put that all one one line, go to the end and press SPACE, I get this (probably won't reflow right with the limits of email widths...): - here's some text that should all be one bullet and not be on separate lines. I deleted the stuff on the line above and now want all three of these lines to reflow nicely in the same bullet. Is this possible? Thanks, John ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: M-x fill-region equivalent for lists? 2013-09-18 1:49 M-x fill-region equivalent for lists? John Hendy @ 2013-09-18 9:15 ` Eric S Fraga 2013-09-18 15:31 ` John Hendy 2013-09-18 15:32 ` John Hendy 0 siblings, 2 replies; 14+ messages in thread From: Eric S Fraga @ 2013-09-18 9:15 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode John Hendy <jw.hendy@gmail.com> writes: > Greetings, > > > When editing lists after deleting words (shortening lines) and/or > concatenating one line with the one that follows (to remedy a > shortened line), I end up with an "unfilled" list item. Is there an > Org equivalent to `M-x fill-region` on paragraphs to tidy up the Org > document list entries? Doesn't fill-paragraph work? It does for me. Well, to be precise, I have M-q bound to maybe-fill-paragraph which is defined as #+begin_src emacs-lisp (defun maybe-fill-paragraph (&optional justify region) "Fill paragraph at or after point (see `fill-paragraph'). Does nothing if `visual-line-mode' is on." (interactive (progn (barf-if-buffer-read-only) (list (if current-prefix-arg 'full) t))) (or visual-line-mode (fill-paragraph justify region))) #+end_src HTH, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: M-x fill-region equivalent for lists? 2013-09-18 9:15 ` Eric S Fraga @ 2013-09-18 15:31 ` John Hendy 2013-09-19 14:54 ` Eric S Fraga 2013-09-18 15:32 ` John Hendy 1 sibling, 1 reply; 14+ messages in thread From: John Hendy @ 2013-09-18 15:31 UTC (permalink / raw) To: John Hendy, emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1967 bytes --] On Wed, Sep 18, 2013 at 4:15 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > John Hendy <jw.hendy@gmail.com> writes: > >> Greetings, >> >> >> When editing lists after deleting words (shortening lines) and/or >> concatenating one line with the one that follows (to remedy a >> shortened line), I end up with an "unfilled" list item. Is there an >> Org equivalent to `M-x fill-region` on paragraphs to tidy up the Org >> document list entries? > > Doesn't fill-paragraph work? It does for me. > > Well, to be precise, I have M-q bound to maybe-fill-paragraph which is > defined as > Sort of. Screenshots attached: - as-is.png is the text from my initial email just yanked into Emacs - uneven-start.png is the result of `M-x fill-paragraph` on that text - even-start.png is the result of `M-x fill-paragraph` on the text if I make sure the start of every line is justified with two spaces, as it would if I'd been writing that full line directly in an Org list item and then deleted/shortened some of the lines. - default.org is me taking the original yanked text and arranging it all on one line, then pressing space at the end of the line. So... if the start of the lines in an item aren't even, you get an uneven fill, and in both cases, the right ragged edge is more ragged than Org would have done on it's own. I didn't know about this function and have just always used fill-region (not sure why!), so thanks for suggesting it, as it's definitely getting things close. John > #+begin_src emacs-lisp > (defun maybe-fill-paragraph (&optional justify region) > "Fill paragraph at or after point (see `fill-paragraph'). > > Does nothing if `visual-line-mode' is on." > (interactive (progn > (barf-if-buffer-read-only) > (list (if current-prefix-arg 'full) t))) > (or visual-line-mode > (fill-paragraph justify region))) > #+end_src > > HTH, > eric > -- > : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5 > [-- Attachment #2: as-is.png --] [-- Type: image/png, Size: 10761 bytes --] [-- Attachment #3: uneven-start.png --] [-- Type: image/png, Size: 7760 bytes --] [-- Attachment #4: even-start.png --] [-- Type: image/png, Size: 9445 bytes --] [-- Attachment #5: default-org.png --] [-- Type: image/png, Size: 9435 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: M-x fill-region equivalent for lists? 2013-09-18 15:31 ` John Hendy @ 2013-09-19 14:54 ` Eric S Fraga 2013-09-19 15:48 ` John Hendy 0 siblings, 1 reply; 14+ messages in thread From: Eric S Fraga @ 2013-09-19 14:54 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode John Hendy <jw.hendy@gmail.com> writes: [...] > Sort of. Screenshots attached: > - as-is.png is the text from my initial email just yanked into Emacs > > - uneven-start.png is the result of `M-x fill-paragraph` on that text > > - even-start.png is the result of `M-x fill-paragraph` on the text if > I make sure the start of every line is justified with two spaces, as > it would if I'd been writing that full line directly in an Org list > item and then deleted/shortened some of the lines. > > - default.org is me taking the original yanked text and arranging it > all on one line, then pressing space at the end of the line. > > So... if the start of the lines in an item aren't even, you get an > uneven fill, Yes, this is as expected, based on fill-paragraph's algorithm for what to fill and how to define the fill prefix. > and in both cases, the right ragged edge is more ragged > than Org would have done on it's own. Yes, this is true. Happens to me as well. The filling is different when using auto-fill and writing as compared with fill-paragraph afterwards. I have never used fill-region so cannot compare. > I didn't know about this > function and have just always used fill-region (not sure why!), so > thanks for suggesting it, as it's definitely getting things close. One step at a time... ;-) Filling appears to be a somewhat stochastic process although I'm sure it isn't! Having said this, I have now moved completely to org-indent with visual-line-mode and I no longer need to fill anything, when in org mode as opposed to message mode like this email... -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: M-x fill-region equivalent for lists? 2013-09-19 14:54 ` Eric S Fraga @ 2013-09-19 15:48 ` John Hendy 2013-09-19 19:15 ` Eric S Fraga 0 siblings, 1 reply; 14+ messages in thread From: John Hendy @ 2013-09-19 15:48 UTC (permalink / raw) To: John Hendy, emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2491 bytes --] On Thu, Sep 19, 2013 at 9:54 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > John Hendy <jw.hendy@gmail.com> writes: > > [...] > >> Sort of. Screenshots attached: >> - as-is.png is the text from my initial email just yanked into Emacs >> >> - uneven-start.png is the result of `M-x fill-paragraph` on that text >> >> - even-start.png is the result of `M-x fill-paragraph` on the text if >> I make sure the start of every line is justified with two spaces, as >> it would if I'd been writing that full line directly in an Org list >> item and then deleted/shortened some of the lines. >> >> - default.org is me taking the original yanked text and arranging it >> all on one line, then pressing space at the end of the line. >> >> So... if the start of the lines in an item aren't even, you get an >> uneven fill, > > Yes, this is as expected, based on fill-paragraph's algorithm for what > to fill and how to define the fill prefix. > >> and in both cases, the right ragged edge is more ragged >> than Org would have done on it's own. > > Yes, this is true. Happens to me as well. The filling is different > when using auto-fill and writing as compared with fill-paragraph > afterwards. I have never used fill-region so cannot compare. > If I select/mark a paragraph, `M-x fill-region` produces paragraphs that are identical to typing them in Org and letting the line run past my setting for the fill-column width. So fill-region works identically to Org; fill-paragraph does not. >> I didn't know about this >> function and have just always used fill-region (not sure why!), so >> thanks for suggesting it, as it's definitely getting things close. > > One step at a time... ;-) Filling appears to be a somewhat stochastic > process although I'm sure it isn't! See attached before and after comparing regular paragraph behavior for Org's default behavior if you fill past the fill-column setting, M-x fill-region, and M-x fill-paragraph. Perhaps not the most exhaustive test, but shows that for paragraphs, the behavior of all three is the same. I did the same for lists, but I suppose we already knew from my previous email that Org and fill-paragraph don't agree. > > Having said this, I have now moved completely to org-indent with > visual-line-mode and I no longer need to fill anything, when in org mode > as opposed to message mode like this email... Hmm. I'll have to look into that! John > > -- > : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5 > [-- Attachment #2: before.png --] [-- Type: image/png, Size: 38476 bytes --] [-- Attachment #3: after.png --] [-- Type: image/png, Size: 40391 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: M-x fill-region equivalent for lists? 2013-09-19 15:48 ` John Hendy @ 2013-09-19 19:15 ` Eric S Fraga 0 siblings, 0 replies; 14+ messages in thread From: Eric S Fraga @ 2013-09-19 19:15 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode John Hendy <jw.hendy@gmail.com> writes: [...] > If I select/mark a paragraph, `M-x fill-region` produces paragraphs > that are identical to typing them in Org and letting the line run past > my setting for the fill-column width. So fill-region works identically > to Org; fill-paragraph does not. Yes. Fill-paragraph makes use of fill-paragraph-function which is normally nil but set to org-fill-paragraph when in org mode. org-fill-paragraph is quite long and I've only had a quick glance at the code. Fill-region doesn't seem to make use of that. To add to the confusion, there is also a function called fill-region-as-paragraph... but I've not played with it. -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-29-gc5f2ae ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: M-x fill-region equivalent for lists? 2013-09-18 9:15 ` Eric S Fraga 2013-09-18 15:31 ` John Hendy @ 2013-09-18 15:32 ` John Hendy 2013-09-18 17:06 ` Nick Dokos 2013-09-19 14:48 ` [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) Eric S Fraga 1 sibling, 2 replies; 14+ messages in thread From: John Hendy @ 2013-09-18 15:32 UTC (permalink / raw) To: John Hendy, emacs-orgmode, Eric Fraga P.S. Oddly, reply-all to your email composes an email to myself and the Org-mode list, but not you directly... what might be the cause of that? This is the behavior I get with gmail. Just wanted to let you know. John On Wed, Sep 18, 2013 at 4:15 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > John Hendy <jw.hendy@gmail.com> writes: > >> Greetings, >> >> >> When editing lists after deleting words (shortening lines) and/or >> concatenating one line with the one that follows (to remedy a >> shortened line), I end up with an "unfilled" list item. Is there an >> Org equivalent to `M-x fill-region` on paragraphs to tidy up the Org >> document list entries? > > Doesn't fill-paragraph work? It does for me. > > Well, to be precise, I have M-q bound to maybe-fill-paragraph which is > defined as > > #+begin_src emacs-lisp > (defun maybe-fill-paragraph (&optional justify region) > "Fill paragraph at or after point (see `fill-paragraph'). > > Does nothing if `visual-line-mode' is on." > (interactive (progn > (barf-if-buffer-read-only) > (list (if current-prefix-arg 'full) t))) > (or visual-line-mode > (fill-paragraph justify region))) > #+end_src > > HTH, > eric > -- > : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5 > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: M-x fill-region equivalent for lists? 2013-09-18 15:32 ` John Hendy @ 2013-09-18 17:06 ` Nick Dokos 2013-09-19 14:48 ` [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) Eric S Fraga 1 sibling, 0 replies; 14+ messages in thread From: Nick Dokos @ 2013-09-18 17:06 UTC (permalink / raw) To: emacs-orgmode John Hendy <jw.hendy@gmail.com> writes: > P.S. Oddly, reply-all to your email composes an email to myself and > the Org-mode list, but not you directly... what might be the cause of > that? > > This is the behavior I get with gmail. Just wanted to let you know. > Not really odd: Eric F. set the Mail-followup-to header to just you and the ML. For some background, see http://cr.yp.to/proto/replyto.html Nick ^ permalink raw reply [flat|nested] 14+ messages in thread
* [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) 2013-09-18 15:32 ` John Hendy 2013-09-18 17:06 ` Nick Dokos @ 2013-09-19 14:48 ` Eric S Fraga 2013-09-19 15:40 ` John Hendy 1 sibling, 1 reply; 14+ messages in thread From: Eric S Fraga @ 2013-09-19 14:48 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode John Hendy <jw.hendy@gmail.com> writes: > P.S. Oddly, reply-all to your email composes an email to myself and > the Org-mode list, but not you directly... what might be the cause of > that? Hi John, that happens because I have directed, in my message, that any replies go to the list. As I subscribe to the list, I do not need to have replies to me directly. Scoring in gnus ensures that any email on the list that is part of a thread I have contributed to will be emphasised (scored high). The technical details: I have told gnus that any email in my lists.org group is email from a mailing list. As a result, when I post to this list, gnus inserts the following Mail-Followup-To: mail header in the emails. If you look at this email, the header should be there and it should look like this: Mail-Followup-To: John Hendy <jw.hendy@gmail.com>, emacs-orgmode <emacs-orgmode@gnu.org> In principle, it could be just the org mode mailing list but it is not up to me to decide whether you want direct responses or not. :-) > This is the behavior I get with gmail. Just wanted to let you know. It's the correct behaviour. For once, gmail does the right thing! Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) 2013-09-19 14:48 ` [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) Eric S Fraga @ 2013-09-19 15:40 ` John Hendy 2013-09-19 19:07 ` Eric S Fraga 0 siblings, 1 reply; 14+ messages in thread From: John Hendy @ 2013-09-19 15:40 UTC (permalink / raw) To: John Hendy, emacs-orgmode On Thu, Sep 19, 2013 at 9:48 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > John Hendy <jw.hendy@gmail.com> writes: > >> P.S. Oddly, reply-all to your email composes an email to myself and >> the Org-mode list, but not you directly... what might be the cause of >> that? > > Hi John, > > that happens because I have directed, in my message, that any replies go > to the list. As I subscribe to the list, I do not need to have replies > to me directly. Scoring in gnus ensures that any email on the list that > is part of a thread I have contributed to will be emphasised (scored > high). > > The technical details: I have told gnus that any email in my lists.org > group is email from a mailing list. As a result, when I post to this > list, gnus inserts the following Mail-Followup-To: mail header in the > emails. If you look at this email, the header should be there and it > should look like this: > Gotcha, and sorry for incorrectly thinking this was wrong. I've never seen that before -- if I got an email from X, with Y and Z also on the email, it's always gone out to X, Y, and Z with reply-all, but then again, sending to Y doesn't mean that X is also getting it as in the case of you (X) and the mailing list (Y). Now I understand. > Mail-Followup-To: John Hendy <jw.hendy@gmail.com>, emacs-orgmode <emacs-orgmode@gnu.org> > > In principle, it could be just the org mode mailing list but it is not > up to me to decide whether you want direct responses or not. :-) > Got it. And now that you say that, *that's* what puzzled me when sending it out: I got an email back to myself. So *that* I still do find weird. If I send an email in response to your email on the list, why would I want it sent directly to myself? Is that just because if someone then responds to *that* email, it ensures that I get a direct email as well as the one to the list? >> This is the behavior I get with gmail. Just wanted to let you know. > > It's the correct behaviour. For once, gmail does the right thing! > I've not played with these followup headers, so interesting to get a bit of education about them. Thanks for explaining. John > Thanks, > eric > -- > : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5 > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) 2013-09-19 15:40 ` John Hendy @ 2013-09-19 19:07 ` Eric S Fraga 2013-09-19 19:38 ` John Hendy 2013-09-20 11:18 ` Sebastien Vauban 0 siblings, 2 replies; 14+ messages in thread From: Eric S Fraga @ 2013-09-19 19:07 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode John Hendy <jw.hendy@gmail.com> writes: [...] > Got it. And now that you say that, *that's* what puzzled me when > sending it out: I got an email back to myself. So *that* I still do > find weird. If I send an email in response to your email on the list, > why would I want it sent directly to myself? Is that just because if > someone then responds to *that* email, it ensures that I get a direct > email as well as the one to the list? Yes, and it does seem to have the annoying side effect that if *you* reply, you might also get a copy. This wouldn't happen to me as I think that gnus filters out any "me" addresses in doing a followup. -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-29-gc5f2ae ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) 2013-09-19 19:07 ` Eric S Fraga @ 2013-09-19 19:38 ` John Hendy 2013-09-20 11:18 ` Sebastien Vauban 1 sibling, 0 replies; 14+ messages in thread From: John Hendy @ 2013-09-19 19:38 UTC (permalink / raw) To: John Hendy, emacs-orgmode On Thu, Sep 19, 2013 at 2:07 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > John Hendy <jw.hendy@gmail.com> writes: > > [...] > >> Got it. And now that you say that, *that's* what puzzled me when >> sending it out: I got an email back to myself. So *that* I still do >> find weird. If I send an email in response to your email on the list, >> why would I want it sent directly to myself? Is that just because if >> someone then responds to *that* email, it ensures that I get a direct >> email as well as the one to the list? > > Yes, and it does seem to have the annoying side effect that if *you* > reply, you might also get a copy. This wouldn't happen to me as I think > that gnus filters out any "me" addresses in doing a followup. > I'd look back into gnus as it sounds nifty, but work blocks pop/imap ports and I'm just not sure I want to have a home-only email system... John > -- > : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-29-gc5f2ae > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) 2013-09-19 19:07 ` Eric S Fraga 2013-09-19 19:38 ` John Hendy @ 2013-09-20 11:18 ` Sebastien Vauban 2013-09-23 18:52 ` Eric S Fraga 1 sibling, 1 reply; 14+ messages in thread From: Sebastien Vauban @ 2013-09-20 11:18 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Eric, Eric S Fraga wrote: > John Hendy <jw.hendy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > >> Got it. And now that you say that, *that's* what puzzled me when sending it >> out: I got an email back to myself. So *that* I still do find weird. If I >> send an email in response to your email on the list, why would I want it >> sent directly to myself? Is that just because if someone then responds to >> *that* email, it ensures that I get a direct email as well as the one to >> the list? > > Yes, and it does seem to have the annoying side effect that if *you* reply, > you might also get a copy. This wouldn't happen to me as I think that gnus > filters out any "me" addresses in doing a followup. Yes, you must have something along that line: --8<---------------cut here---------------start------------->8--- ;; addresses to prune (disable `Cc:' to myself) when doing wide replies (setq message-dont-reply-to-names gnus-ignored-from-addresses) --8<---------------cut here---------------end--------------->8--- in your .gnus. Best regards, Seb -- Sebastien Vauban ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) 2013-09-20 11:18 ` Sebastien Vauban @ 2013-09-23 18:52 ` Eric S Fraga 0 siblings, 0 replies; 14+ messages in thread From: Eric S Fraga @ 2013-09-23 18:52 UTC (permalink / raw) To: Sebastien Vauban; +Cc: emacs-orgmode Sebastien Vauban <sva-news@mygooglest.com> writes: [...] > Yes, you must have something along that line: > > ;; addresses to prune (disable `Cc:' to myself) when doing wide replies > (setq message-dont-reply-to-names gnus-ignored-from-addresses) I do indeed! Gnus has everything basically... :-) Back to org now although gnus+org rules my days. -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5 ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2013-09-23 19:25 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-09-18 1:49 M-x fill-region equivalent for lists? John Hendy 2013-09-18 9:15 ` Eric S Fraga 2013-09-18 15:31 ` John Hendy 2013-09-19 14:54 ` Eric S Fraga 2013-09-19 15:48 ` John Hendy 2013-09-19 19:15 ` Eric S Fraga 2013-09-18 15:32 ` John Hendy 2013-09-18 17:06 ` Nick Dokos 2013-09-19 14:48 ` [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) Eric S Fraga 2013-09-19 15:40 ` John Hendy 2013-09-19 19:07 ` Eric S Fraga 2013-09-19 19:38 ` John Hendy 2013-09-20 11:18 ` Sebastien Vauban 2013-09-23 18:52 ` Eric S Fraga
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).